Open menu of the Sim tool kit

4.6k views Asked by At

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

2

There are 2 answers

1
rrbrambley On

Something like this will launch it on some devices:

Intent simToolKitLaunchIntent = getContext().getPackageManager().getLaunchIntentForPackage("com.android.stk");
if(simToolKitLaunchIntent != null) {
    startActivity(simToolKitLaunchIntent);
}
1
El-rains On
 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();
            }
          
        }
    });