Search code examples
androidnfc

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


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


Solution

  • 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.