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

获取的方法是:

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
TextView textView = (TextView) findViewById(R.id.text);
textView.setText("Product Model: " + android.os.Build.MODEL + ","
+ android.os.Build.VERSION.SDK + ","
+ android.os.Build.VERSION.RELEASE);
}

你可能感兴趣的:(android,OS)