EyeSeeTea / pictureapp

Mobile application designed to report cases of malaria (to a DHIS2 server)
GNU General Public License v3.0
4 stars 4 forks source link

Maintenance push service crash android 8 #2414

Closed xurxodev closed 5 years ago

xurxodev commented 5 years ago

:pushpin: References

:tophat: What is the goal?

Fix push service bugs when the app is on the background.

:gear: branches

app: Origin: maintenance-push_service_crash_android_8 Target: v1.4_connect bugshaker-android: Origin: downgrade_gradle_version EyeSeeTea-sdk: Origin: Development

:memo: How is it being implemented?

From Android 8 background service has limitations and jobscheduler should be used. Support library added a new service called JobIntentService that manage this logic and I used it.

https://developer.android.com/about/versions/oreo/background https://developer.android.com/reference/android/support/v4/app/JobIntentService.html

:boom: How can it be tested?

Use Case 1: Create a new survey and click on start push button in the toolbar, the push should be realized successfully. Use Case 2: Create a new survey and wait until push start in the toolbar, the push should be realized successfully. Use Case 3: Send the app to background starting a new app, the push service should be invoked indefinitely without bugs.

:floppy_disk: Requires DB migration?

:art: UI changes?