查看官方文档,发现这样可以通过packageName获取应用入口的方法:

public abstract Intent getLaunchIntentForPackage (String packageName)

英文原文:Return a “good” intent to launch a front-door activity in a package, for use for example to implement an “open” button when browsing through packages.

返回一个程序入口的Intent,直接startActivity(返回的intent)即可。代码:

PackageManager pm = context.getPackageManager(); Intent intent=pm.getLaunchIntentForPackage(Config.WLANDIALER_PKG_NAME); intent.setAction(Intent.ACTION_VIEW); context.startActivity(intent);




更多相关文章

  1. Android(安卓)Action静态广播收不到(系统版本8.0)
  2. Cocos2d-x3.0 捕捉Android的菜单键和返回键
  3. Android真机调试 Android.Util.AndroidRuntimeException: You ca
  4. [转] How to clear cookies and cache of webview on Android(安
  5. android 一个app启动另一个App的几种方法
  6. android source code online
  7. Android(安卓)程序中哪个 Activity 最先运行
  8. 【NFC】Android(安卓)NFC API Reference中英文
  9. android 通过uri启动Activity

随机推荐

  1. Android入门教程(三)之------导入现有And
  2. Android历史版本及和eclipse基本区别
  3. Android(安卓)ADB
  4. 诚聘Android开发工程师
  5. android的selector背景选择器
  6. android之声音管理器AudioManager的使用
  7. Android规范详解
  8. 浅谈Android的Rotation动画的应用
  9. Android(安卓)文件格式
  10. Android的权限控制机制