Thanks for noticing. If you have watched recent uploads, you will observe that you will not find this problem. Thanks for constructive feed back. It always helps.
This tutorial is very helpful.May I know how to call the second application running in the background when first application is processing currently. I want my first application is processing while the second application is also running in the background without knowing the user that the second application is running in the background. I try with the background service but it doesn't work for me.? Please can u provide any relative sources.
sir I have set periodic time 15 minutes but work manager call sometimes in 3 minutes or 9 minutes etc. My question is why my work manager not is inconsistent in time? Why it is not call in every fixed 15 minutes?
This is a known issues with Android Fragmentation. The OEMs some times override the default behaviour. I am pretty sure this is not a standard Google Nexus or Pixel device. Isn't it?
Just log the thread info from inside doWork and see whether it Logs it as main thread id, or some other random thread number. I have a hunch it will not be same as main thread. Try and comment.
I have already covered Jetpack components as part of Android Architecture series - ruclips.net/video/S_25hti4IEc/видео.html The Jetpack component is discussed in 11th video onwards.
Good explanation. Sir but I implemented my worker to upload geo coordinates of person location even when my app exits,buts it's working when my app exits, I have given auto start permission then it's working for some time and it's getting stopped, again when I open my app it's restarting again. How can achieve proper working
You can not enforce hard time bounds using a WorkManager. It will run for sure but as per the convenience of scheduler. How are you doing the testing? How did you check it's run time and run periodicity?
@@Codetutor-DemystifyCoding sir I will explain how i implemented my worker, as i know minimum time for periodic work request is 15 min, but I need to upload coordinates for every 2 min. So firstly i calling one time work request then when it enters into do work method i am invoking one more one time request with intial delay of 2 minutes, so it's goes on. I'm displaying toast of geo coordinates to check whether they got uploaded on my server. Problem is worker is doing my work but not proper, I mean if i start my work now, then close my app, it's displaying toast of coordinates for couple of times, then it's not showing any toast. Again when I open my app suddenly coordinates toast is being displayed .
I would suggest use Foreground Service for that. WorkManager is not meant for forever running background task. Since you want to continuously keep track of the location, Foreground service is more suited. I have a tutorial on that topic as well, please do check it out. Hope this helps.
Depends on how you have configured your WorkRequest. If it is OneTime then it executed only once, if you set it as Periodic, then it will get executed when when app is killed. I have tested it. It works. Even after the device boot, even if you don't launch the app, I have seen the logs of Worker getting started in back ground with approximate scheduled start time.
Sir, I am very impressed by the way you explore the topics and present us in a nice manner.
Great!!!
really you made it so easy to undrestand background services....
thank you Sir...
Thank you for solving the voice problem... Is this jetpack compose project? There is the XML file and button..
Thanks for noticing. If you have watched recent uploads, you will observe that you will not find this problem. Thanks for constructive feed back. It always helps.
This tutorial is very helpful.May I know how to call the second application running in the background when first application is processing currently. I want my first application is processing while the second application is also running in the background without knowing the user that the second application is running in the background. I try with the background service but it doesn't work for me.? Please can u provide any relative sources.
Can I use work manager to receive incoming sms when app is not running?
sir I have set periodic time 15 minutes but work manager call sometimes in 3 minutes or 9 minutes etc. My question is why my work manager not is inconsistent in time? Why it is not call in every fixed 15 minutes?
This is a known issues with Android Fragmentation. The OEMs some times override the default behaviour. I am pretty sure this is not a standard Google Nexus or Pixel device. Isn't it?
@@Codetutor-DemystifyCoding No, It is One Plus mobile device
Worker doWork runs on main thread or different thread ?
Just log the thread info from inside doWork and see whether it Logs it as main thread id, or some other random thread number. I have a hunch it will not be same as main thread. Try and comment.
Very good explanation ❤️
Can I use workmanager to generate a reminder notification to users every month?
Yes.. you can.
Sir please make videos on Android jetpack components all important architecture components.
I have already covered Jetpack components as part of Android Architecture series - ruclips.net/video/S_25hti4IEc/видео.html
The Jetpack component is discussed in 11th video onwards.
If I clear my app from the background, it doesn't work. Also it is not working when I restart the phone
How can we use websocket foreground,
good explanation.
How to stop running worker?
wow you are a great teacher
Wow, thank you. Feel free to explore other content on channel. Hope you have subscribed.
Nice explanation.
Keep watching
@@Codetutor-DemystifyCoding Always
Good explanation. Sir but I implemented my worker to upload geo coordinates of person location even when my app exits,buts it's working when my app exits, I have given auto start permission then it's working for some time and it's getting stopped, again when I open my app it's restarting again. How can achieve proper working
You can not enforce hard time bounds using a WorkManager. It will run for sure but as per the convenience of scheduler. How are you doing the testing? How did you check it's run time and run periodicity?
@@Codetutor-DemystifyCoding sir I will explain how i implemented my worker, as i know minimum time for periodic work request is 15 min, but I need to upload coordinates for every 2 min. So firstly i calling one time work request then when it enters into do work method i am invoking one more one time request with intial delay of 2 minutes, so it's goes on. I'm displaying toast of geo coordinates to check whether they got uploaded on my server. Problem is worker is doing my work but not proper, I mean if i start my work now, then close my app, it's displaying toast of coordinates for couple of times, then it's not showing any toast. Again when I open my app suddenly coordinates toast is being displayed .
@@saradhi2845 in service onCancel you need start custom broadcast and in broadcast reciver you can again start service
U need to make your worker as foreground
Thanks for
Why background task inconsistent in different devices... Developers will get in trouble in front of manager 😌
I feel you bro 😂😂!!
Sir can I fetch current location change in the background using work manager .please help me out sir .. I need this badly
I would suggest use Foreground Service for that. WorkManager is not meant for forever running background task. Since you want to continuously keep track of the location, Foreground service is more suited. I have a tutorial on that topic as well, please do check it out. Hope this helps.
Thanks.
You're welcome, Feel free to explore other content on the channel. Hope you have subscribed.
@@Codetutor-DemystifyCoding I have 👍
Is Work manager kill when app kills ? Means how it behave when app kill ?
Depends on how you have configured your WorkRequest. If it is OneTime then it executed only once, if you set it as Periodic, then it will get executed when when app is killed. I have tested it. It works. Even after the device boot, even if you don't launch the app, I have seen the logs of Worker getting started in back ground with approximate scheduled start time.