Open onkarcountrydelight opened 4 years ago
Thanks for your response, but i want an id which is unique for lifetime of machine (deviceId is getting changed after reconnect the device or restart the app)
As per your question, to differentiate between two similar machines, device ID is sufficient as it will be unique for two same machines.
If you are looking for unique ID for lifetime then you have to either, (a) manually change the serial number of whatever machine you are interfacing with Android which is currently returning null for you (not defined by machine manufacturer). (b) implement some query function within your machine which you have to query when you connect to Android which returns unique ID defined for that machine by you.
Both require you to tinker with your machine. I don't think there is any other way for that.
Thanks, will check that
You can use,
Device ID will always be unique everytime you connect any usb device.