Android Question how to turn on GPS with B4a

Discussion in 'Android Questions' started by kalarius, Jan 11, 2017.

  1. kalarius

    kalarius Active Member Licensed User

    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
    SetApplicationAttribute(android:icon, "@drawable/icon")
    SetApplicationAttribute(android:label, "$LABEL$")
    'End of default text.

    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?

  2. Erel

    Erel Administrator Staff Member Licensed User

    Which error do you get?

    I think that you will need to sign your app with the system key. Otherwise it will not have root access.
  3. kalarius

    kalarius Active Member Licensed User

    what is the system key?
    I do not get any error

    this my code

    Dim t As Toggle


    Dim p As Phone
    Dim gps As String

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

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


    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

  4. Erel

    Erel Administrator Staff Member Licensed User

  5. kalarius

    kalarius Active Member Licensed 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
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice