0
如何启动已安装的应用程序?启动已安装的应用程序
我已经安装使用如下: File file = new File(dir,“App.apk”);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(file), "application/vnd.android.package-archive");
startActivity(intent);
第二次,我检查包是否已安装,如果是,我想启动。
Intent intent = new Intent(com.example.app);
感谢先进!
我试图启动一个已安装的应用程序,它可以是Facebook或Gtalk,我将无法获得class_name。我能够通过下面的代码启动:public void doLaunch(View caller){PackageSize packageManager = getPackageManager(); startActivity(packageManager.getLaunchIntentForPackage(“com.android.browser”)); } –
你想运行什么应用程序?你知道它先验吗?如果没有 - 使用意图与行动查看(或者其他一些行动),你可以提供一些数据。 –