您的位置:首页 > 移动开发 > Android开发

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

2017-03-26 17:04 309 查看
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 获取手机型号
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐