I have been looking for something like this to complete our 5 months flutter project, finally I got the solution from your content. Thank you so much, looking forward to seeing more contents
The best explanation for services I've found and it's just what I needed. I would add a handler to show a toast message from the service. Handler mainHandler = new Handler(getMainLooper()); mainHandler.post(new Runnable() { @Override public void run() { // Do your stuff here related to UI, e.g. show toast Toast.makeText(getApplicationContext(), "Message from Service", Toast.LENGTH_SHORT).show(); } });
Very clear and direct explanation of the different service types. 👍 However you mention that multiple instances of the service will get created if started multiple times, but this isn't so; there will only be one instance of the service object but its onStartCommand() function will be invoked those multiple times.
I left java 3 years ago .and start using kotlin . But your explanation is So good that I end up subscribing to your channel. Hope you start using compose multiplatform 🙂 this is the very first video from you that I watched .so don't you if you are already using kotlin . Anyway nice video ..
If i use NDK to run a C++ library, which service should i use to run the code out of process? Sometimes C++ crashs and i want them to take a service down but not the whole app. So i need to do the same as all webbrowsers do it.
I hope to learn how to play the list view of music through the service by Raw or Assest folder to work in background long time ... thanks for this video
If the service stops, it could mean that the task is finished. If you want to keep it alive, you need to do something to keep the service alive like a while loop.
Thanks for this tutorial. May I know how how to create second application which will run in the background service when first application is processing without interacting of first app?
This tutorial is very helpful. May I know how how to create second application which will run in the background service when first application is processing without interacting of first app?
Normally the codes working fine but when i add a webview in main activity then foground service stopped when apk closed. Is there any solution for it. I want to keep webview in my project and also want the foreground service
Use wake lock with no time limit to make foreground service work infinitely. But never forget that unnecessary amount of foreground service usage is a real battery killer
ua-cam.com/video/bA7v1Ubjlzw/v-deo.html Here, the service is stopped. But the service is not explicitly stopped by calling stopService() or stopSelf() from within the service itself or by another component such as an activity or a broadcast receiver. I wonder why? Thx :)
I give you 3C score for this video: Concise, Complete, Clear. Really good explanation. Thank you
I have been looking for something like this to complete our 5 months flutter project, finally I got the solution from your content. Thank you so much, looking forward to seeing more contents
This is one of the best-explained tutorials I have watched!!
Thank you :)
Best video on utube regarding services in android... 👍👍👍👍
Best video on the topic on UA-cam, so well explained 😍😍😍😍😍😍😍😍
Good example how simple it could be, when guide is so clear and opened step by step, thank you sir.
Thank you. I'm looking for this video longtime.
Be blessed. Soyez béni mon frère.
Ultimate content. I never understood services that easily ever before. Thank you 🤟
i really needed this, @Codeible, thank you big time.
I wonder who organised the naming if foreground vs background. Unbelievable, thanks for clearing it up
lol it was Larry Ellison, the Devil himself.
Thank you. Best Service tutorial ever.
Terbaik servies dia..tapi home Macan setan dia...malu.out site..setan bertanduk lima..celaka
Come onnn this gotta be one of the best practical service tuts. Can’t wait to see you work with kotlin.
Yesss good job baby..setan kocak bini orang sampai dsana ..party sex u setan...
Amazing and simple explaination. Thanks. Keep up the good work 👍
Thank you for clear and worked practice even on API 28. Great work. More android tutorials please.
The best explanation for services I've found and it's just what I needed. I would add a handler to show a toast message from the service.
Handler mainHandler = new Handler(getMainLooper());
mainHandler.post(new Runnable() {
@Override
public void run() {
// Do your stuff here related to UI, e.g. show toast
Toast.makeText(getApplicationContext(), "Message from Service", Toast.LENGTH_SHORT).show();
}
});
Clear Cut simple and Illustrative video, good for starters.
Very clear and direct explanation of the different service types. 👍
However you mention that multiple instances of the service will get created if started multiple times, but this isn't so; there will only be one instance of the service object but its onStartCommand() function will be invoked those multiple times.
you're salve my life bro, i have weeks searching this info. Thanksh! like and new sub
I left java 3 years ago .and start using kotlin . But your explanation is So good that I end up subscribing to your channel. Hope you start using compose multiplatform 🙂 this is the very first video from you that I watched .so don't you if you are already using kotlin . Anyway nice video ..
Very good explanation..!!👏
Nice explanation.... you're awesome man 👍🏻
Awesome video my dude. Really clear.
man ! thank you very much for your awsom explaination for that topic
This was a good video. I learned so much in a short amount of time!
Great explanation!! Thanks!!
Im your new Subscriber because of your video i easily understand some coding stuff
Thank you
nice tut crystal clear and spot on
nice video, helped me so much!
Great explanation helped me a lot.
Hence subscribed.
I have tested this on real device when I restart the device I didn't see the notification that you got...? Is there anything to add more?
Osm! Thank you bro for this helpful video
Very good explanation.
@instagram I cant answer It. I have limited knowledge and experiance.
Great Thanks boss for such a clear explanation,
What about the Bound Services??
Thank you❤
Thanks for this great video!
Thank you, this video was really usefull
If i use NDK to run a C++ library, which service should i use to run the code out of process? Sometimes C++ crashs and i want them to take a service down but not the whole app. So i need to do the same as all webbrowsers do it.
I like your videos a lot please share more videos with us
I hope to learn how to play the list view of music through the service by Raw or Assest folder to work in background long time ... thanks for this video
I believe from what I read on google documentation, that there is no need to check if the service is running. Apparently, that was a bug.
Thanks bro... very helpfull
so helpful thank you very much 😊
does it work with all android versions specially oreo or higher ?
Hello it should work for API 26 or higher.
@@Codeible Any alternate service to run for below 26.
very nice thanks for this video.
How would you stop the foreground service?
How I can block wifi internet from using to a specific app in aops /os
Android 12 & 13 How long will it be running Foreground service??
Thank you very much
I understand that telegram had an unlimited open service in background, how it is posible?
I have created an alarm app in Android 11, but it does not work when the app is closed. Does anyone know where the problem is ??
if service stops after few seconds then what to do?
If the service stops, it could mean that the task is finished. If you want to keep it alive, you need to do something to keep the service alive like a while loop.
Thanks for this tutorial. May I know how how to create second application which will run in the background service when first application is processing without interacting of first app?
in android 14 sdk version 34, when the app closes the foregroundservice also closes. Are there any solutions for this? Thanks
I dont think so, where you read this?
Great!
U have udemy courses?
Great Video! Is there a way to stop the Service by code?
This tutorial is very helpful. May I know how how to create second application which will run in the background service when first application is processing without interacting of first app?
If phone is idle mode background service is not working. How to do this??
You need to use foreground service.
@@Codeible Example you have provided is with foreground service only right?
@@harleenarora5189 Both Foreground and Background.
After restarting the app background service is not displaying in the notification area. I have tested on my mobile. Please help 🥺
Very useful!!!
For me only one notification was being created even without checking if the service is running already or not....
Ready....hahahhah...manpussss
its amazingg thanks you
thank you!!
Thnks a lot
Normally the codes working fine but when i add a webview in main activity then foground service stopped when apk closed. Is there any solution for it. I want to keep webview in my project and also want the foreground service
Hi, should still work.
@@Codeible not working after adding webview 😭😭
Can you make this in kotlin ?
There is no code for stopping foreground service
Thanks alot bro
Thank you for the sharing! Any idea we can get Firestore document update if our app is terminated?
Hello,
Yes you can.
@@Codeiblewhat method should we implement to update client document if app is terminated
@@jeremyheng8573 What do you mean? You can just update the document like normal using the Firebase API for Android.
Hello good job.....nerka u all setan...nice...tqqqq
Is there a way to have a foreground service without a notification ?
No, you need ir.
Very helpful
the app works fine in the background, but if I want to use it in the foreground it crashes after about 7 seconds. I don't know why
Use wake lock with no time limit to make foreground service work infinitely. But never forget that unnecessary amount of foreground service usage is a real battery killer
ua-cam.com/video/bA7v1Ubjlzw/v-deo.html Here, the service is stopped. But the service is not explicitly stopped by calling stopService() or stopSelf() from within the service itself or by another component such as an activity or a broadcast receiver. I wonder why? Thx :)
i cant able to receive broadcast after my app has been killed
waaaaaaaaaaaaaaaaaaaaaaaaaw ma bro its amazing
fail when stop service and after 10 seconds enable
How to keep running the service even we kill the app ?
Create a foreground service - 3:43
If you want to restart the service automatically, create a broadcast receiver - 11:12
Awesome
so thanks you bro
great bro , but im looking for Bound service impl 🙂
Yo how this receiver working really we didnt even set registerReceiver()
how to stop..
Thanks
Thanks
amazing
thanks
useful
n1
Why so many ads dude? I watched sum of 1.5 mins ads whole through this video
Awesome
Thanks