I have an Android application running on different devices. The application is basically used by different coffee factories to measure and store these weights. However, I have noted that having my devices simultaneously syncing the stored weights to the cloud causes the app to fail and at times crash. I am interested in understanding the following;
How can I uniquely identify each device? I am using CS30 PoS system (Android 10.0) so my command:
val android_device_id = Settings.Secure.getString(ContentResolver, Settings.Secure.ANDROID_ID)
returns a null
How do I avoid the data overload during transmission? Is there anyway I can set up my API endpoint rather than having to separate each device and assigning it to its own endpoint.
val android_device_id = Settings.Secure.getString(ContentResolver, Settings.Secure.ANDROID_ID)
This returns a null
I have also tried using timestamps in the data sent by each device