I want my app to open sim card toolkit so that a user can make payments via mobile provided in the sim toolkit application Please help
Asked
Active
Viewed 4,491 times
1
-
possible duplicate of [Android STK Menu using APK](http://stackoverflow.com/questions/9227732/android-stk-menu-using-apk) – user1725145 Jun 11 '15 at 11:38
2 Answers
3
Something like this will launch it on some devices:
Intent simToolKitLaunchIntent = getContext().getPackageManager().getLaunchIntentForPackage("com.android.stk");
if(simToolKitLaunchIntent != null) {
startActivity(simToolKitLaunchIntent);
}

rrbrambley
- 513
- 5
- 15
-
And what if i want to open a dialogue that overlays the sim-toolkit. Like for instance to give the user directions on how to perform certain actions – clifford_owino Oct 29 '18 at 11:26
0
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = getApplicationContext().getPackageManager().getLaunchIntentForPackage("com.android.stk");
if (intent != null){
startActivity(intent);
}else {
Toast.makeText(getApplicationContext(),"NO SIM CARD FOUND",Toast.LENGTH_LONG).show();
}
}
});

El-rains
- 11
- 3
-
Please try this it will work fine... Also please note if the device will have no SIM CARD the Toast will be displayed. My English though (*_*) – El-rains Oct 30 '21 at 10:05