How can a chrome app. fetch a Chromebox identifier. I need a device identifier not a user identifier.
Asked
Active
Viewed 193 times
1 Answers
1
As far as I am aware, there is no way to get a device identifier from a Chrome app or extension. Your best option may be to generate and store a device token (though obviously that will not persist if the user erases your app's data or wipes the device). You may be able to use the example from https://stackoverflow.com/a/23854032/1917097 as a starting point.

Community
- 1
- 1

Zachary Yaro
- 196
- 12
-
I used this option already. But surprisingly some machines chrome.storage and wiped on just a reboot. – Nuha Khaled Jul 13 '15 at 18:13
-
I didn't want to use .sync too as it uses the gmail account not the device itself and I don't want users to be able to use the app on different devices. do you know why would data be wiped on reboot only? – Nuha Khaled Jul 13 '15 at 18:14
-
I have not encountered Chrome wiping `chrome.storage.local` on reboot for any of my devices, so I do not know what would cause that. The only possibility that comes to mind is your app [exceeding the storage quota](https://developer.chrome.com/apps/offline_storage#temporary) if you store a lot of other data. – Zachary Yaro Jul 13 '15 at 18:23
-
I only save a 5 char long string. – Nuha Khaled Jul 13 '15 at 18:26