-
Notifications
You must be signed in to change notification settings - Fork 12
Geofencing
Geofencing part of the library has been deprecated and will not be maintained further. Last library version with geofencing support is 2.5.1.
It is possible to enable geofencing engine inside Mobile Messaging. In this case geofencingEnabled shall be set to true in initialization configuration. Appropriate permissions should be also requested or configured for your application prior to initialization of library. Initialization will fail if there are no appropriate permissions.
Make sure that location permission is added to android configuration in "config.xml":
<widget ... xmlns:android="http://schemas.android.com/apk/res/android">
...
<platform name="android">
<config-file target="AndroidManifest.xml" parent="/*">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
</config-file>
</platform>
...
</widget>After that Mobile Messaging plugin can be initialized with geofencing enabled. Be aware that the plugin might request runtime permissions by itself on Android 6.0 and above right before initialization.
Add this code at the beginning platforms/android/app/build.bradle:
apply plugin: 'com.huawei.agconnect'
Make sure to include NSLocationWhenInUseUsageDescription and NSLocationAlwaysUsageDescription keys in your app’s Info.plist. These keys let you describe the reason your app accesses the user’s location information. Mobile Messaging library will request location permission by itself. iOS will use the values of these keys in the alert panel displayed to the user when requesting permission to use location services.
Important: For iOS 11 compatibility you are additionally required to include the
NSLocationAlwaysAndWhenInUseUsageDescriptionkey in your app's Info.plist file. If this key is not present, authorization requests fail immediately (Documentation).
If you have any questions or suggestions, feel free to send an email to [email protected] or create an issue.
- Library events
- Server errors
- Users and installations
- Messages and notifications management
- Inbox
GeofencingDEPRECATED- Privacy settings
- In-app chat
- Migration guides
- Migration guide to version 7.9.x
- Migration guide to version 7.x.x
- Migration guide to version 6.2.x
- Migration guide to version 6.1.x
- Migration guide to version 6.x.x
- Migration guide to version 1.x.x
- Migration guide to version 2.2.x
- Migration guide to version 3.x.x
- Migration guide to version 4.x.x
- Migration guide to version 4.1.x
- Troubleshooting
- JSON Web Token (JWT) structure and generation example
- Trusted Domains Security