On Sun, Mar 4, 2012 at 10:45 AM, Tom Ratajczak <[email protected]> wrote: > My application is to respond to the following intent > > Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("geo: > 45.0,34.0")); > > Filtering in the manifest is setup correctly and user is presented > with choice, but once the choice is made the activity does not respond > in > > receiver = new BroadcastReceiver() { > public void onReceive(Context context, Intent intent) { > Log.d("intent", "Received intent " + intent); > } > }; > > even though it was presumably set up correctly > > IntentFilter intentFilter = new IntentFilter(); > intentFilter.addDataScheme("geo"); > intentFilter.addAction(Intent.ACTION_VIEW); > registerReceiver(receiver, intentFilter); > > The same setup does respond to battery power change but for some > reason fails here. Any help is greatly appreciated.
ACTION_VIEW is an activity action. It is used with startActivity(). It is not used with sendBroadcast(). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/android/ -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

