Android Question how to turn on GPS with B4a

kalarius

Active Member
Licensed User
Longtime User
hi,
I have root my device samsung GT S7582 ver 4.2.2 (from official image)
file explorer program can access the root
I have test the togglelibray
but the gps does not turn on

I have add to manifest the
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
AddPermission("android.permission.WRITE_SETTINGS")
AddPermission("android.permission.WRITE_SECURE_SETTINGS")


when I run the program the superSu does not actived to grand access to system

what can i write to program so the superSU activated when I run my program to let me access the gps ON-Off?

Kalarakis
Greece
 

kalarius

Active Member
Licensed User
Longtime User
what is the system key?
I do not get any error

this my code

Dim t As Toggle

t.Initialize
t.ToggleGPS
t.TurnGPSOn


Dim p As Phone
Dim gps As String

gps = p.GetSettings("location_providers_allowed")
Log(gps)
If gps.IndexOf("gps") > -1 Then

Msgbox("This device has GPS built in", "")

Else

Msgbox("No GPS found", "")

End If


and reply No Gps found when the gps is off
and found the gps ONLY if I have enable it by hand

Kalarakis
 
Upvote 0

kalarius

Active Member
Licensed User
Longtime User
I read the thread but I understanding nothing
I do not know java
and i do not know where can I find all these files that he use
 
Upvote 0
Top