[APP] AGPS Injector Widget v1.0.5

Android development for HTC HD2/Leo
Moderator: Forum Moderator

Re: [APP] AGPS Injector Widget v1.0.3

Postby ra9na » Wed Oct 23, 2013 8:46 am

I have a questiuon and a feature request.
In the old days of my HD2, when it still was on WinMo 6.5, there was a tool called QuickGPS. I think it did almost the same thing like your Injector Widget, except that it also showed how long the AGPS data is valid (so kind of a countdown).
So my question is: how long is the data inside xtra.bin valid?
A nice feature would be to add a timer to the widget which shows not the timestamp of the time of downloading the xtra.bin, but a counter which shows the time how long the AGPS data is still valid.
And an even better feature would be to refresh AGPS data automatically when it gets invalidated.
ra9na
Junior Member
 
Posts: 16
Joined: Wed Oct 23, 2013 8:40 am
Country: Germany (de)
Has thanked: 2 times
Been thanked: 6 times

Advertisement
 

Re: [APP] AGPS Injector Widget v1.0.3

Postby tytung » Fri Oct 25, 2013 12:15 pm

ra9na wrote:I have a questiuon and a feature request.
In the old days of my HD2, when it still was on WinMo 6.5, there was a tool called QuickGPS. I think it did almost the same thing like your Injector Widget, except that it also showed how long the AGPS data is valid (so kind of a countdown).
So my question is: how long is the data inside xtra.bin valid?
A nice feature would be to add a timer to the widget which shows not the timestamp of the time of downloading the xtra.bin, but a counter which shows the time how long the AGPS data is still valid.
And an even better feature would be to refresh AGPS data automatically when it gets invalidated.

AGPS data (xtra.bin) is valid for 7 days. But the older the data is, the longer you get a GPS lock/fix.
So you should keep xtra.bin as fresh as possible if you use a lot of GPS related apps and care about the TTFF (time to first fix in cold lock).
In other words, you shouldn't refresh AGPS data only after it gets invalidated.

Regarding why not use a timer, it's just a design choice for me.
I like to see the timestamp, not the countdown (7, 6, 5, ..., 1 day(s)).
With countdown, it seems that a bomb will be exploded. :lol:
Paste your logcat to GitHub Gist or any similar websites, and link it in your post if you need any help. (Don't forget to tell us your HD2 setup/configuration.)

Device: HTC HD2 (LEO512)
HSPL: 2.08.HSPL
Radio: Leo_RADIO_2.15.50.14
Bootloader: MAGLDR v1.13
Recovery: ClockworkMod Recovery 5.0.2.6

My work for Android on HD2:
Image
User avatar
tytung
Site Admin
 
Posts: 588
Joined: Sun Jun 09, 2013 2:12 pm
Country: Taiwan (tw)
Has thanked: 204 times
Been thanked: 1349 times

Re: [APP] AGPS Injector Widget v1.0.3

Postby ra9na » Fri Oct 25, 2013 12:43 pm

Thanks for your answer!
So maybe you could add an option, to switch between timestamp and countdown ;) ...
And what about the auto update?
As long as the GPS toggle is off, it won't update. I don't have GPS on all the time, but I would like to use the auto update.
So is it possible, that AGPS Injector is enabling GPS itself and disables it after update?
ra9na
Junior Member
 
Posts: 16
Joined: Wed Oct 23, 2013 8:40 am
Country: Germany (de)
Has thanked: 2 times
Been thanked: 6 times

Re: [APP] AGPS Injector Widget v1.0.3

Postby tytung » Fri Oct 25, 2013 2:14 pm

ra9na wrote:Thanks for your answer!
So maybe you could add an option, to switch between timestamp and countdown ;) ...
And what about the auto update?
As long as the GPS toggle is off, it won't update. I don't have GPS on all the time, but I would like to use the auto update.
So is it possible, that AGPS Injector is enabling GPS itself and disables it after update?

We discussed it before.
Only a system app can enable GPS programmingly without the user's interaction.
I know how to do it, but I have no free time to try it so far.

By the way, may I know the reason why to keep GPS off?
It won't consume any battery if you just keep GPS on but don't run any app that uses GPS.
Paste your logcat to GitHub Gist or any similar websites, and link it in your post if you need any help. (Don't forget to tell us your HD2 setup/configuration.)

Device: HTC HD2 (LEO512)
HSPL: 2.08.HSPL
Radio: Leo_RADIO_2.15.50.14
Bootloader: MAGLDR v1.13
Recovery: ClockworkMod Recovery 5.0.2.6

My work for Android on HD2:
Image
User avatar
tytung
Site Admin
 
Posts: 588
Joined: Sun Jun 09, 2013 2:12 pm
Country: Taiwan (tw)
Has thanked: 204 times
Been thanked: 1349 times

Re: [APP] AGPS Injector Widget v1.0.3

Postby ra9na » Fri Oct 25, 2013 2:20 pm

Well as far as I know, there are some system apps, which are trying to locate your position. And if GPS is turned on, it will use GPS to do so. If it's turned off, it will use WiFi and GSM.
Latitude did do this for example, but this tool has been discontinued. Maybe there are other apps, which do the same. But I don't know for sure... so it's just for safety reasons to save some battery :D .
ra9na
Junior Member
 
Posts: 16
Joined: Wed Oct 23, 2013 8:40 am
Country: Germany (de)
Has thanked: 2 times
Been thanked: 6 times

Re: [APP] AGPS Injector Widget v1.0.3

Postby tytung » Fri Oct 25, 2013 8:42 pm

ra9na wrote:Well as far as I know, there are some system apps, which are trying to locate your position. And if GPS is turned on, it will use GPS to do so. If it's turned off, it will use WiFi and GSM.
Latitude did do this for example, but this tool has been discontinued. Maybe there are other apps, which do the same. But I don't know for sure... so it's just for safety reasons to save some battery :D .

You can check Settings -> Battery and click the graph to see if GPS was used or not.
AFAIK, GPS is rarely used by system apps.
Besides, you can install App ops Launcher (only if you use Android 4.3) to see which apps access your location.
Paste your logcat to GitHub Gist or any similar websites, and link it in your post if you need any help. (Don't forget to tell us your HD2 setup/configuration.)

Device: HTC HD2 (LEO512)
HSPL: 2.08.HSPL
Radio: Leo_RADIO_2.15.50.14
Bootloader: MAGLDR v1.13
Recovery: ClockworkMod Recovery 5.0.2.6

My work for Android on HD2:
Image
User avatar
tytung
Site Admin
 
Posts: 588
Joined: Sun Jun 09, 2013 2:12 pm
Country: Taiwan (tw)
Has thanked: 204 times
Been thanked: 1349 times

Re: [APP] AGPS Injector Widget v1.0.3

Postby NYLimited » Fri Oct 25, 2013 9:31 pm

tytung wrote:You can check Settings -> Battery and click the graph to see if GPS was used or not.
AFAIK, GPS is rarely used by system apps.
Besides, you can install App ops Launcher (only if you use Android 4.3) to see which apps access your location.


Just curious.. Some apps get location info from Google Services instead of actually requesting location service. I am guessing this would not work for such apps.


---
Any clod can have the facts, but having an opinion is an art.

Cheers!
Image


MY DEVICES: show
  • LG-H901 (V10) - Stock, rooted, TWRP
  • Google Nexus 4 - Stock 5.1.1, Franco kernel, TWRP - Retired
  • Google Nexus 7 - 2012 3G model, Stock 5.1.1, Franco kernel, TWRP - Retired
  • HTC HD2 - Retired
  • HTC P4350 (TMO Wing) - Retired


User avatar
NYLimited
Forum Moderator
 
Posts: 395
Joined: Mon Jun 24, 2013 5:01 pm
Location: 40.75659° N 73.98626° W
Country: United States (us)
Has thanked: 128 times
Been thanked: 255 times

Re: [APP] AGPS Injector Widget v1.0.3

Postby tytung » Mon Oct 28, 2013 4:49 pm

NYLimited wrote:
Just curious.. Some apps get location info from Google Services instead of actually requesting location service. I am guessing this would not work for such apps.


---
Any clod can have the facts, but having an opinion is an art.

Could you give us examples of some apps that get location info from Google Services?
Let's check if we can see more info by using App ops.
Paste your logcat to GitHub Gist or any similar websites, and link it in your post if you need any help. (Don't forget to tell us your HD2 setup/configuration.)

Device: HTC HD2 (LEO512)
HSPL: 2.08.HSPL
Radio: Leo_RADIO_2.15.50.14
Bootloader: MAGLDR v1.13
Recovery: ClockworkMod Recovery 5.0.2.6

My work for Android on HD2:
Image
User avatar
tytung
Site Admin
 
Posts: 588
Joined: Sun Jun 09, 2013 2:12 pm
Country: Taiwan (tw)
Has thanked: 204 times
Been thanked: 1349 times

Re: [APP] AGPS Injector Widget v1.0.3

Postby NYLimited » Mon Oct 28, 2013 5:34 pm

tytung wrote:You can check Settings -> Battery and click the graph to see if GPS was used or not.
AFAIK, GPS is rarely used by system apps.
Besides, you can install App ops Launcher (only if you use Android 4.3) to see which apps access your location.


I remember dealing with this some time ago after Google introduced mixed location services. I would have to backtrack and find some of those apps (most were commercial apps, not on the Play store). Some of the apps were using Google Services Framework, perhaps as a backup if direct location access fails.

The one that comes back to mind off-hand is Google MAPS. It is shown to use location in the App ops launcher, however, for Maps not to find you one needs to restrict location access for Google Services too. Restricting only Maps from getting location info is not sufficient and it will continue to find / locate you even if access to location has been blocked.

There were a few others like it which were not by Google but I do not off-hand recall what they were, sorry.

Cheers!
Image


MY DEVICES: show
  • LG-H901 (V10) - Stock, rooted, TWRP
  • Google Nexus 4 - Stock 5.1.1, Franco kernel, TWRP - Retired
  • Google Nexus 7 - 2012 3G model, Stock 5.1.1, Franco kernel, TWRP - Retired
  • HTC HD2 - Retired
  • HTC P4350 (TMO Wing) - Retired


User avatar
NYLimited
Forum Moderator
 
Posts: 395
Joined: Mon Jun 24, 2013 5:01 pm
Location: 40.75659° N 73.98626° W
Country: United States (us)
Has thanked: 128 times
Been thanked: 255 times

Re: [APP] AGPS Injector Widget v1.0.4

Postby tytung » Tue May 27, 2014 8:53 am

V1.0.4:
  • Add a checkbox to decide whether to auto inject the AGPS data every time when connected to a Wi-Fi network.
  • Add a confirm dialog before going to the built-in Location setting if clicking the "Inject now" button and GPS is off.

Note: I have uploaded v1.0.4 to Google Play. It needs some time to show up.
Paste your logcat to GitHub Gist or any similar websites, and link it in your post if you need any help. (Don't forget to tell us your HD2 setup/configuration.)

Device: HTC HD2 (LEO512)
HSPL: 2.08.HSPL
Radio: Leo_RADIO_2.15.50.14
Bootloader: MAGLDR v1.13
Recovery: ClockworkMod Recovery 5.0.2.6

My work for Android on HD2:
Image
User avatar
tytung
Site Admin
 
Posts: 588
Joined: Sun Jun 09, 2013 2:12 pm
Country: Taiwan (tw)
Has thanked: 204 times
Been thanked: 1349 times

PreviousNext

Return to HD2 Android Development

Who is online

Users browsing this forum: No registered users and 0 guests

cron