[APP] AGPS Injector Widget v1.0.5

Android development for HTC HD2/Leo
Moderator: Forum Moderator

[APP] AGPS Injector Widget v1.0.5

Postby tytung » Sun Sep 08, 2013 5:46 pm

AGPS Injector Widget is an Android widget for quickly injecting the NTP (Network Time Protocol) time and AGPS data (Assistant-GPS data, i.e., xtra.bin) into the Qualcomm's gpsOne engine to significantly speed up the GPS lock time for Qualcomm CPU-equipped devices.

Features:
  • Click the widget to download and inject the NTP time and AGPS data into the gpsOne engine.
  • Display the AGPS injection date and time in the widget.
  • Decide to show which type of the notification after the AGPS injection is finished.
  • Schedule the AGPS injection.
  • Jump to the built-in Location setting if GPS is off.
  • Decide whether to auto inject the AGPS data when connected to a Wi-Fi network.

Notes:
  • Not all GPS-enabled devices support AGPS injection. (All Qualcomm CPU-equipped devices should be supported.)
  • Internet is required to download the NTP time and AGPS data.
  • You need to turn GPS on when injecting the AGPS data.

Download:

Changelog:

  • V1.0.5:
    • Fix the bugs in v1.0.4.
  • 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.
  • V1.0.3:
    • Jump to the built-in Location setting if GPS is off. (Thanks Nikola G. for finding out the GPS ON trick.)
    • Fix the false negative message again.
  • V1.0.2:
    • Fix the false negative message that AGPS injection is not supported by the device.
    • Fix the force close when running the app after unchecked "Show this dialog every time".
    • Add the source code compatibility to fix a bug on Gingerbread.
    • Enable Proguard to optimize the app size.
  • V1.0.1
    • Popup a message if the AGPS injection is not supported by the device.
    • Add a "Inject AGPS now" button to the app.
    • Bug fixes.

Screenshots:
Image Image
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

Advertisement
 

Re: [APP] AGPS Injector Widget v1.0.1

Postby tytung » Sat Sep 14, 2013 7:56 pm

V1.0.1:
  • Popup a message if the AGPS injection is not supported by the device.
  • Add a "Inject AGPS now" button to the app.
  • Bug fixes.

Note: I have uploaded v1.0.1 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

Re: [APP] AGPS Injector Widget v1.0.1

Postby Nikola G. » Tue Sep 17, 2013 5:18 pm

Hey tytung, quick question about the widget.

I have been successfully using the widget from the moment that you published it. It worked fine after upgrading to [Sep. 7, 2013][ROM][JB][4.3][720p] NexusHD2-JellyBean-CM10.2 V3.1 ROM, but all of a sudden, I can see the error message "AGPS data injection is not available for this device" popping up when I try to perform injection. I have a TMOUS HD2 Leo.

I was just wondering, is this some kind of error on my side, or do you have any suggestion as to why only recently I started getting this error message?

Appreciate the time to look over this, thanks a ton.

- Nikola
Device: HTC HD2 (LEO1024)
Radio: 2.15.50.14
HSPL: 2.08.HSPL by DFT's bepe and Cotulla
WinMo: /
Android: [Dec. 21, 2013][ROM][KK][4.4.2] NexusHD2-KitKat-CM11.0 V4.1
Kernel: tytung_jellybean_r2
Nikola G.
Junior Member
 
Posts: 6
Joined: Mon Jun 24, 2013 10:34 am
Country: Macedonia (mk)
Has thanked: 6 times
Been thanked: 3 times

Re: [APP] AGPS Injector Widget v1.0.1

Postby tytung » Tue Sep 17, 2013 6:25 pm

Nikola G. wrote:Hey tytung, quick question about the widget.

I have been successfully using the widget from the moment that you published it. It worked fine after upgrading to [Sep. 7, 2013][ROM][JB][4.3][720p] NexusHD2-JellyBean-CM10.2 V3.1 ROM, but all of a sudden, I can see the error message "AGPS data injection is not available for this device" popping up when I try to perform injection. I have a TMOUS HD2 Leo.

I was just wondering, is this some kind of error on my side, or do you have any suggestion as to why only recently I started getting this error message?

Appreciate the time to look over this, thanks a ton.

- Nikola


Thanks for reporting the error.
Well, it's my programming logic error. I had known it.
With v1.0.1, I added a feature to check if the AGPS injection is supported by the device. But I didn't handle the popup message correctly when the network connectivity is changed.
I will fix the false negative message in the next version.
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.1

Postby Nikola G. » Wed Sep 18, 2013 10:16 am

tytung wrote:
Thanks for reporting the error.
Well, it's my programming logic error. I had known it.
With v1.0.1, I added a feature to check if the AGPS injection is supported by the device. But I didn't handle the popup message correctly when the network connectivity is changed.
I will fix the false negative message in the next version.


Sure tytung, anytime. It just felt weird that no one else has reported this kind of issue before since this topic has no replies, so I just thought it is an issue specific to me.
Thank you for the elaborate and quick reply, and looking forward an update.
Device: HTC HD2 (LEO1024)
Radio: 2.15.50.14
HSPL: 2.08.HSPL by DFT's bepe and Cotulla
WinMo: /
Android: [Dec. 21, 2013][ROM][KK][4.4.2] NexusHD2-KitKat-CM11.0 V4.1
Kernel: tytung_jellybean_r2
Nikola G.
Junior Member
 
Posts: 6
Joined: Mon Jun 24, 2013 10:34 am
Country: Macedonia (mk)
Has thanked: 6 times
Been thanked: 3 times

Re: [APP] AGPS Injector Widget v1.0.1

Postby symbuzzer » Wed Sep 18, 2013 10:45 am

tytung, I didn't get working it on your GingerBread rom. There were no error mesagges in both versions. Maybe I couldnt do, I dont know. But widget was always show zeros.
symbuzzer
Forum Moderator
 
Posts: 320
Joined: Mon Jun 24, 2013 7:05 am
Country: Turkey (tr)
Has thanked: 176 times
Been thanked: 168 times

Re: [APP] AGPS Injector Widget v1.0.1

Postby tytung » Wed Sep 18, 2013 8:25 pm

symbuzzer wrote:tytung, I didn't get working it on your GingerBread rom. There were no error mesagges in both versions. Maybe I couldnt do, I dont know. But widget was always show zeros.

Thanks. I will try my GB ROM or a GB emulator later.
Android API level was changed too much from GB to JB.
I will check the compatibility.
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.1

Postby marco.palumbi » Thu Sep 19, 2013 10:38 am

hy Tytung,

just e feature request (if it is not yet implemented)
because the xtra data is valid for some days, it could be usefull store them in a file somewhere in the device and to be able to inject that data if you have no connectivity.
It could be usefull if you have to reset the device in a place without any network. (may be during a travel where you have high roaming costs but you can update the xtra.bin in your hotel via wifi....)
marco.palumbi
Recognized Developer
 
Posts: 17
Joined: Mon Jun 24, 2013 1:59 pm
Has thanked: 11 times
Been thanked: 21 times

Re: [APP] AGPS Injector Widget v1.0.1

Postby tytung » Thu Sep 19, 2013 1:53 pm

marco.palumbi wrote:hy Tytung,

just e feature request (if it is not yet implemented)
because the xtra data is valid for some days, it could be usefull store them in a file somewhere in the device and to be able to inject that data if you have no connectivity.
It could be usefull if you have to reset the device in a place without any network. (may be during a travel where you have high roaming costs but you can update the xtra.bin in your hotel via wifi....)


Good idea.
But I don't know how to do it so far.
The current injection is through the API call, locationManager.sendExtraCommand(LocationManager.GPS_PROVIDER, "force_xtra_injection", null).
Android will download xtra.bin, inject it into the chip and return true if the AGPS injection is supported by the device.
I didn't handle xtra.bin manually.
boolean resultTime, resultData;
LocationManager locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);
resultTime = locationManager.sendExtraCommand(LocationManager.GPS_PROVIDER, "force_time_injection", null);
Log.d(TAG, "force_time_injection() = " + resultTime);
resultData = locationManager.sendExtraCommand(LocationManager.GPS_PROVIDER, "force_xtra_injection", null);
Log.d(TAG, "force_xtra_injection() = " + resultData);

I will check if it's possible to handle xtra.bin manually when I have time.
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.2

Postby tytung » Thu Sep 19, 2013 1:57 pm

V1.0.2:
  • Fix the false negative message in which the AGPS injection not supported by the device.
  • Fix the force close after unchecked "Show this dialog every time" and opening the app.
  • Add the source code compatibility to fix a bug for Gingerbread.
  • Enable proguard to optimize the app size.

Note: I have uploaded v1.0.2 to Google Play. It takes 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

Next

Return to HD2 Android Development

Who is online

Users browsing this forum: No registered users and 0 guests

cron