Home > other >  NFC card calls onnewIntent will automatically start your opening a new activity
NFC card calls onnewIntent will automatically start your opening a new activity

Time:09-24

NFC card calls onnewIntent will automatically start your opening a new activity I don't want him to open up new activity four patterns I have tried all I can't have any solution for the others to the demo all right don't know I have been to my project such as this problem who know online please
@ Override
Protected void onNewIntent (Intent Intent) {
If (nfcReadCardHelper isNFC (intent)) {
If (nfcTask==null) {
The e (" MainActivity ", "return to the intent of available");
NfcTask=new NFCReadTask (intent). ExecuteOnExecutor (Executors
NewCachedThreadPool ());
}
} else {
The e (" MainActivity ", "the returned intent, not with");
}
}

CodePudding user response:

Android: launchMode="singleInstance"

CodePudding user response:

Set android: launchMode="singleTop", can not repeat open interface, can read the data
  • Related