Official Content

Imagine you are organizing an International event that will take place in a Hotel. You already have an Event app that give information about several aspects of the conference: speakers, schedule, etc.

But this year you want to give a special Welcome screen to all the people that check-in in the Hotel. 

The solution is simple, you need a BeaconRegion (Beacons external object) to add this functionality to the app.

Steps to build the solution

  • You need a Beacon
  • The Beacon already have (or can be configured) a UUID, Major and Minor and a Name. Use some app on the Apple Store market if you want to know this values quickly. (For example eBeacon)
  • Program the proximity beacon alert.

Procedure GetBeaconProximityAlert

&BeaconProximityAlert.BeaconRegion.Identifier = 'Event Hall'
&BeaconProximityAlert.BeaconRegion.BeaconMatch.GroupId = 64366
&BeaconProximityAlert.BeaconRegion.BeaconMatch.UUID.FromString('B9407F30-F5F8-466E-AFF9-25556B57FE6D')
&BeaconProximityAlert.NotifyOnEntry = True
&BeaconProximityAlert.NotifyOnExit = True

parm(out:&BeaconProximityAlert);

 

Set the alert on an event on the SDPanel

Event ClientStart
    Composite
        GetBeaconProximityAlert.Call(&BeaconProximityAlert)
        &Boolean = LocationAPI.AddBeaconProximityAlert(&BeaconProximityAlert)
    EndComposite
EndEvent

 

And the event that will be executed when a device enter the beacon region

Event LocationAPI.EnterBeaconRegion(&BeaconRegion)
    &FirstTime = GetIfFirstTimeEntering()
    If &FirstTime
        ShowWelcomePanel()
    EndIf
EndEvent

 

NOTE: In order for the Beacon Proximity Alerts to work you need to have configured the property Location Always Usage Description -and enter into the region of the beacon :).

See also

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant