分类: 嵌入式
2011-10-26 09:31:17
- 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.Build.VERSION.RELEASE获取版本号
android.os.Build.MODEL 获取手机型号