Now you can use TurnGPSOn() or TurnGPSOff() to toggle the GPS.
B4X:
Sub Activity_Create(FirstTime As Boolean)
activity.LoadLayout("Layout")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub btnStart_Click
turnOn.Initialize()
turnOn.turnGPSOn
End Sub
Sub btnStop_Click
turnOn.Initialize()
turnOn.turnGPSOff()
End Sub
Thanks for sharing this. It works flawlessly on my Moterola Droid2. I find it quite useful in the program I am developing (GPSlog). Of course, I will make it's use optional when I release the program. For me, on my device, it is lovely!
Thanks for sharing this. It works flawlessly on my Moterola Droid2. I find it quite useful in the program I am developing (GPSlog). Of course, I will make it's use optional when I release the program. For me, on my device, it is lovely!
Works well on my Samsung Charge.
It would be nice if you could determine if the GPS unit is on or off so you could restore the state of the unit upon exit of your program. i.e. if it is off when you begin your program you can turn it on and the when you are through, turn it back off, or leave it on depending the state at the beginning. Nice Lib.