copy Extras to Intent - Android Intent

Android examples for Intent:Intent Bundle

Description

copy Extras to Intent

Demo Code


//package com.book2s;
import android.content.Intent;
import android.os.Bundle;

public class Main {
    public static Bundle copyExtras(Intent i) {
        Bundle copy = new Bundle();
        Bundle original = i.getExtras();
        if (original != null) {
            copy.putAll(original);//from ww  w .  j  ava 2 s  .  c  o m
        }
        return copy;

    }
}

Related Tutorials