mdhossain026 / android-protips-location

Automatically exported from code.google.com/p/android-protips-location
0 stars 0 forks source link

Wrong Intent Filter in Manifest? #3

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Shouldn't the intent filter be for "android.intent.action.BATTERY_LOW" instead 
of "android.intent.action.ACTION_BATTERY_LOW"?

Intent.ACTION_BATTERY_LOW is the constant, but its value is 
android.intent.action.BATTERY_LOW.

"android.intent.action.ACTION_BATTERY_LOW" does not react to any intents on my 
phone, while "android.intent.action.BATTERY_LOW" does.

Original issue reported on code.google.com by icyerasor on 29 Jun 2011 at 10:22

GoogleCodeExporter commented 8 years ago
I verified this too.

When running with the original filter:
    <action android:name="android.intent.action.ACTION_BATTERY_LOW"/>
    <action android:name="android.intent.action.ACTION_BATTERY_OKAY"/>

I did not receive any notification in the stock receiver, after switching to:
    <action android:name="android.intent.action.BATTERY_LOW" />
    <action android:name="android.intent.action.BATTERY_OKAY" />

Everything worked as expected.

Original comment by daniel.m...@gmail.com on 25 Oct 2011 at 5:09

GoogleCodeExporter commented 8 years ago
Please correct this (also in your blog post : 
http://android-developers.blogspot.com.br/2011/06/deep-dive-into-location.html) 
has led to great confusion !

Original comment by the.u...@gmail.com on 22 Sep 2013 at 4:41