yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] MichunB:
in my Altitude logs there are errors lately

error in insert.execute

An error occured in UpdateLatitude.doInBackground(): Write error: ssl=0x5aea9d58: I/O error during system call, Connection timed out

log fragment:

2012-12-10 10:04:06 Received Broadcast ACTION_BOOT_COMPLETED

2012-12-10 10:04:06 Autostart is set to run, starting service

2012-12-10 10:04:06 onCreate called

2012-12-10 10:04:06 registerLocationListener determined best provider: network

2012-12-10 10:04:06 Using provider 'network'

2012-12-10 10:04:06 Service started, received start id 1: Intent { cmp=com.asksven.betterlatitude/.LocationService }

2012-12-10 10:04:09 onLocationChanged called

2012-12-10 10:04:09 setQosAlarm called

2012-12-10 10:04:09 cancelQosAlarm

2012-12-10 10:04:09 updateLatitude called, prepating to update 1 locations

2012-12-10 10:04:09 Service Updating Latitude, stack entry 01 of 1

2012-12-10 10:04:09 updating latitude (insert.execute)

2012-12-10 11:04:09 QoS alarm triggered

2012-12-10 11:04:09 on Start Called

2012-12-10 11:04:09 setQosAlarm called

2012-12-10 11:04:09 cancelQosAlarm

2012-12-10 11:04:09 updateLatitude called, prepating to update 1 locations

2012-12-10 11:04:09 Service Updating Latitude, stack entry 01 of 1

2012-12-10 11:04:09 updating latitude (insert.execute)

2012-12-10 11:04:09 error in insert.execute

2012-12-10 11:04:09 An error occured in UpdateLatitude.doInBackground(): Write error: ssl=0x5aea9d58: I/O error during system call, Connection timed out

could you look at it

my position gets updated
[Android Apps and Games] MichunB:
sorry

when "error in insert.execute" occurs position is not updated - as position I mean Google Latitude
[Android Apps and Games] chamonix:
The error points to a communication error with the latitude server. Does the error persist? if yes do you have a data connection and may there be any kind of firewall or tool like JD or greenpower on your device preventing a data connection to be established?
[Android Apps and Games] MichunB:
yes, error persist

it happends once a 2 or 3 updates

it happends when on mobile data connection and when on wifi

I do not have any firewall installed
[Android Apps and Games] lwclam:
I found that it will keep accessing GPS for location, is there any option to use network location when I'm indoor?
[Android Apps and Games] chamonix:
Well I never turn off GPS and don't have that problem. What makes you sure that altitude is polling the position from GPS and what settings are you using?
[Android Apps and Games] lwclam:
If I switched on the GPS and indoor environment, it will keep searching for satellites and show the GPS icon on the notification bar.

my device is Galaxy Nexus with 4.2.1

my setting:

notifications status and geodata on; run as foreground service on; interval 10s; accuracy 50m; duration 15mins.
[Android Apps and Games] lwclam:
It keep searching for GPS when indoor
[Android Apps and Games] chamonix:
interval=10s and precision=50m is indeed fine grained precision and that's the reason why gps is accessed. Higher the accuracy and coarse precision will be requested, saving your battery.
[Android Apps and Games] chamonix:
Release 0.12RC2

New release is up.
[Android Apps and Games] wirtzpeitz:
That's precisely what I was referring to in my (ignored) post. It doesn't make any sense to specify accuracy. In a densely populated area you can get 50 m accuracy with WiFi only; in poor weather conditions or with an obstructed view you might not get 50 m accuracy even with GPS. So the sensible thing to do is to allow the user to choose the method for obtaining a location fix, not its accuracy. This is especially true in light of the fact that this app is supposed to save battery.
[Android Apps and Games] chamonix:
Well unfortunately accuracy is the way android selects the right location provider when both fine and coarse grained precisions are available to an app. ALTitude does not ask for altitude and requests the cheapest location provider. Of course you can get 50 m with Wifi as long as those are known and assuming the complement from cell tower location confirms, but the question is does android returns cell/wifi location when asking for 50 m. On the other hand and sticking to the concept and requesting for 200 m will return cell/wifi, potentially with a better precision than requested.

I understand that's not the way you expect it to work but it's the way it does right now per design (see here in the method requestLocationListener for details) and I don't feel like overriding that by deciding on the location provider as opposed to using "criteria" would be such a good idea.
[Android Apps and Games] MichunB:
I wiped my phone to be sure, its clean and fresh - my phone is i9300 stock rom XXELKC android 4.1.2

and still every other latitude update fails - and by the way why it updates latitude every 15min even when i'am not changing my position sitting in my home?

2012-12-27 20:01:28 QoS alarm triggered

2012-12-27 20:01:28 on Start Called

2012-12-27 20:01:28 setQosAlarm called

2012-12-27 20:01:28 cancelQosAlarm

2012-12-27 20:01:28 updateLatitude called, prepating to update 1 locations

2012-12-27 20:01:28 Service Updating Latitude, stack entry 01 of 1

2012-12-27 20:01:28 updating latitude (insert.execute)

2012-12-27 20:16:28 QoS alarm triggered

2012-12-27 20:16:28 on Start Called

2012-12-27 20:16:28 setQosAlarm called

2012-12-27 20:16:28 cancelQosAlarm

2012-12-27 20:16:28 updateLatitude called, prepating to update 1 locations

2012-12-27 20:16:28 Service Updating Latitude, stack entry 01 of 1

2012-12-27 20:16:28 updating latitude (insert.execute)

2012-12-27 20:16:28 error in insert.execute

2012-12-27 20:16:28 An error occured in UpdateLatitude.doInBackground(): null

2012-12-27 20:31:28 QoS alarm triggered

2012-12-27 20:31:28 on Start Called

2012-12-27 20:31:28 setQosAlarm called

2012-12-27 20:31:28 cancelQosAlarm

2012-12-27 20:31:28 updateLatitude called, prepating to update 1 locations

2012-12-27 20:31:28 Service Updating Latitude, stack entry 01 of 1

2012-12-27 20:31:28 updating latitude (insert.execute)

2012-12-27 20:46:28 QoS alarm triggered

2012-12-27 20:46:28 on Start Called

2012-12-27 20:46:28 setQosAlarm called

2012-12-27 20:46:28 cancelQosAlarm

2012-12-27 20:46:28 updateLatitude called, prepating to update 1 locations

2012-12-27 20:46:28 Service Updating Latitude, stack entry 01 of 1

2012-12-27 20:46:28 updating latitude (insert.execute)

2012-12-27 20:46:28 error in insert.execute

2012-12-27 20:46:28 An error occured in UpdateLatitude.doInBackground(): null

please help!
[Android Apps and Games] cdmackay:
thanks much! will test as soon as I get over this flu...
[Android Apps and Games] chamonix:
Fingers crossed that you are up till ny eve
[Android Apps and Games] chamonix:
The regular update every 15 is from qos that updates your position even if you are not moving. You can turn off that in prefs.

I see the error but unfortunately no cause so I'll add some more logging. Are you using the rc?

Edit: I don't remember if I asked you already but are you using anything to control your data connection like jd or green power?
[Android Apps and Games] MichunB:
1. what option turns off qos? Enforce interval? I have it off

2. its play store version but I can install RC if needed

3. I am on stock rom without any additional power savers
[Android Apps and Games] chamonix:
I'll check my own logs to start with, qos is indeed force interval but if it's off it's not supposed to happen. You can stay on the gplay version for now, I'll add the logging first and publish an RC after checking on qos.
[Android Apps and Games] chamonix:
Release 0.12RC3

New release is up fixing QoS alarms being always triggered and implementing a better strategy for not using "gps" when accuracy is > 100m (should help users having GPS always on)
[Android Apps and Games] TheInVisibleGoD:
I have been using Latitude for 2 months and today just bought your app in hope of getting better battery life...

Using 0.12RC3, it seems is also updating my location when not moving at home, even with the option "Enforce Interval" disabled!

Other than this, seems working fine, don't have any report yet about battery life though...
[Android Apps and Games] chamonix:
RC3 adresses exactly that: QoS was triggered even if unticked. Could you please provide a log?
[Android Apps and Games] MichunB:
QOS issue seems to be resolved - checked on my i9300 and i9100 my wife's

but I observed about 10% drop (BMWpro) in battery capacity left when I switched off QOS mode

"error in insert.execute" still persist and I do not see in this version any special logging
[Android Apps and Games] chamonix:
I am so sorry, I forgot. New version is coming in a few minutes
[Android Apps and Games] chamonix:
Release 0.12RC4

New version is up
[Android Apps and Games] TheInVisibleGoD:
You're right, my bad... It seems was bad configured on Latitude side! ;)
[Android Apps and Games] chamonix:
I am glad to head that. Latest RC is going to head to gplay in the next days.
[Android Apps and Games] chamonix:
Final release v0.12 is rolling out on gplay
[Android Apps and Games] MichunB:
for start I love new status windows and 'enable' option

but 0.12 version behaves strangely

I can not force it to turn on QoS (enforce interval)

and it has problem with event time:

- look at the time of consecutive events

2013-01-02 17:39:59 updating latitude (insert.execute)

2013-01-02 17:55:04 QoS alarm triggered

2013-01-02 17:39:59 setQosAlarm called

2013-01-02 17:39:59 cancelQosAlarm

2013-01-02 17:39:59 updateLatitude called, prepating to update 1 locations

...

2013-01-02 18:08:11 updating latitude (insert.execute)

2013-01-02 18:23:16 QoS alarm triggered

2013-01-02 18:08:11 setQosAlarm called

2013-01-02 18:08:11 cancelQosAlarm

2013-01-02 18:08:11 updateLatitude called, prepating to update 1 locations

it does not happen every time I just catched it a few times

and no extended logging :(

2013-01-02 17:39:59 error in insert.execute

2013-01-02 17:39:59 An error occured in UpdateLatitude.doInBackground(): null

maybe it will be good for debug reason make logging more verbose, log enable/disable latitude and enable/disable option events
[Android Apps and Games] MichunB:
going back to logs

status window says that there was update at 21.21.27 but log has last event at 19.54.48
[Android Apps and Games] chamonix:
I would need a few more precisions to understand the log: what update frequency is set in your preferences?

Also you you provide a whole logcat with timestamp (logcat -v time) as it may contain more valuable debug and error information than the own log?
[Android Apps and Games] chamonix:
I have noticed that too: https://github.com/asksven/ALTitude/issues/71
[Android Apps and Games] MichunB:
frequency update is set to 15min

as I'm not too good with the debug tools, can you give me some tips to provide "whole logcat with timestamp"?
[Android Apps and Games] chamonix:
If you have adb on your pc connect it to usb and type: adb logcat -v time

Alternatively you can use alogcat with the appropriate logging format
[Android Apps and Games] MichunB:
altitude log:

https://www.dropbox.com/s/6aalmccoetkhr3y/betterlatitude.log

and logcat

https://www.dropbox.com/s/3l44foeddwtbwh3/logcat.txt

and for reminder update frequency is set to 15min
[Android Apps and Games] chamonix:
Ok, the good news is the logcat contains the whole information (callstack) about connection errors (always the same pattern). I left out the not so important part:

01-03 14:20:45.730 D/LocationService(12284): updating latitude (insert.execute)
01-03 14:20:45.830 E/LocationService(12284): error in insert.execute
01-03 14:20:45.830 E/LocationService(12284): An error occured in UpdateLatitude.doInBackground(): null
01-03 14:20:45.845 E/LocationService(12284): Exception info: java.io.EOFException
01-03 14:20:45.845 E/LocationService(12284):	at libcore.io.Streams.readAsciiLine(Streams.java:203)
01-03 14:20:45.845 E/LocationService(12284):	at libcore.net.http.HttpEngine.readResponseHeaders(HttpEngine.java:560)
01-03 14:20:45.845 E/LocationService(12284):	at libcore.net.http.HttpEngine.readResponse(HttpEngine.java:813)

Translated it says the header returned from the Latitude API call is either empty or truncated.

At another place in the log I see:

01-03 13:28:25.105 D/FirewallPolicy( 2271): getURLFilterEnabled(true)

suggesting that you are using a local firewall. Now I can't tell for sure if the Latitude problem is related to some firewall filters but I would suggest that you check the firewall log for any drops and maybe make a test with the firewall disabled. You could also check if calling the google api URL from the browser.

About the alarms interval there is a bug in the interval displayed in the status: https://github.com/asksven/ALTitude/issues/72

Working on a fix for that and will upload here for testing in a few
[Android Apps and Games] chamonix:
Checking your last logcat and looking at your screenshot I think I have found the reason for the timings:

13:39:37.790 D/QosAlarmReceiver(10239): QoS alarm triggered
13:54:38.255 D/QosAlarmReceiver(11617): QoS alarm triggered -> 15 minutes, OK
14:05:44.555 D/LocationService(12284): onCreate called <---- the service was restarted so a new alarms scheduled
14:20:45.650 D/QosAlarmReceiver(14833): QoS alarm triggered -> 15 minutes, OK
14:35:45.725 D/QosAlarmReceiver(14833): QoS alarm triggered- > 15 minutes, OK
14:50:46.055 D/QosAlarmReceiver(16471): QoS alarm triggered -> 15 minutes, OK
15:06:01.970 D/QosAlarmReceiver(19803): QoS alarm triggered -> acceptable deviation for 15 minutes, OK
15:13:29.935 D/LocationService(23279): onCreate called <---- the service was restarted so a new alarms scheduled
15:28:30.505 D/QosAlarmReceiver(25425): QoS alarm triggered -> 15 minutes, OK

As you see the service gets restarted and this is what causes the QoS alarm to float. Now why does the service get restarted as it never crashes?

I see Multiple possible reasons:

1. you suffer from warm reboot (userland resets)

2. you use a task killer

3. you suffer from memory shortage or your ROM has a memory leak leading android to terminate services (I tend to that one as I see that many services restart from time to time in your log)

What you should do is check if any of those apply. If you have a memory leak you should talk to the ROM dev. What may help is to run the service as foreground service as this would prevent it from being killed (this would cure the real cause)
[Android Apps and Games] MichunB:
I am confused :(

I am not using any firewall app - does stock samsung i9300 rom contain any firewall?

and supposedly if it was firewall why some updates succeed and some do not?

ad 1 - do not know

ad 2 - do not use any task killers

ad 3 - I use stock i9300 rom and I have always about 120MB of RAM free - according to System Tuner Pro

I try to turn on foreground service option and look what happens

Thanx for your help :)
[Android Apps and Games] MichunB:
I have turn on foreground service and there is no restarts in logcat, QoS works with set 15min

but and this is big BUT :) I do not like this ongoing notification it anoys me and steals plece from normal notifications

is there another way to keep altitude from been killed? maybe existing homescreen widget would do (BMW uses widget to stay alive) or widget with ... hmm ... last update time :)
[Android Apps and Games] chamonix:
I don't know if that would help but ALTitude has a widget. That is a workaround, the solution would be to find what causes the service to get stopped as this is no normal behavior of android
[Android Apps and Games] MichunB:
any suggestion how to do that?
[Android Apps and Games] chamonix:
The last cause of that I know of was the memory leak in early cm10 version on sgs3 but it's hard to say. As I saw from your log not only ALTitude but all your services get stopped so you may find other people with the same problem and maybe a dev willing to look into that in your favorite device thread
[Android Apps and Games] lordgoata:
You can disable per app notification icons in JellyBean and it will keep running in the foreground (the notifications are just hidden):

Open the notifications, long click on the notification until "App info" appears, then select that. Now disable the "Show notifications".

I'm not sure what version of Android the I9300 is running these days, but it if is JB and the option doesn't exist, complain to Samsung!

Hope that helps,
[Android Apps and Games] azrash:
hi chamonix

my Altitude is set with an interval of 60 minutes and set to run at foreground. I realized that it will only update the location once.

However if i change the setting to not run at foreground, it will adhere to the interval set and will update every 60 minutes.

is this an intended behaviour?

thanks
[Android Apps and Games] chamonix:
First let me ask: are you referring to the 60 minutes set as "interval" of have you also checked ""enforce interval". Could you post a logcat showing that behavior?
[Android Apps and Games] TheInVisibleGoD:
I'm not quite sure if I have Latitude well configured with Altitude...

Can anyone tell exactly what do I have to disable in Latitude in order to just update my location with Altitude?

Thanks in advance.
[Android Apps and Games] azrash:
Yes I have set 60 minutes as the interval. However I have not checked the 'enforce interval'. This won't update latitude at all throughout the night. So i guess the app is behaving as intended? Thanks for clarifying

Checking the enforce interval would update latitude properly at the interval set.

Sent from my Desire Z
[Android Apps and Games] cdmackay:
Just set "location manually selected" in Latitude (i.e. in Maps/Settings/Location).
[Android Apps and Games] igalan:
I discovered with Better Battery Stats that Google's Latitude is a huge power drain on my Nexus 4. Because Latitude is useful I started looking for a solution, and I found ALTitude :) .

I've been trying to use ALTitude but it doesn't work on my Nexus 4, after a while it gets stuck and no longer updates the position. I haven't found a manual or guide explaining what the settings do, so I've tried setting update interval to 1 minute instead of the default 5 seconds, precision to 100 m and update every 15 minutes as default. Google Maps is set to manually update my position and location sharing is enabled.

With these settings it works for a while. Then no updates are pushed, the notification icon is still there, I open ALTitude and it says that the position was updated like 5 hours ago and that's it. I have to kill it and restart it. This happens usually every day.

Also there is a widget that I have no idea what it does. When I add it, it seems to toggle between two states, one with a clock.

Any help will be appreciated.
[Android Apps and Games] chamonix:
Release 1.13RC1

New release is up, introducing locale/tasker/llama plugin to set location manually. Have fun!
[Android Apps and Games] igalan:
I've tried it again and it doesn't work on my Nexus 4. It does a few updates and then it stops, it won't last for 12 hours before silently dying.

I had it installed on my wife's Samsung Galaxy S-II and there it lasted two or three days before it stopped working.

Besides, if you have two way authentication it's a bit of a pain to enable it, because when you log in to Google with your email and password, if you switch to Google Authenticartor to get the code, and go back to ALTitude to write it, it reverts back to the login screen and you have to type again the email and password and then the code fast enough for it not to expire (and you have to memorize it).

Any suggestion? Thanks.
[Android Apps and Games] ngoonee:
Re: [APP][2.2+][03 Jan-0.12.1] ALTitude, Latitude updater with a low battery footprin

Use a different browser to login to Google than stock?
[Android Apps and Games] igalan:
I'm referring to the browser screen inside ALTitude, the first time you set it up...
[Android Apps and Games] ngoonee:
Re: [APP][2.2+][03 Jan-0.12.1] ALTitude, Latitude updater with a low battery footprin

Yes, that's the stock browser, so just open another browser to log in to Google (chrome for example) to get your app-specific password. Or use a computer.
[Android Apps and Games] igalan:
Oh, ok, I can generate an app-specific password, instead, I didn't think about that route. Anyway the main problem is that ALTitude stops working and I have to kill it. Could this be because I was using Google Authenticator instead of app-specific passwords? I checked that ALTitute was in the allowed list.
[Android Apps and Games] payne_307:
Settings understanding

I have the full version of ALTitude. I want to know what does Enforce Update Interval do. I mean how does ALTtitude decide when to update Latitude and when not to update Latitude. Also is 5 mins or 15 mins interval better for polling? And does network steal help anyway to conserve battery or is it just another battery draining option because the app is continuously listening for other apps to provide network information.

I need to ensure my phone conserves maximum battery and also people don't see my stale location. Has anyone figured out or advice what's the best/most optimal setting for being updated and also conserve maximum battery? This is driving me crazy.
[Android Apps and Games] chamonix:
Re: [APP][2.2+][03 Jan-0.12.1] ALTitude, Latitude updater with a low battery footprin

QoS makes sure that your location is updated even when you are not moving and avoid outdated locations (stall). The optimal setting really depends on your use case but for me for example the default (coarse) is pretty good as I travel a lot by (fast) train and want to avoid both (expensive) GPS location and too frequent updates
[Android Apps and Games] payne_307:
Thanks. I will do a hit & trial to find whats better interval, but does location steal drain more battery than coarse location polling over Cell Triangulation? In Backitude it did but not sure about ALTitude. Also does QoS causes more wakelocks or it doesn't matter?
[Android Apps and Games] lordgoata:
Ah you are alive Chamonix :) Did you get my email about ALTitude and some more suggestions related to the new tasker location plugin facility I sent a couple weeks ago ?
[Android Apps and Games] Nathanf:
Hi there,

I've just purchased this app, as I realised I lose 40% battery overnight with Latitude on, and only 6% with it off. ALTitude looks as though I can get the best of both worlds, but I'm afraid I simply do not understand the settings.

On my Google Maps Location Settings I have Enable Location Sharing ticked, Location Reporting is set to "Location manually selected on the map" and Report from this device is unticked and grayed out.

All right so far?

Within ALTitude I have all standard settings except in the preferences I changed

Start on boot - enabled

Accuracy - 500m

Enforce interval - enabled

With these settings I assumed that every 15 minutes, my location would be updated on Latitude, to within 500m, even if I had not moved? But this does not happen and on the main screen I see

Current mode: Normal

Remaining: -

Accuracy: 500m

Interval: 15min

Updated: 18:25:29

I would have thought, that at 18:40:29, and update would be forced with these settings?

Also, what do the Quick Action Settings do?!!!

All I want is my location updating every 15mins, even if I have not moved, to within 500m. How can I set this please?

Nathan
[Android Apps and Games] chamonix:
Sorry for being irresponsive via mail. I had read your feature requests but it took a while to respond as I have not been near my private dev laptop for a while. I guess it's easier if we continue the discussion by mail, I will add feature requests once for the two open questions I mailed as soon as I am sure that I understood the use cases.

If anyone want to follow the discussion please feel free to check the open feature requests on github
[Android Apps and Games] Nathanf:
Just an update, I'm not sure what has changed but it now updates, but not on a 15 minutes schedule.

So I still need to understand what I've set wrong, but it does seem to be saving me a load of battery so far!