我希望我的应用程序打开 sim 卡工具包,以便用户可以通过 sim 工具包应用程序中提供的移动设备进行支付 请帮助
问问题
4096 次
2 回答
2
像这样的东西会在某些设备上启动它:
Intent simToolKitLaunchIntent = getContext().getPackageManager().getLaunchIntentForPackage("com.android.stk");
if(simToolKitLaunchIntent != null) {
startActivity(simToolKitLaunchIntent);
}
于 2017-10-04T22:22:21.887 回答
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();
}
}
});
于 2021-10-30T09:40:18.813 回答