-
Notifications
You must be signed in to change notification settings - Fork 63
RetrievingVersionInfo
DangChien edited this page Oct 9, 2015
·
2 revisions
Sometimes it is needed to know the SmartCard API version info.
This can be accomplished without bothering an SmartCard API function but using following method.
Following method retrieves the version info of the SmartCard API:
private String getScapiVersion() {
try {
PackageInfo packageInfo = getPackageManager().getPackageInfo("android.smartcard", 0);
return packageInfo.versionName;
} catch (PackageManager.NameNotFoundException e1) {
try {
PackageInfo packageInfo = getPackageManager().getPackageInfo("org.simalliance.openmobileapi.service", 0);
return packageInfo.versionName;
} catch (PackageManager.NameNotFoundException e2) {
try {
PackageInfo packageInfo = getPackageManager().getPackageInfo("com.sonyericsson.smartcard", 0);
return packageInfo.versionName;
} catch (PackageManager.NameNotFoundException e3) {
return "";
}
}
}
}
- Introduction
- How To
- Access Control
- UICC Support
- ASSD Support
- MSC Support
- PC/SC Interface
- Service Layer
- Applications
- FAQS
- Abbreviations
- Contributions