[APP] AGPS Injector Widget v1.0.5

Android development for HTC HD2/Leo
Moderator: Forum Moderator

Re: [APP] AGPS Injector Widget v1.0.2

Postby Nikola G. » Sun Sep 22, 2013 7:54 pm

tytung wrote:The "not supported" warning message is correct according to your logcat.
I don't know why the AGPS injection ( call force_xtra_injection() function ) is failure in your HD2.


Calling force_xtra_injection() will return false in the following two situations.
  • Your device indeed not supports the AGPS injection.
  • Your device supports the AGPS injection but the GPS is used (i.e., the GPS engine is locked) when doing the AGPS injection.
I'm not sure which one matches your device.

Thanks again for the detailed reply tytung.

With that said, I went on to do my research to find out what have I done to make the widget stop working (as it was working fine at some point in time while I restoring phone to normal state after 4.3 upgrade).
So something must have happened that's been preventing the AGPS injection, or as you said, GPS engine was being locked. I was unable to pinpoint any apps causing this kind of problem, and then I found "a solution". I simply switched GPS ON via the 'Quick Settings panel', and then performed the injection using the widget, and it worked. After switching to GPS OFF the same way, I was able to perform AGPS injections successfully. So that was it, sorry for the long-ish reply, but just wanted to lay it out there in case anyone else runs into this specific issue.

Thanks for your help and following up on this quickly tytung, the HD2 is that much better and alive just because of you. Thank you.
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

Advertisement
 

Re: [APP] AGPS Injector Widget v1.0.2

Postby tytung » Mon Sep 23, 2013 6:21 am

Nikola G. wrote:Thanks again for the detailed reply tytung.

With that said, I went on to do my research to find out what have I done to make the widget stop working (as it was working fine at some point in time while I restoring phone to normal state after 4.3 upgrade).
So something must have happened that's been preventing the AGPS injection, or as you said, GPS engine was being locked. I was unable to pinpoint any apps causing this kind of problem, and then I found "a solution". I simply switched GPS ON via the 'Quick Settings panel', and then performed the injection using the widget, and it worked. After switching to GPS OFF the same way, I was able to perform AGPS injections successfully. So that was it, sorry for the long-ish reply, but just wanted to lay it out there in case anyone else runs into this specific issue.

Thanks for your help and following up on this quickly tytung, the HD2 is that much better and alive just because of you. Thank you.

Thanks for your detailed reply and finding the solution.
I switched GPS OFF and rebooted my HD2. Then I got the same failure message.
I think I must check GPS ON/OFF setting before doing the AGPS injection.

@symbuzzer:
Did you switch GPS ON when using my GB ROM?
Maybe your "not supported" failure message is also caused by the GPS OFF setting.
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 symbuzzer » Mon Sep 23, 2013 7:10 am

tytung wrote:Thanks for your detailed reply and finding the solution.
I switched GPS OFF and rebooted my HD2. Then I got the same failure message.
I think I must check GPS ON/OFF setting before doing the AGPS injection.

@symbuzzer:
Did you switch GPS ON when using my GB ROM?
Maybe your "not supported" failure message is also caused by the GPS OFF setting.


No, tytung. I will try when I have free time and feedback to you. Thanks.

Edit, yeah it worked when I switched gps on :)
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.2

Postby Elveneleven » Mon Sep 23, 2013 7:40 am

Can confirm too.
Switching GPS on resolves the injection problem.

Thanks tytung for this helpful little app.

sent with Tapatalk 4
User avatar
Elveneleven
Junior Member
 
Posts: 50
Joined: Fri Jun 28, 2013 10:10 pm
Has thanked: 67 times
Been thanked: 15 times

Re: [APP] AGPS Injector Widget v1.0.2

Postby Nikola G. » Mon Sep 23, 2013 3:47 pm

So nice, glad I could be of help.

Now that we are aware of the issue and the workaround itself is very easy to perform, there is no rush in providing an updated version.

Thanks for following through, and a big thanks to everyone else for their feedback and confirmation on this.
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.3

Postby tytung » Mon Sep 30, 2013 12:36 pm

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.

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

Re: [APP] AGPS Injector Widget v1.0.3

Postby symbuzzer » Mon Sep 30, 2013 1:44 pm

Thanks for new version tytung.
I have a feature request. If I didnt remember wrong, javelin's Notification toggles also open gps settings, doesnt turn on/off gps. But javelin added a feature in next versions which if it installed as a system app, it can turn on/off gps directly. Is that feature possible for agps injector?
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.3

Postby tytung » Mon Sep 30, 2013 3:04 pm

symbuzzer wrote:Thanks for new version tytung.
I have a feature request. If I didnt remember wrong, javelin's Notification toggles also open gps settings, doesnt turn on/off gps. But javelin added a feature in next versions which if it installed as a system app, it can turn on/off gps directly. Is that feature possible for agps injector?

I don't know who's javelin?
I know we can force GPS on/off as long as the app is a system app. I have the source code in hand.
But can I upload a system app to Google Play? I'm not sure so far.
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 symbuzzer » Mon Sep 30, 2013 3:18 pm

tytung wrote:I don't know who's javelin?
I know we can force GPS on/off as long as the app is a system app. I have the source code in hand.
But can I upload a system app to Google Play? I'm not sure so far.


My mistake sorry: https://play.google.com/store/apps/deve ... elin&hl=en
I sent mails him for bug reports, feature requests etc... formerly.

His Notification Toggle also a Google Play app, but we can move it system. When he updates app, we can see update notifications and we can install newer version of it. I am using Link2SD for move this update to system. J4velin already updates it rarely like you. So no problem for me:)

Well, with root privileges, can we turn on/off gps?

Thanks.
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.3

Postby tytung » Mon Sep 30, 2013 3:31 pm

symbuzzer wrote:
My mistake sorry: https://play.google.com/store/apps/deve ... elin&hl=en
I sent mails him for bug reports, feature requests etc... formerly.

His Notification Toggle also a Google Play app, but we can move it system. When he updates app, we can see update notifications and we can install newer version of it. I am using Link2SD for move this update to system. J4velin already updates it rarely like you. So no problem for me:)

Well, with root privileges, can we turn on/off gps?

Thanks.


The root privilege is necessary to move the app to the system partition.
But AFAIK, the root privilege is not required to run this system app.

Commit: Force on gps if it is off.
Java:
 
final ContentResolver contentResolver = getContentResolver();
boolean gpsEnabled = Settings.Secure.isLocationProviderEnabled(
contentResolver, LocationManager.GPS_PROVIDER);
if (!gpsEnabled) {
Settings.Secure.setLocationProviderEnabled(contentResolver,
LocationManager.GPS_PROVIDER, true);
}

AndroidManifest.xml
 
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_SECURE_SETTINGS" />

I didn't try them yet.
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: Google [Bot] and 0 guests