Android: How to getExtras from service that send an intent via broadcast programmtically WITHOUT BROADCASTRECEIVER?
===

I'd like to know how to pass data between a Service and an Activity without broadcastReceiver.

This is what I can't make:
1. I have a Service that periodically sends an intent via broadcast.
2. I want to get the extras of this intent from an activity when I want, without wait a broadcast receiver.

I tried to use this code:

      \\Service
      String BROADCAST_ACTION = "ACTION";
      Intent sendToUI = new Intent(BROADCAST_ACTION);
      sendToUI.putExtra("key", "value");
      sendBroadcast(sendToUI);


      \\Activity
      IntentFilter iF = new IntentFilter(MyService.BROADCAST_ACTION);
      Intent intent = c.registerReceiver(null, iF);
      Bundle extras = intent.getExtras();
      if(extras != null){
          String string = intent.getStringExtra("key");
     }

But I get a "nullpointerexception" because "intent" is always "null" (I get nullpointerexception NOT in Bundle extras BUT IN Intent intent LINE).



Please help me...
Many Thanks
                                          