File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
app/src/main/java/com/termux/api/apis Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 1616import androidx .annotation .Nullable ;
1717import androidx .appcompat .app .AppCompatActivity ;
1818
19+ import com .termux .api .util .PendingIntentUtils ;
1920import com .termux .api .util .ResultReturner ;
2021import com .termux .shared .logger .Logger ;
2122
@@ -104,8 +105,11 @@ protected void onResume() {
104105 finish ();
105106 return ;
106107 }
108+
109+ // - https://developer.android.com/develop/connectivity/nfc/advanced-nfc#foreground-dispatch
107110 Intent intentNew = new Intent (this , NfcActivity .class ).addFlags (Intent .FLAG_RECEIVER_REPLACE_PENDING );
108- PendingIntent pendingIntent = PendingIntent .getActivity (this , 0 , intentNew , 0 );
111+ PendingIntent pendingIntent = PendingIntent .getActivity (this , 0 , intentNew ,
112+ PendingIntentUtils .getPendingIntentMutableFlag ());
109113 IntentFilter [] intentFilter = new IntentFilter []{
110114 new IntentFilter (NfcAdapter .ACTION_NDEF_DISCOVERED ),
111115 new IntentFilter (NfcAdapter .ACTION_TAG_DISCOVERED ),
You can’t perform that action at this time.
0 commit comments