Android Question Geolocation Error

Insystech

Member
Licensed User
Longtime User
Good afternoon, I would appreciate your help as the Geolocation V1.11 library is generating an error, this error occurs on some devices with Android 7 and 8.

This Code Use

Sub Activity_Create (FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout ("Layout1")


GeoLoc.Initialize ("GeoLocation")
GeoLoc.GetLocation
'Log (GeoLoc.Longitude)
'Log (GeoLoc.Address)
'Log (GeoLoc.City)
'Log (GeoLoc.Country)
'Log (GeoLoc.KnownName)
'Log (GeoLoc.PostalCode)
'Log (GeoLoc.State)
Else
Log ("NoPermission")
End If
End Sub

Sub GeoLocation_Location (success As Boolean, Lattitude As Double, Longitude As Double, info As String, isMockLocation As Boolean)
Log ($ "GeoLocation_Location ($ {success}, $ {Lattitude}, $ {Longitude}, $ {info}, $ {isMockLocation})" $)
End Sub

Error:
java.lang.Exception: Sub geolocation_location signature does not match expected signature.

Thanks
 

Attachments

  • Error.jpg
    Error.jpg
    36.9 KB · Views: 126

drgottjr

Well-Known Member
Licensed User
Longtime User
the documentation says the location sub is expecting 3 parameters, not 5.

documentation for geolocation library
Events:
Location
(success As Boolean, Lattitude As Double, Longitude As Double)

your app:
Sub GeoLocation_Location (success As Boolean, Lattitude As Double, Longitude As Double, info As String, isMockLocation As Boolean)
Log ($ "GeoLocation_Location ($ {success}, $ {Lattitude}, $ {Longitude}, $ {info}, $ {isMockLocation})" $)
End Sub

that's what signature mismatch means. or do i have the wrong documentation?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
This Code Use

Sub Activity_Create (FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout ("Layout1")
Please use [CODE]code here...[/CODE] tags when posting code.

codetag001.png

codetag002.png

codetag003.png


Also post errors as TEXT (right click to copy)
 
Upvote 0
Top