KiraHoneybee
KiraHoneybee

Reputation: 682

Keeping an Android app "awake" long enough to save data

I'm not 100% sure this is necessary on Android.

For iOS, if your app goes into the background, and you're saving a large chunk of data, the app can sleep before the data is fully saved. To get around this, you have to create some kind of Background Task "keepalive" thing in order to stop your app from shutting down.

Is there an equivalent for Android?

Upvotes: 0

Views: 124

Answers (1)

dominicoder
dominicoder

Reputation: 10175

Sounds like a wake lock:

https://developer.android.com/training/scheduling/wakelock


EDIT:

Sounds like you want to do work in the background, and then probably with WorkManager.

Upvotes: 1

Related Questions