copy Extras from Intent's Bundle - Android android.os

Android examples for android.os:Bundle

Description

copy Extras from Intent's Bundle

Demo Code

import android.content.Intent;
import android.os.Bundle;
import java.util.ArrayList;

public class Main{

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

    }

}

Related Tutorials