Read device info Android 8.1.0

P Paul Groenen 3 years 7 months ago
17 1 0

In one of our application we want to read and show specific device information:
actual ip address wlan
actual ip address ethernet (ethernet cradle)
serialnumber of device
modeltype of device (for example TC21, EC30, MC93, TC77)
What is the best or way to do this in the Android Xamarin application?

Please Register or Login to post a reply

1 Replies

D Darryn Campbell

For the serial number on Android 8 please use android.os.Build.getSerial() - you will need the READ_PHONE_STATE permission.  In Android 10 the instructions get a bit more complicated, https://developer.zebra.com/blog/access-serial-number-and-imei-mobile-co...
The device model is available under Build.MODEL, https://developer.android.com/reference/android/os/Build#MODEL
Those are the links to the Java APIs but the equivalent Xamarin APIs will exist.
The IP addresses are not available under Oreo I'm afraid.  
 

CONTACT
Can’t find what you’re looking for?