Table of Contents |
---|
Modülün Etkinleştirilmesi
Burada açıklandığı gibi etkinleştirilmelidir.
Gerekli İzinlerin Eklenmesi
Geofence modülünün çalışabilmesi için aşağıdaki izinlerin AndroidManifest.xml dosyanıza eklenmesi gerekmektedir.
...
Enabling the Module
You can enable it as described here.
Getting the Necessary Permissions
You should add the permissions below into your AndroidManifest.xml file to run Geofencing module.
Code Block | ||
---|---|---|
| ||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> |
Modülün Çalıştırılması
Gerekli izinleri AndroidManifest.xml dosyanıza ekledikten ve setIsGeofenceEnabled
metodu aracılığıyla modülü etkinleştirdikten sonra otomatik olarak çalışmaya başlayacaktır. Başka bir şey yapmanıza gerek yoktur. RMC panelden tanımladığınız geofence aksiyonları düzenli olarak (uygulama kapalıyken de) denetlenecek ve aksiyon kuralına göre, kullanıcı ilgili alana girdiğinde, ilgili alanda belli bir süre bulunduğunda veya ilgili alandan ayrıldığında push bildirim kampanyanız tetiklenecek ve kullanıcı bildirim alacaktır.
Örnek Uygulama
...
You can call the method below, to request these permissions in run time.
Kotlin
Code Block |
---|
RelatedDigital.requestLocationPermission(your_activity) |
Java
Code Block |
---|
RelatedDigital.requestLocationPermission(your_activity); |
Running the Module
After adding the necessary permissions into the AndroidManifest.xml file(granting them from the user) and enabling the module via setIsGeofenceEnabled()
method, it will automatically starts running. There is nothing else you need to do. The SDK will check the Geofences and Geofencing targeting actions you defined on RMC panel regularly (even when the app is closed). According to the rule of the action you defined, the user will get the related notification when he/she enters to the region, stays in the region for a while, or leaves the region.