On 25 jul, 14:00, "Mark Murphy" <mmur...@commonsware.com> wrote: > > Could it be that I'm using a non-existent scheme? > > I invented "context://" myself, maybe this is not a good idea? > > In theory that should work, though I haven't tried it myself. > > I take an Occam's Razor approach to intents and filters: they should be as > simple as possible, but no simpler. > > In your case, unless you are creating a content provider, I don't know the > value of your inventing schemes and using setData(). Just put the values > you need in the extras and filter on your action. >
I'm using the data because it allows me to receive only updates to specific keys by including them in the IntentFilter. Many of these intents may be fired and different applications may want to filter most of them out. Anyway, just to see if it helps, I tried not using the data and putting everything in the extras: Intent broadcastIntent = new Intent(); broadcastIntent.setAction("nl.vu.contextframework.NEWREADING"); broadcastIntent.putExtra("reading",cer); broadcastIntent.putExtra("key", cer.getKey()); broadcastIntent.addCategory("nl.vu.contextframework.CONTEXT"); sendBroadcast(broadcastIntent); and in the activity: IntentFilter intentFilter = new IntentFilter(); intentFilter.addCategory(CATEGORY_CONTEXT); registerReceiver(new BroadcastReceiver() { public void onReceive(Context context, Intent intent) { Log.d(TAG,"Received intent "+intent); } }, intentFilter); But I'm still not receiving anything. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---