Android Question GPS_LocationChanged event are not fired properly.

smartdispatch

Member
Licensed User
Longtime User
GPS_LocationChanged event are not fired properly.

It has been working perfectly since we first started using B4A around 3 years ago. After the newer release V3.50, this only works sporadically.

We are currently using B4A V3.50 & Samsung Galaxy Tablets (10.1, 10.1 Tab2, 7.0, 7.0+, 7.0 Tab 2, 7.0 Tab 3)

It worked many months, something is going on that we cannot figure out.

We have even gone through power cycling, etc. by POWER OFF AND ON Tablet, it fires OK for awhile then no fired after. After some time the GPS_LocationChanged gives out the same gps coordinates even though the vehicle is in movement. We have verified this with other GPS devices installed on the vehicle.

Is there a way to verify the this event fired properly?
 

DonManfred

Expert
Licensed User
Longtime User
When you app is not the ACTIVE activity, say it is paused, then the example will stop listening to gps. Does your app got paused?
Maybe this happens to your app?

B4X:
Sub Activity_Resume
    If GPS1.GPSEnabled = False Then
        ToastMessageShow("Please enable the GPS device.", True)
        StartActivity(GPS1.LocationSettingsIntent) 'Will open the relevant settings screen.
    Else
        GPS1.Start(0, 0) 'Listen to GPS with no filters.
    End If
End Sub

Sub Activity_Pause (UserClosed As Boolean)
    GPS1.Stop
End Sub
 
Upvote 0
Top