INTENT SERVICE - Android Fundamentals

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ก.ค. 2024
  • In this video you will learn how to execute background work with intent services.
    ⭐ Get certificates for your future job
    ⭐ Save countless hours of time
    ⭐ 100% money back guarantee for 30 days
    ⭐ Become a professional Android developer now:
    pl-coding.com/premium-courses...
    Regular Android tutorials on my Instagram: / philipplackner_official
    Checkout my GitHub: github.com/philipplackner

ความคิดเห็น • 50

  • @thyagonevessilvestre1248
    @thyagonevessilvestre1248 3 ปีที่แล้ว +1

    Great video Philipp, easy to understand. I'm already subscribed, and thank you for sharing your knowledge. Greetings from Brazil.

  • @namnguyenang887
    @namnguyenang887 ปีที่แล้ว

    very concise an clearly explanation Philipp, Glad to find your channel, plz keep it up

  • @bahromkomilov23
    @bahromkomilov23 ปีที่แล้ว

    Great video Philipp. Thank you for your work

  • @chris_rb84
    @chris_rb84 4 ปีที่แล้ว

    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.

  • @clif.l292
    @clif.l292 3 ปีที่แล้ว +2

    Sir, will you be doing any video on JobIntentService or WorkManager in kotlin? Thank you

  • @Kunal-jp8tn
    @Kunal-jp8tn 2 ปีที่แล้ว

    Thank you so much.

  • @GakisStylianos
    @GakisStylianos 4 ปีที่แล้ว +3

    Perfect. Wouldbe nice to know how to have a service feed information back to the application as well.

    • @PhilippLackner
      @PhilippLackner  4 ปีที่แล้ว

      Thank you! You can get information in the activity by using the service singleton

  • @johnjacobkenny
    @johnjacobkenny 3 ปีที่แล้ว +7

    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.

  • @chris_rb84
    @chris_rb84 4 ปีที่แล้ว

    How to implement a type network watch system? If detected my internet An interval time? Sorry for my English

  • @telephon3208
    @telephon3208 ปีที่แล้ว +1

    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

  • @mukeshramharshyadav3255
    @mukeshramharshyadav3255 4 ปีที่แล้ว

    How can we make network request even app gets killed in background

  • @Sir_RBort
    @Sir_RBort 3 ปีที่แล้ว

    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?

  • @arkamondal7646
    @arkamondal7646 4 ปีที่แล้ว

    More topic in service plz make on it

  • @arpitgupta3151
    @arpitgupta3151 3 ปีที่แล้ว

    Can you tell why did you use unit and companion object. What's the use of these?

    • @akashdeepwadhwa5828
      @akashdeepwadhwa5828 3 ปีที่แล้ว

      for getting only single instance throughout the app

  • @praveenvinopv9929
    @praveenvinopv9929 2 ปีที่แล้ว

    What if the app is killed while intent service is running

  • @user-ve6kt7uj5r
    @user-ve6kt7uj5r 4 ปีที่แล้ว +14

    Notification: IntentService is deprecated in Android-R / Android-11.

    • @adamcierniak3902
      @adamcierniak3902 3 ปีที่แล้ว

      Is there any alternative ?

    • @lokkeshss7024
      @lokkeshss7024 3 ปีที่แล้ว

      @@adamcierniak3902 Use JobIntentService

    • @vikasbhadoriya1466
      @vikasbhadoriya1466 3 ปีที่แล้ว +2

      @@lokkeshss7024 how to use it?

    • @ahappyperson6530
      @ahappyperson6530 13 วันที่ผ่านมา

      @@lokkeshss7024 that too got deprecated

  • @mohammadjavadshabani243
    @mohammadjavadshabani243 4 ปีที่แล้ว +3

    Nice job
    But what's the diffrent between service and intentservice?

    • @PhilippLackner
      @PhilippLackner  4 ปีที่แล้ว +2

      Thank you! The next video is about normal service, where I will explain the difference

    • @mohammadjavadshabani243
      @mohammadjavadshabani243 4 ปีที่แล้ว +2

      @@PhilippLackner Thanks a lot

    • @PhilippLackner
      @PhilippLackner  4 ปีที่แล้ว +3

      @@mohammadjavadshabani243 you're welcome. I just think, intent Service is a little bit easier to start with

  • @keshavagarwal5674
    @keshavagarwal5674 3 ปีที่แล้ว

    Hey Phillip. Does Intent service work even if I kill my app.

  • @abdoghania2273
    @abdoghania2273 4 ปีที่แล้ว

    What would happen if I destroy the app by removing it from recent apps?

    • @PhilippLackner
      @PhilippLackner  4 ปีที่แล้ว +2

      Then the service will get killed too

    • @abdoghania2273
      @abdoghania2273 4 ปีที่แล้ว

      @@PhilippLackner so what should I do to do something when the app is destroyed

    • @PhilippLackner
      @PhilippLackner  4 ปีที่แล้ว +1

      @@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

  • @swatisingh2639
    @swatisingh2639 3 ปีที่แล้ว +2

    now make video on work manager :(

  • @Kunal-jp8tn
    @Kunal-jp8tn 2 ปีที่แล้ว +1

    Intent Service is deprecated. Now what is used instead ?

    • @frozen1093
      @frozen1093 2 ปีที่แล้ว +4

      docs says WorkManager or JobIntentService

    • @Kunal-jp8tn
      @Kunal-jp8tn 2 ปีที่แล้ว

      @@frozen1093 thanks

  • @rowenarrow
    @rowenarrow 2 ปีที่แล้ว

    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.

  • @TheImaginativeSachin
    @TheImaginativeSachin ปีที่แล้ว

    can someone explain to me what threads mean?

    • @zeit1904
      @zeit1904 ปีที่แล้ว +1

      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

    • @TheImaginativeSachin
      @TheImaginativeSachin ปีที่แล้ว

      @@zeit1904 Thanks for the info. Micheal from Breaking Bad!

  • @guy1407
    @guy1407 4 ปีที่แล้ว

    import android.app.IntentService = deprecated, please helpppppppppp

    • @ryanbennett6801
      @ryanbennett6801 3 ปีที่แล้ว +1

      easy explanation from a quick google. stackoverflow.com/questions/62138507/intentservice-is-deprecated-how-do-i-replace-it-with-jobintentservice

  • @bezelyesevenordek
    @bezelyesevenordek ปีที่แล้ว

    hey how you doing today sir

  • @meirox03
    @meirox03 ปีที่แล้ว +1

    This video is out of date. I have done it using Work Manager.

  • @mrtruthvirtue8752
    @mrtruthvirtue8752 2 ปีที่แล้ว +1

    #Intent services are depracated.

  • @logan6130
    @logan6130 3 ปีที่แล้ว

    Deprecated

  • @igormorozov6311
    @igormorozov6311 ปีที่แล้ว +1

    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