Android Question [SOLVED] GeoLocation signature Error

incendio

Well-Known Member
Licensed User
Longtime User
Hi guys,

I tried example from this thread

Downloaded GeoLocEx & GeoLocationV1.11 and changed codes on GeoLocation_Location into these
B4X:
Sub GeoLocation_Location(success As Boolean, Lattitude As Double, Longitude As Double, info As String)
    If success Then
        GeoLoc.geoAddress
        Log(GeoLoc.Address)
        Log(GeoLoc.City)
        Log(GeoLoc.Country)
        Log(GeoLoc.KnownName)
        Log(GeoLoc.PostalCode)
        Log(GeoLoc.State)
    End If
    Log($"GeoLocation_Location(${success}, ${Lattitude}, ${Longitude}, ${info})"$)
End Sub

Got these errors
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
java.lang.Exception: Sub geolocation_location signature does not match expected signature.
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:198)
at anywheresoftware.b4a.BA$2.run(BA.java:370)
at android.os.Handler.handleCallback(Handler.java:907)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:216)
at android.app.ActivityThread.main(ActivityThread.java:7625)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)
 
Last edited:

incendio

Well-Known Member
Licensed User
Longtime User
That thread wrote that v1. 11 fixed the error, but I already used v1. 11.

Am I missing something here?
 
Upvote 0

incendio

Well-Known Member
Licensed User
Longtime User
Thanks, turn out that the library was right, but the example was not updated.

After I updated the example, it was run OK, my mistake.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…