When to use which constructor for ComponentName in Android?

后端 未结 3 948
夕颜
夕颜 2021-02-01 03:08

I am a little bit confused about the ComponentName class in Android.

There are different ways to get to a component name object, but I don\'t know when to use which... a

3条回答
  •  北恋
    北恋 (楼主)
    2021-02-01 03:29

    Or you can use like this inside BroadcastReceiver :

    ComponentName smsReceiver = new ComponentName(this, SMSReceiver.class);
    

提交回复
热议问题