Integrate Gamification Mobile Android SDK into Loyalty Management Mobile Android SDK
To integrate the Gamification Mobile Android SDK into the existing Loyalty Management
Mobile Android SDK, add it as an external dependency.
Available in: all editions that have Loyalty Management enabled |
- Open Terminal, and go to the LoyaltyMobileSDK-Android folder.
-
Run these commands:
git submodule add git@github.com:loyaltysampleapp/GamificationMobileSDK-Android.gitgit submodule syncgit submodule updatecd GamificationMobileSDK-Androidgit submodule update --init --recursive --remote
- Open the LoyaltyMobileSDK-Android project in Android Studio.
- Click Open.
-
Open the SampleApps/MyNTORewards/build.gradle file, and under
Dependencies block, to the first line of Dependencies, add:
implementation(project(":GamificationMobileSDK-Android:GamificationMobileSDK"))
- Open the SampleApps/MyNTORewards/connectedapp.properties.sample file and modify the properties of the connected app as per your org.
- Click Sync Now.
-
Open the SDK files and ensure that the files include the appropriate SDK
packages.
-
To add the gamification SDK package, include this code snippet in your code.
`import com.salesforce.gamification.api.*import com.salesforce.gamification.model.*import com.salesforce.gamification.repository.*import com.salesforce.gamification.utilities.*`
You can now use the classes and interfaces in the GamificationMobileSDK-Android module to extend and manage the gamification
features in the MyNTORewards sample app.