Android Question [SOLVED is interference] callsub from Starter to Activity

yfleury

Active Member
Licensed User
Longtime User
I have this in Starter
B4X: Copy
Sub GPS_LocationChanged (Location1 As Location)
    CallSub2(Main2, "LocationChanged", Location1)   
End Sub

In Main2 (Activity) I have that
B4X: Copy
Public Sub LocationChanged(Location1 As Location)
    LogColor("LocationChanged ",Colors.Blue)
End Sub

the Sub LocationChanged is not rising even if GPS is start like this
B4X: Copy
Public Sub StartGps
    If gpsStarted = False Then
        GPS1.Start( 0,0)
        gpsStarted = True
    End If
End Sub

I want to move gps camera to follow my position
 
Thanks @LucaMs for the reply.

I test that and nothing in log for CallSub ou CallSubDelayed
B4X: Copy
Sub GPS_LocationChanged (Location1 As Location)
    LogColor("StartService location change", Colors.Red)
    
    CallSubDelayed2(Main2, "LocationChanged", Location1)
'    CallSub2(Main2, "LocationChanged", Location1)   
    
End Sub
 
Upvote 0
In Starter I have
B4X: Copy
Sub Process_Globals
    Public GPS1 As GPS
    Private gpsStarted As Boolean


Sub Service_Create
    GPS1.Initialize("GPS")
 
Upvote 0
Find the problem.
My device is very near from my computer desktop and then causing interference with my gps device. When my device is going out from my computer, the locationchange is working normaly.
 
Upvote 0
Back
Top