get Long from Bundle, return null if not found - Android android.os

Android examples for android.os:Bundle

Description

get Long from Bundle, return null if not found

Demo Code

import android.os.Bundle;
import android.text.TextUtils;
import java.io.Serializable;

public class Main{

    public static Long getLong(Bundle arguments, String key) {
        if (arguments.containsKey(key)) {
            return arguments.getLong(key);
        } else {/*  w w  w. j  a v a2s  . c  om*/
            return null;
        }
    }


}

Related Tutorials