Wednesday 17 August 2011

Launching other app from my app

Launch other application of the device from your application:

Intent intent = getPackageManager().getLaunchIntentForPackage(packageName);
      intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
      intent.addFlags(Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
      if (null != intent) {
      try {
             startActivity(intent);
      } catch(Exception e) {  }
    }

Note: You need to know the package name to use the above code. For package name:


No comments:

Post a Comment