spotny-sdk 1.0.32 → 1.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/android/build.gradle
CHANGED
|
@@ -7,8 +7,6 @@ import android.os.Build
|
|
|
7
7
|
import android.os.RemoteException
|
|
8
8
|
import android.util.Log
|
|
9
9
|
import androidx.core.app.NotificationCompat
|
|
10
|
-
import androidx.security.crypto.EncryptedSharedPreferences
|
|
11
|
-
import androidx.security.crypto.MasterKey
|
|
12
10
|
import com.facebook.react.bridge.*
|
|
13
11
|
import com.facebook.react.modules.core.DeviceEventManagerModule
|
|
14
12
|
import org.altbeacon.beacon.*
|
|
@@ -451,25 +449,8 @@ class SpotnySdkModule(private val reactContext: ReactApplicationContext) :
|
|
|
451
449
|
|
|
452
450
|
// ── Helpers ───────────────────────────────────────────────────────────────
|
|
453
451
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
private fun prefs(): android.content.SharedPreferences {
|
|
457
|
-
return try {
|
|
458
|
-
val masterKey = MasterKey.Builder(reactContext)
|
|
459
|
-
.setKeyScheme(MasterKey.KeyScheme.AES256_GCM)
|
|
460
|
-
.build()
|
|
461
|
-
EncryptedSharedPreferences.create(
|
|
462
|
-
reactContext,
|
|
463
|
-
"SpotnySDK_secure",
|
|
464
|
-
masterKey,
|
|
465
|
-
EncryptedSharedPreferences.PrefKeyEncryptionScheme.AES256_SIV,
|
|
466
|
-
EncryptedSharedPreferences.PrefValueEncryptionScheme.AES256_GCM
|
|
467
|
-
)
|
|
468
|
-
} catch (e: Exception) {
|
|
469
|
-
Log.w(TAG, "EncryptedSharedPreferences unavailable, using plain prefs: ${e.message}")
|
|
470
|
-
reactContext.getSharedPreferences("SpotnySDK", Context.MODE_PRIVATE)
|
|
471
|
-
}
|
|
472
|
-
}
|
|
452
|
+
private fun prefs(): android.content.SharedPreferences =
|
|
453
|
+
reactContext.getSharedPreferences("SpotnySDK", Context.MODE_PRIVATE)
|
|
473
454
|
|
|
474
455
|
private fun beaconKey(major: Int, minor: Int) = "${major}_${minor}"
|
|
475
456
|
|