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.
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?
[x] Nope, we can just merge this branch.
[ ] Yes, but we need to apply it before merging this branch.
[ ] Yes, it's already applied.
:art: UI changes?
[x] Nope, the UI remains as beautiful as it was before!
: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?