Select the "READ_PHONE_STATE" from the AndroidManifest.xml file.
Add the below given codes for respective features.
- Android.Telephony.TelephonyManager mTelephonyMgr;
-
- mTelephonyMgr = (Android.Telephony.TelephonyManager)GetSystemService(TelephonyService);
- var PhoneNumber = mTelephonyMgr.Line1Number;
-
-
- String m_deviceId = mTelephonyMgr.DeviceId;
-
-
- String m_androidId = Android.Provider.Settings.Secure.GetString(ContentResolver, Android.Provider.Settings.Secure.AndroidId);
-
-
- Android.Net.Wifi.WifiManager m_wm = (Android.Net.Wifi.WifiManager)GetSystemService(Android.Content.Context.WifiService);
- String m_wlanMacAdd = m_wm.ConnectionInfo.MacAddress;
-
-
- Android.Bluetooth.BluetoothAdapter m_BluetoothAdapter = Android.Bluetooth.BluetoothAdapter.DefaultAdapter;
- String m_bluetoothAdd = m_BluetoothAdapter.Address;
Note: Some of the features will not be available from some devices due to security issues and terms and conditions of the manufacturer.