Android examples for android.os:Bundle
Convert Bundle To Map
import android.os.Bundle; import java.io.Serializable; import java.util.HashMap; import java.util.Map; public class Main{ public static Map<String, Serializable> bundleToMap(Bundle bundle) { Map<String, Serializable> result = new HashMap<String, Serializable>(); if (bundle == null) return result; for (String key : bundle.keySet()) { result.put(key, bundle.getSerializable(key)); }// ww w . j a v a 2s . c om return result; } }