title: Detecting whether Android device is a phone or a tablet using code
body: <p>I did one application for both mobile and Tablet. Here I want visible few of my contents on Mobile but not in Tablet.</p>
  
  <p>How can I Detect whether Android device is a phone or a tablet while launching my activity.</p>
  
  <p>I Google and find out few suggestions like User -agent..
  How can I use it or any other solutions??</p>
  
  <p>Thanks in advance...</p>