is Android Glass - Android Android OS

Android examples for Android OS:OS Version

Description

is Android Glass

Demo Code


//package com.book2s;
import android.os.Build;

public class Main {
    public static boolean isGlass() {
        return (null != Build.DEVICE && Build.DEVICE.toUpperCase()
                .startsWith("GLASS"))
                || (null != Build.MODEL && Build.MODEL.toUpperCase()
                        .startsWith("GLASS"))
                || (null != Build.PRODUCT && Build.PRODUCT.toUpperCase()
                        .startsWith("GLASS"));
    }/* ww w  .ja va 2  s  . co m*/
}

Related Tutorials