如何检测设备是否支持EAP-SIM

时间:2014-12-23 13:14:08

标签: java android

对于我的应用程序,我需要检测我的设备是否支持EAP-SIM。 谁知道这是否可能? 提前谢谢。

1 个答案:

答案 0 :(得分:0)

好的,最后我得到了解决问题的方法:

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; 
}
相关问题