TurnGPS Library

Shay

Well-Known Member
Licensed User
Longtime User
this is what I did and it is not working on galaxy s2 with 2.3
I see in this post, that 2.3 is not supporting this anymore
 

Shay

Well-Known Member
Licensed User
Longtime User
so it there other workaround that I can do
in order to open the GPS automatically?
 

Rusty

Well-Known Member
Licensed User
Longtime User
TurnGPS

How is the version determined? My firmware is 2.2.1; my kernel version is 2.6.32.9.
The turnon routine works on my Samsung Charge, which indicates I'm running the latest updates.
 

Rusty

Well-Known Member
Licensed User
Longtime User
TurnGPS

So the firmware version is the version we are discussing?
Ok. That explains why it works on my Samsung.
Thanks,
 

Shay

Well-Known Member
Licensed User
Longtime User
so is there other way to turn on the GPS automatically?
This is my app essences :-(
 

Rusty

Well-Known Member
Licensed User
Longtime User
TurnGPS

This will cause the user to see the setup screen to turn on the GPS. Apparently, after version 2.2, you can not use the TurnOn lib. If you are developing for pre-version 2.2, you can put TurnOn.TurnGPSOn above the ToastMessageShow below.

'Global
Dim GPSIsAvailable as boolean : GPSIsAvailable = True 'assume it is there

If GPS1.GPSEnabled = False AND GPSIsAvailable Then
ToastMessageShow("Please enable the GPS device.", True)
StartActivity(GPS1.LocationSettingsIntent) 'Will open the relevant settings screen.
If GPS1.GPSEnabled Then
GPSIsAvailable = True
Else
GPSIsAvailable = False 'don't try again.
End If
Else
GPS1.Start(0, 0) 'Listen to GPS with no filters.
End If
 

glouie

Member
Licensed User
Longtime User
TurnGPS library - Cannot access activity object from sub Process_Globals.

Is there a reason the TurnGPS library only works from an activity module? I wanted to use it for a service module but right now I have to use CallSub from within my service module to execute it.

Also, on my Droid2 I running Android version 2.3.3 and kernel version 2.6.32.9 the TurnGPSon function does enable Standalone GPS services. I read here that this library does not work after version 2.2 but it works on my Droid 2.

Thank you for this useful library.
 

glouie

Member
Licensed User
Longtime User
XverhelstX,

Erel mentioned on another thread that the "@ActivityObject" annotation marks this object as an Activity UI object. I have not seen the Java code in your library but was wondering if you could check to see if this is why the TurnGPS library is restricted for use only in Activity modules.

I would like to be able to use your library inside of a service module that uses GPS and if GPS is disabled we could remotely enable it with your library.

Thank you.
 

XverhelstX

Well-Known Member
Licensed User
Longtime User
I will look at it tomorrow.
I dont think i added it at the lib though.

Also, it is possible that since android 2.3, some manufacturers fixed the bug, some don't. That might be related that my x10 2.1 works and not on my play 2.3

Tomas

Sent from my SE Xperia Play using Tapatalk.
 

glouie

Member
Licensed User
Longtime User
Hi Tomas,

Thanks for letting me know what you find out. Although I have not seen your Java source code I get the following error when trying to use the TurnGPS library from a service module:

Compiling code. Error
Error compiling program.
Error description: Cannot access activity object from sub Process_Globals.

It complies fine when called from an activity module so that is why I think there is a reference in there restricting it to activity modules, Thank you.
 

glouie

Member
Licensed User
Longtime User
Hi Tomas,

Thanks for your reply, I was looking at your post and that library handles a lot of very useful things.

I will try it out and let you know, thank you for making it available.
 
Top