Android examples for Android OS:Bundle
unpack Bundle to Serializable
import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import java.io.Serializable; public class Main{ @Nullable/* w w w. java2s.c o m*/ public static Serializable unpack(@NonNull final Bundle bundle, @NonNull final String key) { if (!bundle.containsKey(key)) { LogHelper.warning("Bundle has no such key"); return null; } return bundle.getSerializable(key); } }