Using a number of devices to send data to a single API endpoint

20 views Asked by At

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;

  1. 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

  2. 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

0

There are 0 answers