Intent removeExtra - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Intent removeExtra method.

This code example shows how to use the following methods:getExtras, putExtra, removeExtra
    context.startActivity(intent);
  } 
 
  @Override 
  public void onReceive(Context context, Intent intent) {
    String phoneNumber        = intent.getExtras().getString(INTENT_PHONE_NUMBER);
    NumberFilter numberFilter = NumberFilter.deserializeFromFile(context);
 
    if( phoneNumber == null )
      return; 
 
    if (phoneNumber.endsWith(IGNORE_SUFFIX)) {
      phoneNumber = phoneNumber.substring(0, phoneNumber.length() - IGNORE_SUFFIX.length());
      intent.removeExtra(INTENT_PHONE_NUMBER);
      intent.removeExtra("android.phone.extra.ORIGINAL_URI");
 
      intent.putExtra(INTENT_PHONE_NUMBER, phoneNumber);
      intent.putExtra("android.phone.extra.ORIGINAL_URI", "tel:" + Uri.encode(phoneNumber));
 
      setResultData(phoneNumber);

10
CodeRank
This code example shows how to use the following methods:putExtra, removeExtra
 
	} 
 
	@Override 
	public void fiIntent() { 
		inCleanBackup.removeExtra("operating");
		inCleanBackup.putExtra("operating", false);
	} 
 
	@Override 
	public Intent getSendIntent() {
		return inCleanBackup;
	} 
 
	@Override 
	public void doOperation(String command, Notification n) {
		ApkUtils.deleteAllBackupData(); 
	} 
 
	@Override 
6
CodeRank
This code example shows how to use the following methods:putExtras, removeExtra
 
	/** 
	 * Converts a fragment arguments bundle into an intent. 
	 */ 
	public static Intent fragmentArgumentsToIntent(Bundle arguments) {
		Intent intent = new Intent();
		if (arguments == null) {
			return intent;
		} 
 
		final Uri data = arguments.getParcelable("_uri");
		if (data != null) {
			intent.setData(data);
		} 
 
		intent.putExtras(arguments);
		intent.removeExtra("_uri");
		return intent;
	} 
 

7
CodeRank

Related Intent removeExtra Questions & Answers:

removeExtra Method Overview
Remove extended data from the intent.
See Code Examples for other Android Intent Methods: