title: Android Best Practice on Updating the UI from BroadcastReceiver to a certain activity
body: <p>When i have a broadcastReceiver say android.intent.action.MEDIA_BUTTON and i want to update the current activity's UI without creating a new activity, is there any good practice on this one?</p>
  
  <p>What i know (might not be correct)</p>
  
  <p>1) I can put the BroadcastReceiver in the same class as the activity and call the updateUI function after certain activity</p>
  
  <p>2) Create a ContentObserver?</p>
  
  <p>3) Communicate to a service created by the activity, use aidl. (I dont know how to get the current service if its registered from an activity)</p>
  
  <p>4) Create a custom filter on the broadcastReceiver located on the same class as the activity, and use context.sendBroadcast(msg of custom filter) and in the custom filter call updateUI (same as one but more generic?)</p>
  
  <p>The final flow is it would come from a BroadcastReceiver and ends up updating the UI without renewing the activity (unless the activity is dead?) </p>
  
  <p>Kindly provide links/source code on your how you tackle this kind of problem. Thanks a lot in advance :)</p>