Proximity SDK (iOS & Android) enables your app trigger enter and exit events when around a place of interest marked with a beacon.
Lets say you place a beacon at the reception. Integrate Proximity SDK into your app - it will now know when you enter or exit the reception area you have defined (read more about software-defined range here). It works:
- in the foreground - when your app is up and running;
- in the background - when you’re scrolling through a different app or when you have the phone in your pocket;
- when the app is killed (dismissed completely by a user or system.)
How to trigger events when the app is in in the background:
To run in the background, Proximity iOS SDK requires the Bluetooth Background mode to be enabled and Location Services to work in the background.
- Enable the Bluetooth Background mode to allow your app to run in the background when in range of beacons. Keep in mind: No other Background Modes are required. If you enable any unnecessary Background Modes, you risk your app being rejected during the App Store review process, so don’t be checking boxes “just in case”.
- To Allow Location Services in the background, you need to ask users to allow the app to always access their location. To do that, set up the Location Services usage description. This description will be shown to the user when asking them about allowing the app to access their location.
Find and follow detailed instructions in the GitHub README.
Proximity Android SDK allows for background scanning using foreground service.
It needs to be handled properly according to the Android official guidelines. Launching a "silent Bluetooth scan" unbeknownst to the user is not permitted by the system. If you do so, your service might be killed at any moment, without your permission.
To avoid this, the Proximity SDK allows scanning in the background using a foreground service with a notification.
Find and follow detailed the instructions in the GitHub README.
Learn how to "wake up" and trigger events when the app is killed here.