Home > DeveloperSection > Forums > How to detect if device support EAP-SIM
sandy taylor
sandy taylor

Total Post:46

Points:324
Posted on    January-23-2015 10:10 PM

 Mobile Development Android  Java 
Ratings:


 1 Reply(s)
 590  View(s)
Rate this:
For my application, I need to detect if my device support EAP-SIM. Anyone knows if this is possible or not? Thanks in advance.


Monaj Singh
Monaj Singh

Total Post:41

Points:287
Posted on    January-23-2015 10:29 PM

Ok, finally i get the solution for my problem:

  • If anyone is interested:

public static boolean isEAPSIMSupported(){

ActivityManager manager = (ActivityManager) mContext.getSystemService(Context.ACTIVITY_SERVICE);

    for (ActivityManager.RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {

        if ("org.simalliance.openmobileapi.service.SmartcardService".equals(service.service.getClassName())) {

            Log.i(WifiHelper.class, "EAP-SIM Supported");

            return true;

        }

    }

    Log.i(WifiHelper.class, "EAP-SIM not Supported");

    return false; }


Thanks


Modified On Apr-20-2016 02:22:46 AM

Don't want to miss updates? Please click the below button!

Follow MindStick