In Android, how to check programatically which secure element settings is selected in NFC Advanced Settings (SIM or eSE or HCE)?

自古美人都是妖i 提交于 2021-01-07 08:10:45

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!