Closed janagombitova closed 7 years ago
I did a little digging into where this could happen.
The app starts 7 services
TimeCheckService ( /devicetimerest )
of which only 3 sends the app version to the back end:
Unlike userId, the app version is always available in the app, so there should be nothing different between first and subsequent calls.
But which of the API calls result in changes to the Device list in the backend? /surveymanager?action=getAvailableSurveysDevice does /surveymanager?action=getSurveyHeader does /locationBeacon does /devicenotification updates all device db fields from the request except app version. This is the problem.
While investigating this I also noticed that a second cause of the problem in #1731 is still around. The app DataSyncService also starts before deviceId is set, so it gets set to empty in the backend (for a while). See akvo/akvo-flow-mobile#484
Test plan: Install app on a device. It should never show up in the list without an app version.
👍 Implementation works like a charm for both new devices and also old timer dinosaurs :)
Currently once a device connects for the 1st time with the dashboard we do not show the version info (app version) right away in the Devices list. Once the app is closed and re-opened again the version number is shown in the dashboard.
Many partners who manage the data collection check the version number to see which phones have updated to the new app and the version can be useful in support cases as well (if a fix has beed released in a particular version, but the user is still running a older version of the app). It would be more handy if the version number is shown consistently.
More research needed to understand in what cases the version number is shown and when not.