赞
踩
通过apk包名启动一个activity 完整api 接口:
private void openApplication(Context context,String packageName) {
PackageInfo pi = null;
try {
pi = context.getPackageManager().getPackageInfo(packageName, 0);
} catch (NameNotFoundException e) {
pi = null;
e.printStackTrace();
}
if (pi == null) {
} else {
Intent resolveIntent = new Intent(Intent.ACTION_MAIN, null);
resolveIntent.setPackage(pi.packageName);
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。