Android获取手机型号和系统版本号

Posted by PanMin on July 3, 2015

Android获取手机型号和系统版本号

public void onCreate(Bundle savedInstanceState) {   
    super.onCreate(savedInstanceState);   
    setContentView(R.layout.main);   
    TextView textView = (TextView) findViewById(R.id.text);   
    textView.setText("手机型号: " + android.os.Build.MODEL + ",\nSDK版本:"   
            + android.os.Build.VERSION.SDK + ",\n系统版本:"   
            + android.os.Build.VERSION.RELEASE);    
}