fix android reading

This commit is contained in:
0xturboblitz
2024-10-26 20:32:52 +02:00
parent ced1eb7508
commit 93f61791ac
2 changed files with 6 additions and 2 deletions

View File

@@ -37,6 +37,6 @@ class MainActivity : ReactActivity() {
override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
Log.d("MAIN_ACTIVITY", "onNewIntent: " + intent.action)
// RNPassportReaderModule.Companion.getInstance().receiveIntent(intent);
RNPassportReaderModule.getInstance().receiveIntent(intent)
}
}

View File

@@ -667,6 +667,10 @@ class RNPassportReaderModule(private val reactContext: ReactApplicationContext)
private const val PARAM_DOE = "dateOfExpiry";
const val JPEG_DATA_URI_PREFIX = "data:image/jpeg;base64,"
private const val KEY_IS_SUPPORTED = "isSupported"
var instance: RNPassportReaderModule? = null
private var instance: RNPassportReaderModule? = null
fun getInstance(): RNPassportReaderModule {
return instance ?: throw IllegalStateException("RNPassportReaderModule instance is not initialized")
}
}
}