List of OMAPI supported devices

回眸只為那壹抹淺笑 提交于 2019-11-29 02:39:00

I'm not aware of any complete list. However, there is a not so comprehensive one in our report Open Mobile API: Accessing the UICC on Android Devices and there is another one (though now unmaintained) in the SEEK-for-Android Wiki.

If you have access to each of the devices you are interested in, you could, of cource, check if the smartcard system service is available on them:

final String SMARTCARD_SERVICE_PACKAGE = "org.simalliance.openmobileapi.service";
try {
    PackageInfo pi = getPackageManager().getPackageInfo(SMARTCARD_SERVICE_PACKAGE, 0);
    // smartcard service present
} catch (PackageManager.NameNotFoundException ex) {
    // smartcard service NOT present
}

Or you could simply create an app that declares to require the Open Mobile API library by adding the following uses-library entry to its AndroidManifest.xml:

<uses-library android:name="org.simalliance.openmobileapi" android:required="true" />

If that app can be installed on a device, this indicates that the device contains the Open Mobile API library.

This may also be a way to obtain a more comprehensive list of supported devices: You could create such an app and publish it on Google Play. Google Play will filter based on <uses-library /> entries that have the required attribute set to true (android:required="true"); see also <uses-library> and Filters on Google Play. This means, that once you uploaded such an app to Google Play, you should be able to get a list of suuported devices that essentially matches all devices that have the Open Mobile API library available on them.

While @Michael Roland response still stands, it's also worth noting that since Android 9 Pie, Open Mobile API is part of the Android.

So for API level 28 and higher, every phone has OMAPI by default and there is no need for explicit check.

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