Android Installation

To integrate SnapOdds SDK into your Android project, open your Android project in Android Studio. (See for details)

Github Packages

Create a Personal Access Token on Github

Inside your GitHub Account:

  1. Go to Settings -> Developer Settings -> Personal Access Tokens -> Generate new token

  2. Make sure to select the scope read:packages and Generate a token

  3. After the token is generated, be sure to copy your new personal access token. It will not be accessible again. If the key is lost, the only option is to generate a new key.

Configure your Github Personal Access Token

To configure your token, a file containing your Github User ID and Personal Access Token must be placed in your project's root directory as shown below:


Alternatively, you can set the environment variables GPR_USER and GPR_API_KEY.

Add Github Packages Repository to Application Module's build.gradle

Next, define the Github Packages as a repository in the application module's build.gradle by adding the following section:

def githubProperties = new Properties() githubProperties.load(new FileInputStream(rootProject.file("")))
repositories {
    maven {
        name = "GitHubPackages"
        url = uri("")
        credentials {        
            /** Create in root project folder file with     
            ** gpr.usr=GITHUB_USER_ID & gpr.key=PERSONAL_ACCESS_TOKEN 
            ** Or set env variable GPR_USER & GPR_API_KEY if not adding a properties file**/
            username = githubProperties['gpr.usr'] ?: System.getenv("GPR_USER")
            password = githubProperties['gpr.key'] ?: System.getenv("GPR_API_KEY")

        metadataSources {

Add Dependency to Snapscreen SDK in Application Module's build.gradle

dependencies {
    //consume library
    implementation ''

Add React Native SDK Module

Add the files and from our provided sample project here on Github to your Android project and be sure to change the package of both files according to your own project.

Additionally in your Android project's application subclass (most likely add the new Native Module Package in the method getPackages

packages.add(new SnapscreenSDKPackage());

Last updated