List of usage examples for android.content Intent putExtras
public @NonNull Intent putExtras(@NonNull Bundle extras)
From source file:Main.java
public static void startActivityForResult(Activity activity, Class class1, Bundle bundle, int i) { Intent intent = new Intent(activity, class1); intent.putExtras(bundle); activity.startActivityForResult(intent, i); }
From source file:Main.java
public static void startActivity(Context context, Class class1, Bundle bundle) { Intent intent = new Intent(context, class1); intent.putExtras(bundle); context.startActivity(intent);/* ww w. ja v a2 s. c om*/ }
From source file:Main.java
public static void sendBroadcast(Context context, String action, Bundle data) { Intent intent = new Intent(action); intent.putExtras(data); context.sendBroadcast(intent);// ww w. j ava 2 s. c om }
From source file:Main.java
public static void launchActivity(Context context, Class<?> activity, Bundle bundle) { Intent intent = new Intent(context, activity); intent.putExtras(bundle); intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION); context.startActivity(intent);/* w ww . j a v a 2 s . com*/ }
From source file:Main.java
public static Intent makeIntent(Context context, Class<?> classInstance, Bundle param) { Intent intent = new Intent(context, classInstance); intent.putExtras(param); return intent; }
From source file:Main.java
public static void backResult(Activity sourceActivity, int resultCode, Bundle bdl) { Intent intent = new Intent(); if (bdl != null) { intent.putExtras(bdl); }/*from w w w. ja v a2s.c o m*/ sourceActivity.setResult(resultCode, intent); }
From source file:Main.java
public static void jumpToResActivity(Context context, Class<?> cls, Bundle bundle, int requestCode) { Intent jumpIntent = new Intent(); if (bundle != null) jumpIntent.putExtras(bundle); jumpIntent.setClass(context, cls);/* w w w.jav a 2 s .c o m*/ ((Activity) context).startActivityForResult(jumpIntent, requestCode); }
From source file:Main.java
public static void jumpToActivity(Context context, Class<?> cls, Bundle bundle) { Intent jumpIntent = new Intent(); if (bundle != null) jumpIntent.putExtras(bundle); jumpIntent.setClass(context, cls);/*from www.j av a2 s. c o m*/ context.startActivity(jumpIntent); }
From source file:Main.java
public static void sendBroadCast(Context context, String action, Bundle extras) { Intent intent = new Intent(); intent.setAction(action);// w w w .ja v a2 s . c o m intent.putExtras(extras); LocalBroadcastManager.getInstance(context).sendBroadcast(intent); }
From source file:Main.java
public static void sendBroadcast(Context context, String action, Bundle bundle) { Intent intent = new Intent(action); if (bundle != null) { intent.putExtras(bundle); }//w w w .j a v a 2 s .c om context.sendBroadcast(intent); }