0

I have an application that work on mobile devices in offline mode, then the data sent to server later on.

Currently i'm using Timestamp as Table id, to generate unique id between mobiles devices. every thing was working fine until i got 2 different records from 2 different devices with same ID (timestamp).

*******the mobile app is and android application

the time stamp is generate using Calendar.getInstance().getTimeInMillis()

how can i get a unique id by mobile device knowing that i have i huge number of class/entities that use the same logic

mLamaa
  • 455
  • 1
  • 4
  • 9
  • See [Is there UID datatype in SQLITE if Yes then how to generate value for that](http://stackoverflow.com/q/10104662/11654) – CL. Feb 19 '16 at 08:27
  • How about adding an uniquie device-id ? See http://stackoverflow.com/questions/2785485/is-there-a-unique-android-device-id/2785493#2785493 – momo Feb 19 '16 at 10:55
  • Thx for these approach but i'm using GreenDAO as ORM, so i can't use the UID data type – mLamaa Feb 19 '16 at 10:59

0 Answers0