public static void launch(Activity activity, RegionTypesInfo.DataBean dataBean) { Intent mIntent = new Intent(activity, RegionTypeDetailsActivity.class); Bundle bundle = new Bundle(); bundle.putParcelable(ConstantUtil.EXTRA_PARTITION, dataBean); mIntent.putExtras(bundle); activity.startActivity(mIntent); }
Bundle bridgeArguments = new Bundle(); bridgeArguments.putString(BRIDGE_ARG_ACTION_ID_STRING, callId); Utility.putNonEmptyString(bridgeArguments, BRIDGE_ARG_APP_NAME_STRING, applicationName); Bundle methodArguments = (params == null) ? new Bundle() : params; intent.putExtra(EXTRA_PROTOCOL_METHOD_ARGS, methodArguments); } else { intent.putExtra(EXTRA_APPLICATION_NAME, applicationName); intent.putExtras(params);
sendButton.setOnClickListener(new OnClickListener() { public void onClick(View v) { String valueString = editValue.getText().toString(); long value; if (valueString != null) { value = Long.parseLong(valueString); } else { value = 0; } Bundle sendBundle = new Bundle(); sendBundle.putLong("value", value); Intent i = new Intent(Activity1.this, Activity2.class); i.putExtras(sendBundle); startActivity(i); finish(); } });
@Override public void onBackPressed() { Intent data = new Intent(); Bundle bundle = new Bundle(); bundle.putParcelable("name", la); data.putExtras(bundle); if (getParent() == null) { setResult(Activity.RESULT_OK, data); } else { getParent().setResult(Activity.RESULT_OK, data); } super.onBackPressed(); }
private void sendSuggestionIntent(ResultItem item) { try { Intent sendIntent = new Intent(this, Class.forName(searchableActivity)); sendIntent.setAction(Intent.ACTION_VIEW); sendIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); Bundle b = new Bundle(); b.putParcelable(CustomSearchableConstants.CLICKED_RESULT_ITEM, item); sendIntent.putExtras(b); startActivity(sendIntent); finish(); } catch (ClassNotFoundException e) { e.printStackTrace(); } }
private void onCompleteWebFallbackDialog(Bundle values) { FragmentActivity fragmentActivity = getActivity(); Intent resultIntent = new Intent(); resultIntent.putExtras(values == null ? new Bundle() : values); fragmentActivity.setResult(Activity.RESULT_OK, resultIntent); fragmentActivity.finish(); } }