How to registerReceiver in Fragment?
androidq
12
Points
1
Posts
|
I want to update recycler view through Alarm Manager at a sepcific interval. To this I'm using BroadcastReceiver to receive the task completion:
But getting error on registerReceiver and unregisterReceiver: All these variables and methods are blongs with activity. So use getActivity() to call these. - Stevan 15-Feb-2020 02:25
|
Answers
Rashmi
1068
Points
19
Posts
|
Yes, These variables and methods belongs to activity class. So we need to get parent active context to use these in fragment class:
Posted On:
15-Feb-2020 02:28
Thanks for quick response. - androidq 15-Feb-2020 02:31
|
Blog
Active User (0)
No Active User!