Waiting for network download android
Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Android wait for network available Ask Question. Asked 9 years, 5 months ago. Active 9 years, 5 months ago. Viewed 2k times. I am writing an Android service which is executed every 15 minutes. Can somebody suggest what it should do? Improve this question. Surely, if the service is executed every 15 minutes, then if it either determines that there is no connectivity or it fails to get a response in a timely manner, your service should go to sleep and wait for the next 15 minute wake-up call.
Why did you choose not to use AlarmManager or BroadcastReciever? Add a comment. Active Oldest Votes. MyService" ; context. May 28, am. Zeke Krahlin. June 1, am. Reply to Jan. August 12, am.
September 17, pm. August 20, am. I fixed the problem by switching to another router,or another hotspot. Rhonda Lea Fries. December 17, pm. Turn off automatic updates. Strictly Necessary Cookies Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
Enable or Disable Cookies. Keeping this cookie enabled helps us to improve our website. Please enable Strictly Necessary Cookies first so that we can save your preferences! Cookie Policy More information about our Cookie Policy. Enable All Save Changes.
Viewed 3k times. Improve this question. Add a comment. Active Oldest Votes. Improve this answer. When you [DownloadManager enqueue] your request, an id[long] is returned. Keep track of that and query[DownloadManager. Query] using it accordingly to check for the status, number of byte downloaded etc and handle for the appropriate cases[DownloadManager remove may be].
May I know what is your requirement in detail? I'm downloading some apk's from my app and I wanted to know if the DownloadManager will fail if the network unavailable for too long
0コメント