Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    private static final int MIN_SDK_VERSION = 18;

    public static boolean isSdkVersionValid() {
        int sdkVersion = 0;
        try {
            sdkVersion = Integer.valueOf(android.os.Build.VERSION.SDK);
        } catch (NumberFormatException e) {
        }
        if (sdkVersion <= MIN_SDK_VERSION)
            return false;
        else
            return true;
    }
}