mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2025-01-08 20:08:45 +03:00
user required receiver flags
This commit is contained in:
parent
b37cc66b5c
commit
7307115c40
@ -99,6 +99,7 @@ dependencies {
|
||||
// Lifecycle
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1'
|
||||
|
||||
implementation "androidx.core:core-ktx:1.10.1"
|
||||
implementation 'androidx.fragment:fragment-ktx:1.5.7'
|
||||
implementation 'androidx.preference:preference-ktx:1.2.0'
|
||||
|
||||
|
@ -35,6 +35,7 @@ import android.os.Bundle
|
||||
import android.provider.Settings.ACTION_NFC_SETTINGS
|
||||
import android.view.WindowManager
|
||||
import androidx.activity.viewModels
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.view.WindowCompat
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import com.yubico.authenticator.logging.FlutterLog
|
||||
@ -166,10 +167,22 @@ class MainActivity : FlutterFragmentActivity() {
|
||||
})
|
||||
}
|
||||
|
||||
@SuppressLint("WrongConstant")
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
registerReceiver(qrScannerCameraClosedBR, QRScannerCameraClosedBR.intentFilter)
|
||||
registerReceiver(nfcAdapterStateChangeBR, NfcAdapterStateChangedBR.intentFilter)
|
||||
val receiverFlags = ContextCompat.RECEIVER_NOT_EXPORTED
|
||||
ContextCompat.registerReceiver(
|
||||
this,
|
||||
qrScannerCameraClosedBR,
|
||||
QRScannerCameraClosedBR.intentFilter,
|
||||
receiverFlags
|
||||
)
|
||||
ContextCompat.registerReceiver(
|
||||
this,
|
||||
nfcAdapterStateChangeBR,
|
||||
NfcAdapterStateChangedBR.intentFilter,
|
||||
receiverFlags
|
||||
)
|
||||
}
|
||||
|
||||
override fun onStop() {
|
||||
|
Loading…
Reference in New Issue
Block a user