Launch android app from Notification or the widget similar to the launch from app icon
private static PendingIntent getLaunchIntent(Context context) {
Intent target = new Intent(Intent.ACTION_MAIN); target.addCategory(Intent.CATEGORY_LAUNCHER); target.setComponent(new ComponentName(context.getPackageName(),
<YourRootActivityName>.class.getName())); PendingIntent intent = PendingIntent.getActivity(context, 0,target, 0); return intent;
}
Comments
Post a Comment