Broadcast Receiver in kotlin

后端 未结 3 1757
时光取名叫无心
时光取名叫无心 2020-12-29 04:40

How to use register and create a Broadcast Receiver in Android in Kotlin. Any advice... In Java, you can create it by declaring it as a Broadcast Receiver. But in Kotlin I a

3条回答
  •  灰色年华
    2020-12-29 05:00

    I've created a BroadcastReceiver Kotlin extension, which you can copy/paste anywhere. It doesn't do much more than what is already mentioned, but it reduces some of the boilerplate.

提交回复
热议问题