title: Fetching DeviceId through TelephonyManager in Xamarin.Android
body: <pre><code>public string GetIdentifier()
          {
  
              Android.Telephony.TelephonyManager mTelephonyMgr;
              mTelephonyMgr = (Android.Telephony.TelephonyManager)Forms.Context.GetSystemService(Forms.Context.TELEPHONY_SERVICE);
              return mTelephonyMgr.DeviceId;
          }
  </code></pre>
  
  <p>Trying to get DeviceId through above code but TELEPHONY_SERVICE is giving compile time error in Visual Studio(Xamarin +Android).How to correct this? 
  Please see the image attached for reference.<a href="http://i.stack.imgur.com/OupHU.png" rel="nofollow">ErrorImage</a></p>