[Solved] How to resolve error “non static method ‘getDeviceId()’ cannot be referenced by static context” [duplicate]

[ad_1]

public String getDeviceId(Context context){
    TelephonyManager telephonyManager = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
      return telephonyManager.getDeviceId();
}

4

[ad_2]

solved How to resolve error “non static method ‘getDeviceId()’ cannot be referenced by static context” [duplicate]