Android examples for android.system:Os Version
is Galaxy S2
import android.os.Build; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; public class Main{ public static boolean isGalaxyS2() { try {//from ww w . j av a2 s . c om String toLowerCase = Build.MODEL.toLowerCase(); boolean result = toLowerCase.contains("gt-i9100") || toLowerCase.contains("gt-i9108") || toLowerCase.contains("gt-i9103"); return result; } catch (Exception e) { e.printStackTrace(); return false; } } }