You can figure out your android app is running on which OS Build, Product, Device etc. by using the android.os.Build class.
Eg: You can detect if your app is running on google glass(API 19) like this:
if(Build.VERSION.SDK_INT==Build.VERSION_CODES.KITKAT){
Log.e("SDK_INT",""+Build.VERSION.SDK_INT);
Log.e("MODEL",""+Build.MODEL);
Log.e("DEVICE",""+Build.DEVICE);
Log.e("TYPE",""+Build.TYPE);
Log.e("HARDWARE",""+Build.HARDWARE);
Log.e("BRAND",""+Build.BRAND);
Log.e("DISPLAY",""+Build.DISPLAY);
Log.e("MANUFACTURER",""+Build.MANUFACTURER);
Log.e("PRODUCT",""+Build.PRODUCT);
if (isGlass()){
Log.e("isGlass","True");
}
} else {
Log.e("Other",""+Build.VERSION.SDK_INT);
}
boolean isGlass(){return"Google".equalsIgnoreCase(Build.MANUFACTURER)&&Build.MODEL.startsWith("Glass");
}
Log Results
09-13 17:58:42.835 24240-24240/com.example.myxlab.beyondartest E/SDK_INT: 19
09-13 17:58:42.835 24240-24240/com.example.myxlab.beyondartest E/MODEL: Glass 1
09-13 17:58:42.835 24240-24240/com.example.myxlab.beyondartest E/DEVICE: glass-1
Similarly, for watches (API KITKAT_WATCH = 20).