title: How to resolve error "non static method 'getDeviceId()' cannot be referenced by static context"
body: <p>I'm trying to get Device Id in following code</p>
  
  <pre><code>    public String getDevId() {
          String devId=android.telephony.TelephonyManager.getDeviceId();
          return devId;
      }
  </code></pre>
  
  <p>But it is saying "non static method 'getDeviceId()' cannot be referenced by static context"</p>