How to find that the device is Galaxy Note programmatically?

advertisements

I would like to find whether the given running device is Galaxy Note programmatically. How can I do this, kindly help me with a snippet to find it.


In order to get android device name you have to add only a single line of code:

android.os.Build.MODEL;

Copy and paste the following code in your projects onCreate():

super.onCreate(savedInstanceState);
setContentView(R.layout.main);
TextView tv1 = (TextView) findViewById(R.id.tv1);
String str = android.os.Build.MODEL;
tv1.setText(str);