For those development partners who have already performed an integration with our original geolocation-aware nudge® Plus Library, performing an integration with our nudge® Geo Code Library is a simple matter of renaming a few parameters and methods.
This guide assumes you are already familiar with the full integration of the Plus Code Library. If you need to reference any of the complete integration guides for either platform, those are provided here:
| iOS | Android | |
| nudge® Base / nudge® Geo Code Library | Click here | Click here |
| nudge® Plus Code Library | Click here | Click here |
iOS integration adjustments
Importing the libraries
In your Podfile change your pod reference from nudge to nudgeGeo and use 1.0.0 for the library version number.
Similarly, update other import references from nudge to nudgeGeo as well.
Adding the library to your project
When declaring and initializing the myNudge object, update the references from Nudge to NudgeGeo.
AppDelegate methods
Throughout the AppDelegate file, update the references from Nudge to NudgeBase.
Android integration adjustments
Importing the libraries
Change the library reference in your build.gradle file to these two references:
releases.com.larky:nudgeBase:1.1.0releases.com.larky:nudgeGeo:1.0.0
Similarly, change the import reference in your MainActivity.java (or similar) to com.larky.nudgeGeo.NudgeGeo
Adding the library to your project
When declaring and initializing the myNudge object, update the references from Nudge to NudgeGeo.
Monitoring for change in Nudge status
If you implemented a myNudgeStatusListener change the Nudge. object reference to NudgeBase..
If you already have Firebase Cloud Messenger installed
Edit your onMessageReceived method as follows in your FirebaseMessagingService
Nudge.handlePushto NudgeBase.handlePush.
An important note about Federation Id
This initialization parameter had been marked as optional in previous integration guides, but depending on the implementation details for a given client this may be required. In any case it is highly recommended as it provides the foundation for creating data-driven targeted messaging. Please contact Support if you are unsure about the configuration status for a specific client, or would like to understand more about how to implement this in a general fashion.
Comments
0 comments
Please sign in to leave a comment.