我设置了一个前台调度,例如:
mAdapter = NfcAdapter.getDefaultAdapter(this);
mPendingIntent = PendingIntent.getActivity(this, 0, new Intent(this,
getClass()).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP), 0);
mFilters = new IntentFilter[] { new IntentFilter(
NfcAdapter.ACTION_TECH_DISCOVERED) };
// Setup a tech list for all NfcF tags
mTechLists = new String[][] { new String[] { MifareClassic.class
.getName() } };
我有:
@Override
public void onResume() {
super.onResume();
mAdapter.enableForegroundDispatch(this, mPendingIntent, mFilters,
mTechLists);
}
但是当屏幕旋转前台调度停止调用 public void onNewIntent(Intent intent)。
我做错了什么?