is API 9 Ginger Bread Or Later - Android Android OS

Android examples for Android OS:OS Version

Description

is API 9 Ginger Bread Or Later

Demo Code


//package com.book2s;

import android.os.Build;

public class Main {
    public static int FROYO = 8;

    public static final boolean isApi9_GingerBreadOrLater() {
        int sdk = getSDKVersion();
        return sdk >= FROYO;
    }//from  w  w  w .j a v a  2s  .co  m

    public static final int getSDKVersion() {
        return Build.VERSION.SDK_INT;
    }
}

Related Tutorials