How to use/locate LocalBroadcastManager
as described in google docs and Service broadcast doc?
I tried to google it, but there is no code available to s
LocalBroadcastManager localBroadcastManager = LocalBroadcastManager.getInstance(this);
Replace
registerReceiver(new YourReceiver(),new IntentFilter("YourAction"));
With
localBroadcastManager.registerReceiver(new YourReceiver(),new IntentFilter("YourAction"));
Replace
sendBroadcast(intent);
With
localBroadcastManager.sendBroadcast(intent);
Replace
unregisterReceiver(mybroadcast);
With
localBroadcastManager.unregisterReceiver(mybroadcast);