[android-developers] why does not android.content.SharedPreferences#getAll() return an unmodifiable map ?

2013-12-10 Thread Palmer Eldritch
As per its docshttp://developer.android.com/reference/android/content/SharedPreferences.html#getAll%28%29: Note that you must not modify the collection returned by this method, or alter any of its contents. The consistency of your stored data is not guaranteed if you do. Is there a

[android-developers] setAccuracy vs setHorizontalAccuracy

2013-11-05 Thread Palmer Eldritch
setAccuracyhttp://developer.android.com/reference/android/location/Criteria.html#setAccuracy%28int%29 Indicates the desired accuracy for latitude and longitude. Accuracy may be ACCURACY_FINE if desired location is fine, else it can be ACCURACY_COARSE. More accurate location may consume more

[android-developers] why does SharedPreferences framework allow you to insert a preference with a null key - given it can't reload the preferences afterwards?

2013-10-30 Thread Palmer Eldritch
The preferences are apparently *cleared *when one tries to load them when there is a null key which is bad ! Reproducer : public class XmlExceptionTest extends AndroidTestCase { /** Run it twice - on the second run the exception is thrown */ public void testXmlException() {

[android-developers] Re: why does SharedPreferences framework allow you to insert a preference with a null key - given it can't reload the preferences afterwards?

2013-10-30 Thread Palmer Eldritch
after shutting down device or killing the app - Stack Overflow http://stackoverflow.com/questions/9803838/shared-preferences-get-lost-after-shutting-down-device-or-killing-the-app#comment12495021_9803838 On Wednesday, October 30, 2013 5:48:12 AM UTC-5, Palmer Eldritch wrote: The preferences

Re: [android-developers] Re: why does SharedPreferences framework allow you to insert a preference with a null key - given it can't reload the preferences afterwards?

2013-10-30 Thread Palmer Eldritch
at him for providing a guess at something he didn't even write. kris On Wed, Oct 30, 2013 at 2:02 PM, Palmer Eldritch the@gmail.comjavascript: wrote: On Wednesday, October 30, 2013 7:44:17 PM UTC+2, Nobu Games wrote: I quickly peeked into the source code and well

Re: [android-developers] Re: why does SharedPreferences framework allow you to insert a preference with a null key - given it can't reload the preferences afterwards?

2013-10-30 Thread Palmer Eldritch
action by Android devs, if none of them respond here. Kris On Wed, Oct 30, 2013 at 3:39 PM, Palmer Eldritch the@gmail.comjavascript: wrote: I did not mean to complain at Nobu - sorry if I sounded harsh :) I just wanted to point out that my question was not so much what happens

[android-developers] Re: can _ever_ the intent received by a BroadcastReceiver onReceive() method be null?

2013-07-14 Thread Palmer Eldritch
? No Receiving an object one hasn't the slightest idea about is apparently the android way - may be null or not - who cares as long as we can add an if Even in one of the most fundamental callbacks Maybe have a look at my links after all ? On Tuesday, July 9, 2013 3:46:41 PM UTC+3, Palmer Eldritch wrote

Re: [android-developers] Re: can _ever_ the intent received by a BroadcastReceiver onReceive() method be null?

2013-07-11 Thread Palmer Eldritch
you're supposed to receive an object. On Thursday, July 11, 2013 6:01:13 AM UTC+3, Palmer Eldritch wrote: I suspect it can't be null *by construction* - I just can't pin it down in code (or in docs) It's nice to be sure Can somebody point to the relevant code parts ? I mean what paths lead

Re: [android-developers] Re: can _ever_ the intent received by a BroadcastReceiver onReceive() method be null?

2013-07-11 Thread Palmer Eldritch
/ActivityThread.java#2335 On Thursday, July 11, 2013 4:09:27 PM UTC+3, Palmer Eldritch wrote: That's nice advice - but in this case I think one should have a guarantee Does it make sense to receive a null intent ? Is it even possible with the current android code ? On Thursday, July 11, 2013 9:46:00

[android-developers] Re: can _ever_ the intent received by a BroadcastReceiver onReceive() method be null?

2013-07-10 Thread Palmer Eldritch
I mean nobody knows ?? Do you ever check the intent for being null and if not why ? On Tuesday, July 9, 2013 3:46:41 PM UTC+3, Palmer Eldritch wrote: In other words : @Override public void onReceive(Context context, Intent intent) { final String action = intent.getAction

Re: [android-developers] Re: can _ever_ the intent received by a BroadcastReceiver onReceive() method be null?

2013-07-10 Thread Palmer Eldritch
:18:09 AM UTC+3, TreKing wrote: On Wed, Jul 10, 2013 at 4:14 PM, Palmer Eldritch the@gmail.comjavascript: wrote: I mean nobody knows ?? Do you ever check the intent for being null and if not why ? Here's what you do. Assume it will not be null, then use ACRA or some other bug

[android-developers] can _ever_ the intent received by a BroadcastReceiver onReceive() method be null?

2013-07-09 Thread Palmer Eldritch
In other words : @Override public void onReceive(Context context, Intent intent) { final String action = intent.getAction(); // can intent==null here ? } I need to solve this once and for all so please no ifs and buts. I would check for null but I suspect that it is not

[android-developers] Re: Exported receiver does not require permission - what should I do with BOOT receivers

2013-05-07 Thread Palmer Eldritch
define permission for the broadcaster since that broadcast is a system broadcast... On Monday, May 6, 2013 1:13:27 AM UTC+3, Palmer Eldritch wrote: What confuses me really is that I request a permission for _receiving_ a particular intent (whose action is boot_completed) - I do not define

[android-developers] Re: Exported receiver does not require permission - what should I do with BOOT receivers

2013-05-05 Thread Palmer Eldritch
any permissions for it. On Saturday, May 4, 2013 3:47:06 PM UTC+3, Palmer Eldritch wrote: Still interested in this 1. Why there is no warning : receiver !-- no warning -- android:name=.receivers.TriggerMonitoringBootReceiver android:enabled=false intent

[android-developers] Re: Exported receiver does not require permission - what should I do with BOOT receivers

2013-05-05 Thread Palmer Eldritch
from - it's not a quick test Also, considering this is only a warning, you're giving it way too much emphasis. I disagree - I do pay attention to warnings - I want none :) On Sunday, May 5, 2013 6:29:52 PM UTC+3, Palmer Eldritch wrote: Did you read the question ? If Exported

[android-developers] Re: Exported receiver does not require permission - what should I do with BOOT receivers

2013-05-05 Thread Palmer Eldritch
android.intent.action.QUICKBOOT_POWERON (another tip ;-)) and don't forget you need the app to run at least once before (yet another tip :-D) If you want 0 warnings, tell the compiler to stop showing them :) On Sunday, May 5, 2013 11:07:12 PM UTC+3, Palmer Eldritch wrote: On Sunday, May 5, 2013 6

[android-developers] Re: Exported receiver does not require permission - what should I do with BOOT receivers

2013-05-04 Thread Palmer Eldritch
is not displayed ? Which intents fall into this category ? Thanks :) On Saturday, April 20, 2013 3:44:52 PM UTC+3, Palmer Eldritch wrote: I have the following receivers declared : pre receiver !-- no warning -- android:name=.receivers.TriggerMonitoringBootReceiver

[android-developers] Re: My post hasn't appeared after 3 days

2013-04-30 Thread Palmer Eldritch
Excuse me I am facing a similar issue with my (twice posted) Exported receiver does not require permission Is some human moderating the forums or some machine - which obviously fails ? Please amend this situation - it is very frustrating - and no, I am no n00b - these are no SO questions -