[Interest] [Android] Qt machine unique id
godboutj at amotus.ca
Wed Oct 10 18:39:02 CEST 2018
Thanks for the tips guys,
Yeah, we want to avoid problems where the local settings get corrupted and
the user can use multiple device to capture and for tracking purpose (this
is inspection requirements, I need to known which device was used for the
inspection). So I need to be able to identify which device was used and if
the central have banish that device (therefore the reinstalling should not
change this since it was ban server side wise). So the local UUID and 1st
time, I wish I could avoid since deleting local storage for an application
to loose the QSettings is pretty easy and I won't do what I want.
For iOS, it was for future support, since I don't need it right now and
maybe never but if I can make it cross platform agnostic that would be
better but not essential.
Maybe the MAC address of a particular interface could do the trick.
On Wed, 10 Oct 2018 at 10:07, Jason H <jhihn at gmx.com> wrote:
> 1. It'll never work on iOS. To get a device id for iOS you need to plug it
> in and use libimobiledevice, which can get that information.
> 2. I think you have a bad idea. Sometimes, reinstalling is the only way to
> fix some issues, like a corrpupted* application database. Removing that
> ability wil lshoot yourself in the foot.
> 3. On android you could get a device id, but I always used a
> generated-1-time guid. I'm not sure what the status is on the android
> device identifier though. That's a stack exchange question.
> 4. Your application directory is perserved across updates.
> 5. Regardless, I don't think QSysInfo::machineUniqueId() is what you want.
> Reading the docs, it looks like a implementation of my GUID strategy. But
> having jsut run this on iOS, returns an empty string "If no unique ID could
> be determined, this function returns an empty byte array."
> *Corrupted SQLITE databases get deleted on Android, this would have to be
> a application-level corruption.
> Perhaps what you want is all the user data server side and not rely on the
> device? What is the behavior if the user has more than one device?
> *Sent:* Wednesday, October 10, 2018 at 9:38 AM
> *From:* "Jérôme Godbout" <godboutj at amotus.ca>
> *To:* "Qt Interest" <interest at qt-project.org>
> *Subject:* [Interest] [Android] Qt machine unique id
> what is the best way to identify a device even if os is updated or factory
> reset, etc?
> My use case is the following:
> 1. The user is used to identify itself and log in (security is managed
> with a secure connection to server from the application).
> 2. I have some settings and device history on the server and I would
> like to tell the server the user is using which of his device
> automatically. I wish I would have this identification persistent over
> application update and reinstall.
> 3. id persistent from factory reset might not be necessary.
> 4. I would like it to work on Android, if possible on iOS too (iOS is
> not mandatory).
> I was looking at QSysInfo::machineUniqueId(), but I'm not sure it will fit
> the bill, anyone have a good way to do this?
> RAPPROCHEZ LA DISTANCE
> *Jérôme Godbout*
> Senior Software Developer
> *p:* +1 (418) 800-1073 ext.:109
> *m:* +1 (581) 777-0050
> amotus.ca <http://www.amotus-solutions.com/>
> _______________________________________________ Interest mailing list
> Interest at qt-project.org
RAPPROCHEZ LA DISTANCE
*Jérôme Godbout*Senior Software Developer
*p:* +1 (418) 800-1073 ext.:109
*m:* +1 (581) 777-0050
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Interest