Identifying devices in sync routine. %UID% %DeviceID%

Discussions about CSEntry
Post Reply
jbthompson21
Posts: 18
Joined: April 2nd, 2015, 4:05 pm

Identifying devices in sync routine. %UID% %DeviceID%

Post by jbthompson21 »

Hi Everyone, I'm setting up a syn .PNC file to upload survey data results to dropbox. I've got everything working great but I've found that %UID% returns only the email name on which each tablet is logged in. The problem is that I've got 20 tablets and i have them all logged in under the same google and matched dropbox account for ease. This therefor makes all the %UID%'s the same which when looking doesn't give me a way to quickly tell which tablets and therefore enumerators have their data uploaded. Is there another phrase that I can use? I have tried %DeviceID% but although I thought I reset this, it's just giving me a long predetermined and, I believe unchangeable set of numbers and letters. Is there any way I can use the Device Name here or something else I can set without the hassle of individual email and dropbox accounts on each device?

Thanks!
josh
Posts: 2403
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Identifying devices in sync routine. %UID% %DeviceID%

Post by josh »

The %UID% comes from the gmail address that is used to set up the Android device so if you use the same gmail on all your devices this will not be helpful. It is easy enough to change the gmail address of a device once it has been set up in the settings without resetting the whole and device and doing the setup again.

The %DeviceID% will use the Android ID of the device which is a long and ugly string that is generated by Android when the device is first set up. Is unique for each device and will not change unless you do a factory reset of the device. You cannot change this. If you use the %DeviceID% then you need to maintain a spreadsheet or something that matches the DeviceId with the name of the enumerator.
jbthompson21
Posts: 18
Joined: April 2nd, 2015, 4:05 pm

Re: Identifying devices in sync routine. %UID% %DeviceID%

Post by jbthompson21 »

Great! Thanks for the help! I think i'm just going to redo the gmail accounts, seems to be the easiest way forward.
Sigma
Posts: 17
Joined: March 18th, 2015, 7:12 am

Re: Identifying devices in sync routine. %UID% %DeviceID%

Post by Sigma »

Is there a way to save UID and DEVICEID into datafile?
josh
Posts: 2403
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Identifying devices in sync routine. %UID% %DeviceID%

Post by josh »

You can access them from logic using the functions getdeviceid() and getusername(). To get them into the data file create alpha variables in your dictionary and assign the return values of those functions to the dictionary variables.
Sigma
Posts: 17
Joined: March 18th, 2015, 7:12 am

Re: Identifying devices in sync routine. %UID% %DeviceID%

Post by Sigma »

Thanks! That's what I was looking for :)
Post Reply