1) Why your service work in the background? The documentation said: "A service runs in the main thread of its hosting process; the service does not create its own thread and does not run in a separate process unless you specify otherwise". 2) How do you access the views in MainActivity without ViewBinding or findViewById? I didn't get it
Hey Philipp, great video as always, but I have a doubt. I'm not sure that the way you have used IntentService is the correct way. In your video, you are manually stopping the intentservice using a companion object method as well as using a variable to control the execution (in the while loop). In the case that another intent for the same service was started, it would stay in the looper queue. And only when you call the stop method, the first task would get completed. Now since the second intent was in the queue, then that gets executed. And if you forget to call stop on that, then no other intent from the queue will get executed. I'm new to this and learning about it, so please correct me if I'm wrong.
how would a mechanism similar to FileSystemWatcher be implemented? that is to say that there is a kind of agent that every time interval consults if I already have the internet? This would be ideal to notify the user and proceed to perform actions towards the server.
thread is a line of execution, if you create another thread, they will run in parallel, but i still dont know in android development, if you minimize your app it will stop all created threads in the application, probably thats the case but i am still not sure
@@abdoghania2273 you can send a broadcast from the onTaskRemoved function in your service to your app and restart the service in onReceive of the broadcast receiver
As of Jul 2022 it looks like IntentService() and JobIntentService() has been deprecated. Docs say use Jetpack Compose, but I have yet to work with this, so I may have to just skip this one and watch another more recent video after learning Jetpack Compose.
Hi, I am sorry, but this is a really bad video. IntentService (in opposite to Service) stops himself after it finish his work. In addition, you mess up viewers during the video by calling IntentService and Service.Also it would be very useful to give some examples og using IntentServices in real life, this is also missing and makes this video useless. Sorry for harsh review
very concise an clearly explanation Philipp, Glad to find your channel, plz keep it up
Great video Philipp, easy to understand. I'm already subscribed, and thank you for sharing your knowledge. Greetings from Brazil.
Great video Philipp. Thank you for your work
Perfect. Wouldbe nice to know how to have a service feed information back to the application as well.
Thank you! You can get information in the activity by using the service singleton
1) Why your service work in the background? The documentation said: "A service runs in the main thread of its hosting process; the service does not create its own thread and does not run in a separate process unless you specify otherwise".
2) How do you access the views in MainActivity without ViewBinding or findViewById? I didn't get it
Hey Philipp, great video as always, but I have a doubt. I'm not sure that the way you have used IntentService is the correct way.
In your video, you are manually stopping the intentservice using a companion object method as well as using a variable to control the execution (in the while loop). In the case that another intent for the same service was started, it would stay in the looper queue. And only when you call the stop method, the first task would get completed.
Now since the second intent was in the queue, then that gets executed. And if you forget to call stop on that, then no other intent from the queue will get executed.
I'm new to this and learning about it, so please correct me if I'm wrong.
Sir, will you be doing any video on JobIntentService or WorkManager in kotlin? Thank you
how would a mechanism similar to FileSystemWatcher be implemented? that is to say that there is a kind of agent that every time interval consults if I already have the internet? This would be ideal to notify the user and proceed to perform actions towards the server.
Nice job
But what's the diffrent between service and intentservice?
Thank you! The next video is about normal service, where I will explain the difference
@@PhilippLackner Thanks a lot
@@mohammadjavadshabani243 you're welcome. I just think, intent Service is a little bit easier to start with
Can you tell why did you use unit and companion object. What's the use of these?
for getting only single instance throughout the app
Thank you so much.
More topic in service plz make on it
Hello mister Lackner, how are you? thank you for this amazing content tuto, Can you help me please, how can I call this from another application?
How to implement a type network watch system? If detected my internet An interval time? Sorry for my English
Intent Service is deprecated. Now what is used instead ?
docs says WorkManager or JobIntentService
@@frozen1093 thanks
Notification: IntentService is deprecated in Android-R / Android-11.
Is there any alternative ?
@@adamcierniak3902 Use JobIntentService
@@lokkeshss7024 how to use it?
@@lokkeshss7024 that too got deprecated
@@lokkeshss7024that's deprecated too
can someone explain to me what threads mean?
thread is a line of execution, if you create another thread, they will run in parallel, but i still dont know in android development, if you minimize your app it will stop all created threads in the application, probably thats the case but i am still not sure
@@zeit1904 Thanks for the info. Micheal from Breaking Bad!
Hey Phillip. Does Intent service work even if I kill my app.
You can use Firebase
now make video on work manager :(
How can we make network request even app gets killed in background
What would happen if I destroy the app by removing it from recent apps?
Then the service will get killed too
@@PhilippLackner so what should I do to do something when the app is destroyed
@@abdoghania2273 you can send a broadcast from the onTaskRemoved function in your service to your app and restart the service in onReceive of the broadcast receiver
hey how you doing today sir
What if the app is killed while intent service is running
This video is out of date. I have done it using Work Manager.
import android.app.IntentService = deprecated, please helpppppppppp
easy explanation from a quick google. stackoverflow.com/questions/62138507/intentservice-is-deprecated-how-do-i-replace-it-with-jobintentservice
As of Jul 2022 it looks like IntentService() and JobIntentService() has been deprecated. Docs say use Jetpack Compose, but I have yet to work with this, so I may have to just skip this one and watch another more recent video after learning Jetpack Compose.
Didn't you mean WorkManager?
#Intent services are depracated.
Hi, I am sorry, but this is a really bad video. IntentService (in opposite to Service) stops himself after it finish his work. In addition, you mess up viewers during the video by calling IntentService and Service.Also it would be very useful to give some examples og using IntentServices in real life, this is also missing and makes this video useless. Sorry for harsh review
Deprecated