Android Question GPS is started or not

Discussion in 'Android Questions' started by Scantech, Aug 1, 2019.

  1. Scantech

    Scantech Well-Known Member Licensed User


    How can i know if the GPS is started or not? I know GPS1.GPSEnabled is for location turned on or off but i like to find out if it is started.
  2. emexes

    emexes Well-Known Member Licensed User

    Hmm. Good question. If you are receiving location callbacks, that'd be a start. Or perhaps properties like these:



    That UsedInFix property looks promising too - just because the GPS can see a satellite and give you a SNR, doesn't mean it's yet got valid fixes.
  3. Scantech

    Scantech Well-Known Member Licensed User

    Sub GPS_LocationChanged (Location1 As Location)
        locationGPS = Location1
    End Sub
    That did not work.

    The value is true when GPS1.Start(0, 0) and also the value is true when GPS1.Stop.

    There is got to be a way.
  4. Scantech

    Scantech Well-Known Member Licensed User

    I guess this is the only way as per Erel example
    Public Sub StartGps
    If gpsStarted = False Then
            gpsStarted = 
    End If
    End Sub
    Public Sub StopGps
    If gpsStarted Then
            gpsStarted = 
    End If
    End Sub
  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