List of usage examples for android.content Context startActivity
public abstract void startActivity(@RequiresPermission Intent intent);
From source file:Main.java
public static void runApp(Context context, String packageName) { context.startActivity(new Intent(context.getPackageManager().getLaunchIntentForPackage(packageName))); }
From source file:Main.java
public static void startActivity(Context activity, Class clazz) { activity.startActivity(new Intent(activity, clazz)); }
From source file:Main.java
public static void goOtherActivityFinishNoAnim(Context context, Class<?> cls) { context.startActivity(new Intent(context, cls)); ((Activity) context).finish();/*from w w w. jav a 2s . com*/ ((Activity) context).overridePendingTransition(0, 0); }
From source file:Main.java
public static void call(Context context, String phoneNumber) { context.startActivity(new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phoneNumber))); }
From source file:Main.java
public static void callDial(Context context, String phoneNumber) { context.startActivity(new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" + phoneNumber))); }
From source file:Main.java
/** will start an activity, given the class object of the activity */ public static void startActivity(Context ctx, Class c) { ctx.startActivity(new Intent(ctx, c)); }
From source file:Main.java
public static void addAndroidUserAccount(Context context) { context.startActivity(new Intent(Settings.ACTION_ADD_ACCOUNT)); }
From source file:Main.java
public static void openApp(Context paramContext, String paramString) { paramContext.startActivity(paramContext.getPackageManager().getLaunchIntentForPackage(paramString)); }
From source file:Main.java
public static void callPhone(Context context, String phoneNumber) { context.startActivity(new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + phoneNumber))); }
From source file:Main.java
public static void dial(Context context, String phoneNumber) { context.startActivity(new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" + phoneNumber))); }