Skip to content
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

Download Listener when app is killed #20

Open
skfaisal93 opened this issue Feb 17, 2020 · 4 comments
Open

Download Listener when app is killed #20

skfaisal93 opened this issue Feb 17, 2020 · 4 comments

Comments

@skfaisal93
Copy link

I want to perform some actions like updating the database and show a custom notification when downloaded is completed even app is killed.

  1. Will download continue after app killed by swiping?
  2. If yes, then will the listener would awake to perform an action even app status is killed?

I tried to do this with the Android DownloadManger class but the listener won't awake once app gets killed.

@skfaisal93
Copy link
Author

I noticed that when I show Toast in onProgress then it continue download even after app killed. But when I don't show Toast then it stops.

@huxq17
Copy link
Owner

huxq17 commented Feb 19, 2020

Maybe app is still alive because your toast, so download is in progress.

@skfaisal93
Copy link
Author

How can I keep the app alive even after the app is killed without showing Toast in onProgress? Is it possible?

@huxq17
Copy link
Owner

huxq17 commented Feb 19, 2020

It's impossible, but foreground process will live longer,maybe you can start a foreground service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants