Page 1 of 1
Why does a compass need location?
Posted: Sat Sep 08, 2012 8:28 pm
by RobertC
For my first attempt I wrote a very simple compass (can be downloaded as a non-market app at
http://www.cailliau.org/C/C.html)
To make it work I had to tick the "coarse location" box:
This is strange, since the accelerometer can be used without, so the magnetometer should also be accessible. But the magnetometer is not even in the list alongside the accelerometer.
My question is:
Is the set of requirements and permissions dictated by Android or is it made up by runrev/LiveCode?
I would certainly classify the compass in the same league as the accelerometer, and it has certainly nothing to do with location!
As it is now, the app info says:
This app can access the following on your phone:
•Your location
coarse (network based) location
And it is manifestly not true that I need that, and I also guarantee that I do not do so.
Robert.
Re: Why does a compass need location?
Posted: Sun Sep 09, 2012 7:01 pm
by jacque
It's an Android requirement. It's mentioned in the comments here:
http://www.codingforandroid.com/2011/01 ... imple.html
Re: Why does a compass need location?
Posted: Tue Sep 11, 2012 5:38 pm
by RobertC
Thanks Jacque, that solves it.
I was afraid it was like that. It is again a nice example of the semantic mess sometimes created by programmers.
There are local sensors: the barometer, the magnetometer, the accelerometer (and the thermometer if there were one). One might put the sound pressure (microphone) in that list too, as well as the light sensor, the camera, the buttons and the touch screen.
None of these should need any permission to use.
Permissions should be about things that an app might do that the user might not want, such as access data from other sources e.g. contacts, gps, triangulated GSM location, … or worse, write out via WiFi or the network. Actually, even getting GPS should not need a permission since there is no data fed back to the GPS system. That is not the case when getting location from a GSM mast, since then the GSM mast knows where your phone is as the communication is bidirectional.
Even the camera should also be fine, as long as the app does not write data taken from it somewhere, including in local memory. An app that functions as a light meter using the camera should not need any permission.
So I find the two lists in the standalone settings panel confusing and inaccurate. But such is life...
Thanks again,
Robert.
Re: Why does a compass need location?
Posted: Tue Sep 11, 2012 6:40 pm
by jacque
I agree some of the permissions seem unreasonable. I haven't done any research on it, but I wonder if "permissions" is just another way of saying that those resources need to be loaded and activated when your app starts up. The Android OS may not do that automatically without being told, in order to save memory and battery.
Re: Why does a compass need location?
Posted: Tue Sep 11, 2012 7:40 pm
by RobertC
Yes, your analysis is probably correct.
Heinlein said the 21st century would be the age of the great semantic confusion, which I agree it seems to be.
But thanks again.
Well, and now I'm trying something more sophisticated (a text reader that scrolls automatically), but I get "Install parse failed inconsistent certificates". There is no old version on the device, I have selected "sign for development only", etc. Any clue?
Sigh. Being a newbie at 65 is hard...

Re: Why does a compass need location?
Posted: Wed Sep 12, 2012 4:52 am
by jacque
I have no idea why Android does this, but it seems to need a reset now and then. Usually deleting the .debug file fixes it:
http://forums.runrev.com/viewtopic.php? ... bug#p60739
Or maybe it's just that you used the same app ID as your other app? Each app needs to be unique.
Re: Why does a compass need location?
Posted: Wed Sep 12, 2012 7:37 am
by RobertC
Yep, that's it!
The file is ~/.android/debug.keystore
But for that:
(1) I have to find a person (you) who has this knowledge in her brain, because finding out in another way is extremely tedious and long,
(2) use Tinkertool to make hidden files visible in my home directory.
(3) now write the tip in a checklist somewhere and/or remember it.
This is why I often say that software is not engineered, but cobbled together. If your car worked that way you would ask for a complete refund plus interests and damages.
Thanks, and you need not answer the following rhetorical questions:
-- why is that file in my home directory instead of the SDK directory?
-- why does it go wrong?
-- how can we make a set of checks that is easier to use than hundreds of topics on a forum?
Sigh.
But thanks again Jaqueline,
have a nice week.
Re: Why does a compass need location?
Posted: Wed Sep 12, 2012 5:37 pm
by jacque
I'll answer the rhetorical questions anyway. The answer to the first two is "because Android SDK does it that way." Got me why.
The third question is harder. The problem is related to the Android SDK so it technically is outside the venue of LiveCode. On the other hand, lots of people get hit by it, so a reference somewhere in the docs would be good. When it happened to me, I had to ask too.