Well, there are many ways to do this.
Here is one simple way: You can use Broadcast to send these messages:
Intent i = new Intent(); i.setAction("broadcastName");
And what do you need the broadcast recipient in your activity:
private static class UpdateReceiver extends BroadcastReceiver { ListSmartsActivity reference; @Override public void onReceive(Context context, Intent intent) {
- change - Sorry, forgot to mention that you need to register your brochure just by doing this:
updateReceiver = new UpdateReceiver(); registerReceiver(updateReceiver, new IntentFilter("broadcastName"));
You can send as many transmissions as you need and register as many receivers as possible.
source share