> I'm building a service that sends a broadcast intent when some value > changes. > The service sends the broadcast like this: > > Intent broadcastIntent = new Intent(); > broadcastIntent.setAction("nl.vu.contextframework.NEWREADING"); > broadcastIntent.setData(Uri.parse("context://"+cer.getKey())); > broadcastIntent.putExtra("reading",cer); > broadcastIntent.addCategory("nl.vu.contextframework.CONTEXT"); > sendBroadcast(broadcastIntent); > > > In some Activity (in a different process), I'm tryint to receive this > broadcast as follows: > > > IntentFilter intentFilter = new IntentFilter(); > intentFilter.addDataScheme("context"); > intentFilter.addCategory(CATEGORY_CONTEXT); > > registerReceiver(new BroadcastReceiver() { > public void onReceive(Context context, Intent intent) { > Log.d(TAG,"Received intent "+intent); > } > }, intentFilter); > > > The intent is never received though. What am I doing wrong? Does my > intentfilter not match the intent?
Does: "nl.vu.contextframework.CONTEXT" equal: CATEGORY_CONTEXT ? -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---