Broadcasts & Broadcast Receivers - Android Basics 2023

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ม.ค. 2025

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

  • @HoveredCubeOfficial
    @HoveredCubeOfficial ปีที่แล้ว +23

    You're videos are just so high quality that I feel like I have to pay for them! how ever I'm in a country that I can't donate you but I watch the adds till the last second! Oh and also I have a video request! PLEASE PLEASE PLEASE Make a tutorial video about how to enable V P N mode in Kotlin! there no videos explaining it and the documents are so confusing!

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

      So would u consider making a short tutorial about it please?

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

    You're enjoy me everyday with such a qualite video lessons! Thanks bro! I'm also have Germany roots...

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

    Thanks a lot. Nice that you also again address the more niche topics.

  • @thenomadicstranger2079
    @thenomadicstranger2079 ปีที่แล้ว +11

    I hope you cover goAsync in upcoming videos with proper examples. It would be amazing if you could cover ANR cases in background and foreground cases.

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

    Thanks for sharing it help a lot!

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

    Awesome series ! Keep it coming please.

  • @MuhammadBilal-qi4so
    @MuhammadBilal-qi4so 3 หลายเดือนก่อน +1

    00:03 Broadcasts in Android are system-wide events that apps can consume and receive
    01:30 Reacting to airplane mode changes in an Android app
    02:51 Handling intents in Android
    04:19 Registering a broadcast receiver for airplane mode changes.
    05:50 Dynamic broadcast allows receiver declaration when needed
    07:12 Static broadcast receivers can be declared in the Manifest file
    08:27 Sending and receiving broadcast intents in Android
    10:07 Apps can communicate with each other using broadcast receivers.

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

    I'm really enjoying these, they're things I know but your helping me categorise them in my mind, would you consider roughly explaining small code changes for audio users,

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

    Thanks, your videos make my life easier and I can focus on the main aims of my apps

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

    Very nice series for learning basic android things.

  • @rishikeshsingh9946
    @rishikeshsingh9946 3 หลายเดือนก่อน +3

    Please make a video with full description/define about broadcast receivers with 3-4 examples, and intent filters.

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

    Thank you for these videos, it helps a lot!

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

    Man I love your channel

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

    Another amazing video. thanks for all the effort

  • @AK2000YY
    @AK2000YY 2 หลายเดือนก่อน

    thank you philpp

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

    thank you,its amazing explanation

  • @abdelrhmanghanem6661
    @abdelrhmanghanem6661 หลายเดือนก่อน

    This playlist is so good
    I have a small question is the static broadcast receiver still working?

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

    Could you please suggest how an activity can communicate with a receiver? What if we want our UI or viewmodel to react to a message rather than just logging it? I couldn't manage to find a "native" solution, so ended up adding a static event subject to the receiver's companion object and subscribing my activity to it.

  • @PaweSzymanski-gk7po
    @PaweSzymanski-gk7po ปีที่แล้ว +1

    Isn't it better to register and unregister dynamic receivers in onResume and onPause? In the previous video discussing lifecycle methods, you mentioned that the onDestroy method might sometimes not be called.

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

    Great video!!, just one question, if the onReceive method is from a different class, how can the ui react to that action?

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

      I am kinda thinking the same thing because he said in the first part that you can pause your music player app when an app received a phone call action.

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

      A music player is not the UI, it's just the service that plays the music. You can pass other active classes of your app to the broadcast receiver and update them. That either works with Hilt or manually assignment

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

    Excellent

  • @fadillahazhar8791
    @fadillahazhar8791 11 หลายเดือนก่อน

    interesting abangkuh

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

    bro, there's a topic I've struggled for a long time to implement. Please, if you would make a series on implementing a custom assistant from overriding VoiceInteractionServices. I'd SERIOUSLY much appreciate it

  • @everythingjdm8057
    @everythingjdm8057 10 หลายเดือนก่อน

    l learned everything from you

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

    thanks dost

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

    Can you make a video about NFC tag reader?

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

    Can broadcast receivers be used in situations such as internet disconnection? What should I use to check internet situation? Also thanks for these videos :)

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

    What do you think about using broadcasts and broadcast receivers inside same app, compared to using singleton Rx Observable or Coroutine Flow that are used in multiple places?
    Apart from obviouse API differences, are there any general reasons why should we stick with broadcasts and broadcast receivers in such situation?

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

      How does a broadcast compare with a flow? If you mean channels, then you lose the whole reactivity and flexibility by using a broadcast

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

      @@PhilippLackner Ok, I get that, but are there any reasons for using broadcasts within same app, instead of Channels, Rx Observables and so?

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

    hello thanks for all tutorial, but please make tutorial about implementing webrtc in android studio, hope u read this

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

    Thanks very interesting and useful.
    Is it possible register to incoming phone call and our application receive the calling number as parameter please?
    It will very interesting that our application receive the calling number when is ringing and find and display the client record automatically?
    Have nice time

    • @catlord777x3
      @catlord777x3 4 หลายเดือนก่อน

      likr truecaller, right!! so did u get any result or did any reseach that u could share

  • @AndrewKolubov-t5w
    @AndrewKolubov-t5w ปีที่แล้ว

    Hello. Do you find copilot useful for Android development?

  • @fernandogoncalves1891
    @fernandogoncalves1891 7 หลายเดือนก่อน +1

    How can we use data from BroadcastReceiver in composable UI?. Thanks

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

    This implementation for the AirPlaneModeReceiver may be more natural and straightforward.
    class AirPlaneModeReceiver: BroadcastReceiver() {
    override fun onReceive(context: Context?, intent: Intent?) {
    if (intent?.action == Intent.ACTION_AIRPLANE_MODE_CHANGED) {
    if (intent.hasExtra("state")) {
    val isTurnedOn = intent.getBooleanExtra("state", false)
    println("Is airplane mode enabled? ${isTurnedOn}")
    } else {
    println("No state extra found in the intent")
    }
    }
    }
    }

    • @catlord777x3
      @catlord777x3 4 หลายเดือนก่อน

      bro are u android developer

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

    I like this series ❤️
    Keep great work up 🔥
    Next video Content Provider 🫣

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

    I have doubt like how do we update the UI from the receviers. If it is possible with viewmodel i have a question passing a viewmodel instance to broadcast receiver is a good way?

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

      I couldn't manage to find a "native" solution, so ended up adding a static event subject to the receiver's companion object and subscribing my activity (or viewmodel) to it.

  • @neerajverma9226
    @neerajverma9226 9 หลายเดือนก่อน +1

    How to use hilt inside broadcast reciever

  • @OmkarShisode-k2i
    @OmkarShisode-k2i ปีที่แล้ว +1

    Please make this more beginner friendly so we can understand from the scratch, Thank you for such video

  • @yt-1161
    @yt-1161 7 หลายเดือนก่อน

    Is there a book that you can recommend ?

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

    Your content is ❤ (3😅)

  • @abada-s
    @abada-s ปีที่แล้ว

    Why do you check if the action is a specific action ? doesn't the intent filter do the same job!

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

      As long as it's only used for this one action yes

  • @arshadansari1731
    @arshadansari1731 3 หลายเดือนก่อน

    If my receiver app is closed and I send a broadcast using an explicit intent, will the receiver app still not be able to receive it, since that's what's happening in my case?

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

    How do you check if an app that can receive an broadcast is open?

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

    I am little confiused, I can see you used the intent action in the airPlane brodcast class, why you set this action again to the intentFilter inside the register?
    Also one more thing.. in your note application you made getNote() not suspended but you made getAllNotes() are suspended
    Why? Both of them are returning data from room
    Sorry for grammer mistakes

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

      to getAllNodes, you execute a task with a fewer seconds, from Room Local Database for example.
      Suspend fun refers to call it function into a Coroutine, for example in your viewModel, you need to call this function into viewModelScope.launch{}.
      Whatever getNote, can be non suspend fun, but instead of that, you shoul to be return Flow, and works same if you define that :
      suspend fun getNote() : NoteEntity
      Boths works similar, but generally Flow is expected when you call a list that have changes along the time or running of the app, reacts, to actions, it mutates.
      Suspend fun refers, when you create a coroutine that gives some work, and it;s no frequently to mutate. Does Work right.
      Suspend fun with no returns -> Procedure, fun with returns -> Works and return Type.
      also suspend can be used to return.

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

    Nice content Phillip. Although I am not really sure if Broadcast receivers should be considered as an Android Basic concept

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

      Why not? It's a core concept about how apps communicate with each other

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

    What would be a usecase?

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

    way more complex and long

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

    Boss form indian I need help i have App idea but not knowledge how to build can you help me how i can sell my idea to another

    • @Darkwolf9280
      @Darkwolf9280 8 หลายเดือนก่อน

      Can we collaborate?

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

    Please translate persian