How do I know if my broadcast receiver is registered?

How do I know if my broadcast receiver is registered?
Answer
  1. You can put a flag into your class or activity. Put a boolean variable into your class and look at this flag to know if you have the Receiver registered.
  2. Create a class that extends the Receiver and there you can use: Singleton pattern for only have one instance of this class in your project.
26 авг. 2010 г.
 

Tìm kiếm

Back
Top