Android Question map geofence

DonManfred

Expert
Licensed User
Longtime User
Does not show any Map!

It is an example on how to setup a GeoFence.
An event is raised if your device position is inside a Fence.
Even if you leave a Fence a event is raised.

If you want to show a Map then you should use this tutorial:
 
Last edited:
Upvote 0

3394509365

Active Member
Licensed User
Longtime User
I installed it on the phone, but nothing happens. what should i see?
I put a radius of 50 meters, but nothing
Only test1 appears to me
 
Upvote 0

josejad

Expert
Licensed User
Longtime User
I installed it on the phone
What have you installed?
If you have installed the geofence example, you have to setup the central point and the radius.

If you enter in the radius of the circle then you will see the notification and the toastmessage "Enter 1"
If you go out, you will see "Exit 1".

You have to test it outside to get gps cover, and walk to exit the radius...

B4X:
Public Sub Geofence_Enter (Id As String)
   Dim n As Notification
   n.Initialize
   n.Icon = "icon"
   n.SetInfo("Enter: " & Id, "Enter", Main)
   n.Notify(1)
   ToastMessageShow("Enter: " & Id, True)
End Sub

Public Sub Geofence_Exit (Id As String)
   Log("Exit: " & Id)
   ToastMessageShow("Exit: " & Id, True)
   Dim n As Notification
   n.Initialize
   n.Icon = "icon"
   n.SetInfo("Exit: " & Id, "Exit", Main)
   n.Notify(2)
End Sub
 
Upvote 0
Top