com.cprot.ead 1.0.8135 → 1.0.8151
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
|
@@ -218,13 +218,36 @@ class CProtEadModuleModule(reactContext: ReactApplicationContext) :
|
|
|
218
218
|
@ReactMethod
|
|
219
219
|
fun getDeviceFingerprint(promise: Promise) {
|
|
220
220
|
try {
|
|
221
|
-
|
|
222
|
-
|
|
221
|
+
module?.let { it ->
|
|
222
|
+
it.getDeviceFingerprint { fingerprint ->
|
|
223
|
+
try {
|
|
224
|
+
val result = fingerprint ?: ""
|
|
225
|
+
promise.resolve(result)
|
|
226
|
+
} catch (e: Exception) {
|
|
227
|
+
promise.reject("CALLBACK_ERROR", "Error inside fingerprint callback", e)
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
} ?: run {
|
|
231
|
+
promise.reject("MODULE_NOT_INITIALIZED", "The module is null.")
|
|
232
|
+
}
|
|
223
233
|
} catch (e: Exception) {
|
|
224
|
-
promise.reject("
|
|
234
|
+
promise.reject("CALL_ERROR", "Failed to invoke getDeviceFingerprint", e)
|
|
225
235
|
}
|
|
226
236
|
}
|
|
227
237
|
|
|
238
|
+
@ReactMethod
|
|
239
|
+
fun setPendingNotification(className: String?, argumentKey: String?, argumentPayload: String?) {
|
|
240
|
+
try {
|
|
241
|
+
module?.let { localModule ->
|
|
242
|
+
if (className == null) {
|
|
243
|
+
return
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
localModule.setPendingCProtNotification(className, argumentKey, argumentPayload)
|
|
247
|
+
}
|
|
248
|
+
} catch (e: Exception) {}
|
|
249
|
+
}
|
|
250
|
+
|
|
228
251
|
@ReactMethod
|
|
229
252
|
fun isRunInEmulator(promise: Promise) {
|
|
230
253
|
try {
|