Share Share on Facebook Share on Twitter Pinterest Email In this Android Service Example we will see a very simple example to understand how to create and implement a service in Android. A service is used for long … Nguồn:https://u-os.org/ Xem Thêm Bài Viết Khác:https://u-os.org/cong-nghe Youtube Author admin Related Posts 7 mẹo hay giúp bạn tìm kiếm chủ đề viết bài cực đơn giản và hiệu quả December 20, 2020 4 tính năng nổi bật của phần mềm quản lý bán hàng Ipos.vn December 19, 2020 Icon Facebook và một vài điều bạn cần phải biết October 22, 2020 BitShares là gì? October 6, 2020 43 Comments jaber Al-Ani 1 year ago Reply Best Video everrrr… Arthur Lodbrock 1 year ago Reply 2:45 I shit myself. It was very scary) Danish Ali 1 year ago Reply i did the same but when i destroy the app music closed?can u explain Avtem 1 year ago Reply Oh my god! Man, you saved my life!!! It's working perfectly, I've tested it out on my phone! Thank you so much Sfc Sfc 1 year ago Reply Will you please make a video on how to use seekbar with in the service Shahriyar Guliyev 1 year ago Reply Thanks a bunch to teach this simple example which is what I need to know about introduction to Android services 👐 Deepak shah 1 year ago Reply I have done all code same as yours. Only one issue 👇But after clearing recent apps sound is not playing. MaxPicAxe 1 year ago Reply could you not have the beep so loud hahaha, thanks anyway Thuy Ha Van 1 year ago Reply You play music on Main thread (This is not good solution) Osama Sarwar 1 year ago Reply Bsdk you tore my eardrums Midhunraj R 1 year ago Reply raise your volume brother… whats the point Muhammad Yaseen 1 year ago Reply your voice is so low martin white 1 year ago Reply thanks the video is greatbut my question is that i want the music to play even when the screen is offhow do i do it??? B B 1 year ago Reply This background service is destroy itself when user send app to bakcground. Raggy Rags 1 year ago Reply bro how to add a mp3 file instead of a default ringtone? Mostafa Gad 1 year ago Reply Good , can u explain how to pause and communicate media player from background service with seek bar in activity ?? U U UjjwalSquare 1 year ago Reply Sir I don't know why in my nougat mobile song is stop as I remove app from recent menu Abdel Ibrahim 1 year ago Reply great tutorial .You can override methods by only hitting ctrl+O Michael Burrows 1 year ago Reply Thanks for the effort but you need to speak up or turn up the volume Mostafa Gad 1 year ago Reply How can update seekbar in activity with media player running in service ?? Vishnu Prasanth 1 year ago Reply The dislikes are probably because of your ringtone xD Arpit Chhabra 1 year ago Reply Speak loudly!!!!!!!!!!!!!!!! Ioan Oltean 1 year ago Reply My app keeps crashing when i try to start/stopcopyed it tho Aliton Oliveira 1 year ago Reply Good tutorial! How to start an activity simultaneously with the service and pass data info (like Author, year and song's name) to the simultaneous activity? Nathanael Newton 1 year ago Reply I followed these instructions but when i press the start/stop service buttons nothing happens D: Thesis Group 1 year ago Reply Why is findViewById got error in service class? Gürkan Luş 1 year ago Reply I want the music to continue even ı kill the app? ı do notifications but dont work as which ı want Akansha Kaushik 1 year ago Reply thanks for the video..finally a simple understandable video ..great work..keep sharing aditya abhiram 1 year ago Reply The code is not working .It doesn't solve the main need of service. It does't run in background after removing app from ram. We even copy pasted the code an it doesn't work. Just Some YT user 1 year ago Reply THAT IS NOT MUSIC!!!!! great video do 🙂 Muhamad Eawedat 1 year ago Reply Since Oreo, this code will not work, please refer to: https://developer.android.com/about/versions/oreo/background jatinder mohan 1 year ago Reply Very nice explanation. Thanks Alina Zachia 1 year ago Reply STOP SERVICE BUTTON DOES NOT WORK I JUST PLAY SERVICE AND IT IS NOT STOPPING THE STOP BUTTON DOES NOT WORK – HELP !!!! Karan Bagal 1 year ago Reply PostResponseAsyncTask task = new PostResponseAsyncTask(SampleService.this, data, (AsyncResponse) this); task.execute(path+"emp_latlong.php"); How to use this method in services Tahir Khan 1 year ago Reply well explanation , but what the hell is this background music. Jabid Khan 1 year ago Reply Great it's very nice explanation…I have done. aman deep 1 year ago Reply with music like that it better stop when I exit the app Zouxie 1 year ago Reply well fck you with your loop, you intentionally let that wtf Ilmam Mourtada 1 year ago Reply Thumbs down for the zero replies to comments. Mr White 1 year ago Reply It works fine, but after sometimes it stops working ?Any help please , Talha Shahab 1 year ago Reply Bro when i call the service from java file like this (new Intent(this,Myservice.class));then it gave me error what is solution fottioditubo 1 year ago Reply THANK YOU! Nguyen Thanh Hieu 1 year ago Reply Hi, I have just studied android, I used this service to play background music from Activity A –> Activity B and music will stop when jump to Activity C. But when I back to Activity B or A, music also stop. How I can do when back to Activity B or A, music will restart? Write A Comment Cancel Reply Save my name, email, and website in this browser for the next time I comment.