Android Intent Set getAppStartIntent(Context context)

Here you can find the source of getAppStartIntent(Context context)

Description

get App Start Intent

Declaration

public static final Intent getAppStartIntent(Context context) 

Method Source Code

//package com.java2s;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;

public class Main {
    public static final String PACKAGE_NAME = "org.c_base.c_beam";

    public static final Intent getAppStartIntent(Context context) {
        try {//from   w  ww. j  a  v  a 2  s.  c  o m
            PackageManager manager = context.getPackageManager();
            Intent intent = manager.getLaunchIntentForPackage(PACKAGE_NAME);
            intent.addCategory(Intent.CATEGORY_LAUNCHER);
            return intent;
        } catch (Exception e) {
            return null;
        }
    }
}

Related

  1. initIntentFilterFromXml(IntentFilter inf, XmlPullParser xpp)
  2. pushNotification(Context context, int notId, PendingIntent pIntent, int iconRID, String title, String summary, boolean autoCancel, boolean vibrate, boolean light, boolean sound)
  3. updateIntentExplicitness(Context context, Intent implicitIntent)
  4. dumpBundleKeys(Intent intent)
  5. setBlankContentIntent(Context context, NotificationCompat.Builder builder)
  6. setNewTaskFlag(@Nonnull Intent intent)
  7. createCallIntent(String phoneNumber)