List of usage examples for android.content Intent Intent
public Intent(Context packageContext, Class<?> cls)
From source file:Main.java
public static void openActivity(Context context, Class newActivity) { Intent intent = new Intent(context, newActivity); context.startActivity(intent);/*from www. j a v a 2 s . c o m*/ // intent.putExtra(SimpleBackActivity.BUNDLE_KEY_PAGE, page.getValue()); }
From source file:Main.java
public static void startActivity(Activity packageContext, Class<?> cls) { Intent intent = new Intent(packageContext, cls); packageContext.startActivity(intent); }
From source file:Main.java
public static Intent getPluginsIntent() { return new Intent(Intent.ACTION_VIEW, Uri.parse("http://plugins.announcify.com/")); // market://search?q=Announcify }
From source file:Main.java
public static void front(Context packageContext, Class<?> cls) { Intent intent = new Intent(packageContext, cls); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); packageContext.startActivity(intent); intent = null;//from w w w . j a v a2 s. c o m }
From source file:Main.java
public static void startWithoutFinish(Context context, Class clazz) { Intent intent = new Intent(context, clazz); context.startActivity(intent);//from www . j a v a2 s . c om }
From source file:Main.java
public static void launchService(Context context, Class<?> service) { Intent intent = new Intent(context, service); context.startService(intent);/* w w w . j av a 2s. c o m*/ }
From source file:Main.java
static void showDesktop(Context ctx) { Intent mHomeIntent;/*from w w w. ja va 2 s.c o m*/ mHomeIntent = new Intent(Intent.ACTION_MAIN, null); mHomeIntent.addCategory(Intent.CATEGORY_HOME); mHomeIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); ctx.startActivity(mHomeIntent); }
From source file:Main.java
public static void startActivity(Context context, Class newActivityClass) { Intent intent = new Intent(context, newActivityClass); context.startActivity(intent);//from ww w . j a va 2 s .c o m }
From source file:Main.java
public static void CloseActivity(Activity activity, Class<?> class1) { Intent intent = new Intent(activity, class1); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP); activity.startActivity(intent);/*from ww w .ja v a2s .co m*/ }
From source file:Main.java
public static void jumpAndId(Context context, Class cla, String nid) { Intent intent = new Intent(context, cla); intent.putExtra("nid", nid); context.startActivity(intent);// www .ja v a 2 s . c o m }