摘要:
功能:实现在apk1中启动apk2 Intent mIntent = new Intent( ); ComponentName comp = new ComponentName("包名","类名"); mIntent.setComponent(comp); mIntent.setAction("android.intent.action.VIEW"); startActivity(mIntent); 阅读全文
摘要:
1.对包名的判断,异常则说明不存在: try { PackageManager pm = getPackageManager(); pm.getPackageInfo("com.org", PackageManager.GET_ACTIVITIES); } catch (NameNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); }2.对类名的判断,异常则说明不存在: try { Class.forName("com.org.MainActivity");} c 阅读全文