Bug 56666 - Constant Intent.ActionProviderChanged has wrong value
Summary: Constant Intent.ActionProviderChanged has wrong value
Alias: None
Product: Android
Classification: Xamarin
Component: Bindings ()
Version: 7.3 (15.2)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Atsushi Eno
Depends on:
Reported: 2017-05-19 12:24 UTC by diegoxleon
Modified: 2017-06-23 19:50 UTC (History)
2 users (show)

Tags: bb
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description diegoxleon 2017-05-19 12:24:29 UTC
The current value of Intent.ActionProviderChanged is "android.intent.action.PROVIDER_CHANGED"

That won´t work with an intent filter. For instance:

[BroadcastReceiver(Exported = false)]
[IntentFilter(new[] { Intent.ActionProviderChanged })]
public class ProviderChangeReceiver : BroadcastReceiver {}

The OnReceive method will never fire.

However it works when setting the correct value:

[IntentFilter(new[] { "android.location.PROVIDERS_CHANGED" })]
Comment 1 Jon Douglas [MSFT] 2017-06-23 17:50:54 UTC
This value looks correct to me at first glance:


Constant Value: "android.intent.action.PROVIDER_CHANGED"

Xamarin.Android Value: public const string ActionProviderChanged = "android.intent.action.PROVIDER_CHANGED";

I believe you are confusing this value with the LocationManager's PROVIDERS_CHANGED_ACTION which is similarly worded, but in a completely different package.


Thus I am marking this as RESOLVED ANSWERED as these are two different constants. You should be using the LocationManager constant instead. This is found here when using Android.Locations:

Comment 2 diegoxleon 2017-06-23 19:47:28 UTC
You are correct about "android.intent.action.PROVIDER_CHANGED". I thought that was wrong. However, "android.location.PROVIDERS_CHANGED" is working fine. I didn´t try LocationManager.ProvidersChangedAction yet.

Comment 3 Jon Douglas [MSFT] 2017-06-23 19:50:19 UTC
They should be the same constant string. Whichever way you decide to get that string to your intent filter whether you type it in manually or via the constant provided.