Example usage for android.content Intent putExtras

List of usage examples for android.content Intent putExtras

Introduction

In this page you can find the example usage for android.content Intent putExtras.

Prototype

public @NonNull Intent putExtras(@NonNull Bundle extras) 

Source Link

Document

Add a set of extended data to the intent.

Usage

From source file:Main.java

public static Intent getBundleIntent(Bundle bundle) {
    Intent intent = new Intent();
    intent.putExtras(bundle);
    return intent;
}

From source file:Main.java

public static void startActivity(Context from, Class<?> to, Bundle data) {
    Intent i = new Intent(from, to);
    i.putExtras(data);
    from.startActivity(i);//  w  ww  .j  ava  2  s .  co  m
}

From source file:Main.java

public static void send(Context context, Intent intent, Bundle bundle) {
    intent.putExtras(bundle);

    context.sendBroadcast(intent);
}

From source file:Main.java

public static Intent returnIntent_WithObject(Activity activity, Bundle bundle) {
    Intent returnIntent = new Intent();
    returnIntent.putExtras(bundle);
    activity.setResult(Activity.RESULT_OK, returnIntent);
    return returnIntent;
}

From source file:Main.java

public static void enterActivityWithBundle(Activity activity, Class clz, Bundle bundle) {
    Intent intent = new Intent(activity, clz);
    intent.putExtras(bundle);
    activity.startActivity(intent);/*from   ww w  . j  a v a  2 s . c o m*/
}

From source file:Main.java

public static void goActivityForResultWithBundle(Activity activity, Class clazz, Bundle bundle, int requestID) {
    Intent intent = new Intent(activity, clazz);
    intent.putExtras(bundle);
    activity.startActivityForResult(intent, requestID);
}

From source file:Main.java

public static void startActivityForBundleData(Context act, Class<?> cls, Bundle bundle) {
    Intent intent = new Intent(act, cls);
    intent.putExtras(bundle);
    act.startActivity(intent);/*from   w  w w  . j a v  a2s  .  c o  m*/
}

From source file:Main.java

public static void skipActivity(Context context, Class<?> goal, Bundle bundle) {
    Intent intent = new Intent(context, goal);
    intent.putExtras(bundle);
    context.startActivity(intent);//  w w w .  j  a  v a 2  s .c o m
}

From source file:Main.java

/**
 * Activity Not Finish Jump with Bundle//from   w ww.  ja  v  a2 s . co  m
 */
public static void gotoActivityNotFinishWithBundle(Context context, Class<?> actClass, Bundle bundle) {
    Intent intent = new Intent(context, actClass);
    intent.putExtras(bundle);
    context.startActivity(intent);
}

From source file:Main.java

/**
 * Activity Not Finish Jump//  w w  w  . j  av  a  2 s .c  om
 */
public static void gotoActivityNotFinishWithExtras(Context context, Class<?> actClass, Bundle bundle) {
    Intent intent = new Intent(context, actClass);
    intent.putExtras(bundle);
    intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    context.startActivity(intent);
}