[英]Loading Existing Android App in mobile by clicking button
I have developed a small Android app by using jquery mobile. 我通过使用jquery mobile开发了一个小型Android应用程序。 In that jquery mobile app i am using a button to open my another native android app. 在那个jQuery移动应用程序中,我使用一个按钮来打开另一个本机Android应用程序。 Is it possible if i click on jquery mobile app button to load/open native android app which is already install in mobile and working fine ? 如果我单击jquery移动应用程序按钮加载/打开已经安装在移动设备中并且可以正常工作的本机android应用程序,是否可以?
Please help me to provide any script for this. 请帮助我为此提供任何脚本。 Thanks. 谢谢。
Intent i;
PackageManager manager = getPackageManager();
try {
i = manager.getLaunchIntentForPackage("app package name");
if (i == null)
throw new PackageManager.NameNotFoundException();
i.addCategory(Intent.CATEGORY_LAUNCHER);
startActivity(i);
} catch (PackageManager.NameNotFoundException e) {
}
Link : Open another application from your own (intent) 链接: 从您自己的意图打开另一个应用程序
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.