Registering my broadcast receiver to run when an app is launched?

前端 未结 3 1254
感动是毒
感动是毒 2021-01-24 18:33

I want to run some code when an app is launched, so my broadcast receiver has to be notified when user open any app.

Is there any way to do it?

3条回答
  •  不知归路
    2021-01-24 18:50

    Probably you can have some trigger from a method like onCreate etc which would be the first method to be hit whenever your app is launched.

提交回复
热议问题