How pass data from BroadcastReceiver to activity in Android?

How pass data from BroadcastReceiver to activity in Android?
Answer
Pass data from broadcast receiver to activity without reopening…
  1. Code.
  2. Open your project where you want to implement this.
  3. Open your BroadcastReceiver class from where you pass data to activity inside your onReceive() you need to start intent and pass data inside intent and start sendBroadcast() as shown bellow.
  4. Now register the receiver in activity where we get data.
  5. Note.
22 июн. 2015 г.
 

Tìm kiếm

Back
Top