Repository navigation
fix: drop the battery exemption and always-on service that Google Play restricts #101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
7b083b0
fix: drop the battery exemption and always-on service that Google Pla…
GeiserX 8b4559c
docs: drop the notification and retry backoff the WorkManager heartbe…
GeiserX 61d0ee0
fix(heartbeat): keep overlapping reports from undoing each other or s…
GeiserX cdf92cc
build: drop coverage excludes for the removed heartbeat service and b…
GeiserX File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,27 @@ | ||
| package com.cashpilot.android | ||
|
|
||
| import android.app.Application | ||
| import androidx.work.Configuration | ||
| import com.cashpilot.android.service.Heartbeat | ||
| import com.cashpilot.android.service.HeartbeatWorker | ||
|
|
||
| class CashPilotApp : Application() | ||
| /** | ||
| * Implements [Configuration.Provider], and the manifest removes WorkManager's | ||
| * startup initializer, so WorkManager initialises on first use: the | ||
| * [HeartbeatWorker.schedule] call below. Same behaviour on a device and under | ||
| * Robolectric, which does not run androidx.startup's content provider. | ||
| */ | ||
| class CashPilotApp : Application(), Configuration.Provider { | ||
|
|
||
| override val workManagerConfiguration: Configuration | ||
| get() = Configuration.Builder().build() | ||
|
|
||
| override fun onCreate() { | ||
| super.onCreate() | ||
| // Every process start, including the system binding the notification | ||
| // listener after a reboot: restore what the last heartbeat said, and make | ||
| // sure the periodic schedule exists (KEEP, so this never resets it). | ||
| Heartbeat.restore(this) | ||
| HeartbeatWorker.schedule(this) | ||
| } | ||
| } | ||
20 changes: 0 additions & 20 deletions
20
app/src/main/java/com/cashpilot/android/service/BootReceiver.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.