问题
In Android, how to check programatically which secure element settings is selected in NFC Advanced Settings (SIM or eSE or HCE) ?
回答1:
If you want the user to change it you can make it programmatically using this piece of code :
Intent intent = new Intent();
String mPackage = "com.android.settings";
String mClass = ".nfc.NfcAdvancedRoutingSetting";
intent.setComponent(new ComponentName(mPackage,mPackage+mClass));
startActivity(intent);
I'm still searching for a way to check which one is activated.
回答2:
One of the Android documentation have is,
https://developer.android.com/reference/android/nfc/NfcAdapter#EXTRA_SECURE_ELEMENT_NAME
looks like its possible to get Secure Element name.
来源:https://stackoverflow.com/questions/28758539/in-android-how-to-check-programatically-which-secure-element-settings-is-select