title: Alternative way removes security warning when using ANDROID_ID and how to get the device id?
body: <p>public static String getDeviceID(Context mContext) {</p>
  
  <pre><code>    String deviceId = Settings.Secure.getString(mContext.getContentResolver(),
              Settings.Secure.ANDROID_ID);
      return deviceId;
  }
  </code></pre>
  
  <p>This shows a security warning, </p>
  
  <p>"Using 'getString' to get device identifiers is not recommended "</p>
  
  <p>How to resolve this warning?</p>