Check if a Bundle object contains a value by key - Android android.os

Android examples for android.os:Bundle

Description

Check if a Bundle object contains a value by key

Demo Code

import android.os.Bundle;

public class Main{

    public static boolean contains(Bundle bundle, String key) {
        return (bundle != null && bundle.containsKey(key));
    }//from  w  w w. j a v a  2s  .c o  m

}

Related Tutorials