List of usage examples for android.content Context startActivity
public abstract void startActivity(@RequiresPermission Intent intent);
From source file:Main.java
public static void openBrowser(Context context, String url) { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); context.startActivity(intent); }
From source file:Main.java
public static void ActivitySkip(Context context, Class<?> toClass) { Intent intent = new Intent(); intent.setClass(context, toClass);//w ww. j a v a 2 s . c o m context.startActivity(intent); }
From source file:Main.java
public static void call(Context context, String phone) { Intent callIntent = new Intent(Intent.ACTION_DIAL, Uri.parse("tel:" + phone)); context.startActivity(callIntent); }
From source file:Main.java
public static void OpenApp(Context context, String pkName) { Intent intent = context.getPackageManager().getLaunchIntentForPackage(pkName); context.startActivity(intent); }
From source file:Main.java
public static void openURL(Context context, String url) { Intent i = new Intent(Intent.ACTION_VIEW).setData(Uri.parse(url)); context.startActivity(i); }
From source file:Main.java
public static void Go(Context context, Class<?> class1) { Intent intent = new Intent(); intent.setClass(context, class1); context.startActivity(intent); }
From source file:Main.java
public static void goPage(Context context, Class<?> gopage) { Intent intent = new Intent(context, gopage); context.startActivity(intent); }
From source file:Main.java
public static void openKindleApp(Context context) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse("kindle:")); context.startActivity(intent); }
From source file:Main.java
public static void startActivity(Context context, Class clzz) { if (context != null) { Intent intent = new Intent(context, clzz); context.startActivity(intent); }/*from w ww .j a v a2 s. c om*/ }
From source file:Main.java
public static void startIntent(Context context, Intent intent) { boolean b = isIntentExist(context, intent); if (b) {//from w ww . j a va 2 s. co m context.startActivity(intent); } }