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

yfleury

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

In Main2 (Activity) I have that
B4X:
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:
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
 

yfleury

Active Member
Licensed User
Longtime User
Thanks @LucaMs for the reply.

I test that and nothing in log for CallSub ou CallSubDelayed
B4X:
Sub GPS_LocationChanged (Location1 As Location)
    LogColor("StartService location change", Colors.Red)
    
    CallSubDelayed2(Main2, "LocationChanged", Location1)
'    CallSub2(Main2, "LocationChanged", Location1)   
    
End Sub
 
Upvote 0

yfleury

Active Member
Licensed User
Longtime User
In Starter I have
B4X:
Sub Process_Globals
    Public GPS1 As GPS
    Private gpsStarted As Boolean


Sub Service_Create
    GPS1.Initialize("GPS")
 
Upvote 0

yfleury

Active Member
Licensed User
Longtime User
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
Top