Launch an application from another application
1 2 3 4 5 6 7 8 9 10 | public void startNewActivity(Context context, String packageName) { Intent intent = context.getPackageManager().getLaunchIntentForPackage(packageName); if (intent == null ) { // Bring user to the market or let them choose an app? intent = new Intent(Intent.ACTION_VIEW); } intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(intent); } |