LavaMobileSDK for Android is the client libary to integrate your mobile apps with Lava Platform.
- Handle push notification from LAVA Platform.
- Message Inbox.
- Membership Pass.
- Deep Links.
- Track Events.
This library is hosted on GitHub Packages, in order to install it, you must ask LAVA for granting you the access. After that, please follow the steps below:
- Generate Personal Access Token.
- Set up Android project.
After you have the access to the library, you have to generate your Personal Access Token to use with your Android project.
- On the top right corner, click on your avatar and select
Settings
.
- On the left panel, scroll down and select
Developer settings
.
- Select
Personal access tokens
>Tokens (classic)
. Click onGenerate new token
>Generate new token (classic)
.
- Fill the necessary information and in the Scopes section, select only
read:packages
. Submit.
- Copy your newly generated Personal Access Token and store it in a secure place. This PAT will be use in the next step as the password.
Let's set up your Android project:
- Create a new file named
project.properties
in your project root. You must add this file into.gitignore
to not tracking it. Add the following content to the file and replace the placeholders with appropriate values:
GITHUB_USERNAME=<your GitHub username>
GITHUB_PERSONAL_ACCESS_TOKEN=<your generated Personal Access Token>
- Open your
settings.gradle
, replace thedependencyResolutionManagement
block with the following content:
def property = new Properties()
file("project.properties").withInputStream { property.load(it) }
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven {
url = uri("https://maven.pkg.github.com/lavaai/LavaMobileSDK-Android")
credentials {
username = property.get("GITHUB_USERNAME")
password = property.get("GITHUB_PERSONAL_ACCESS_TOKEN")
}
}
}
}
- In your app level
build.gradle
, add the following dependency and sync the project:
implementation 'ai.lava.mobile-sdk:lavasdk:2.0.27'
Please contact LAVA Support in case you need help.