Add the Hurree SDK to Your Project

This section outlines how to add the Hurree SDK into your app project.

Before continuing, ensure you have completed the previous steps to add FCM to your project:

  • Check you have a google-services.json file in the app root location.
  • Check the following dependency has been added to the build.gradle (project) file as follows:
dependencies {
        // .... your other dependencies here
        classpath 'com.google.gms:google-services:3.1.0'
}
  • Ensure the bottom of the build.gradle (module) file is configured as follows:
apply plugin: 'com.google.gms.google-services'

To add the Hurree SDK to your project:

  1. From Android Studio, open your project.

  2. From the Gradle Scripts folder, locate your build.gradle file.

  3. Just after the testCompile line, reference the current version of Hurree:

    compile 'com.hurree-dev:hurree_sdk:1.1.8'
    
    dependencies {
        compile fileTree(include: ['*.jar'], dir: 'libs')
        testCompile 'junit:junit:4.12'
        compile 'com.hurree-dev:hurree-sdk:1.1.8'
        compile 'com.android.support:appcompat-v7:26.+'
        compile 'com.google.firebase:firebase-messaging:10.2.1'
        /*
        your other dependencies will go here
        */
    }
    
  4. Ensure the bottom of build.gradle is configured as follows:

    apply plugin: 'com.google.gms.google-services'
    buildscript {
        repositories {
            jcenter()
            google()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:​3.​0.0'//note this line may vary //​ according to gradle version​ (put your gradle version here​)
            // To check your gradle version go to gradle-wrapper.properties file inside project)​)​
            classpath 'com.google.gms:google-services:3.1.0'
        }
    
  5. Click SyncNow. (Alternatively, from Tools > Android, select Sync Project with Gradle Files.
    Sync Project

  6. The Hurree SDK plugin is now installed. You can verify this in Android Studio by going File > Project Structure > Module > Dependencies and ensuring that the Hurree SDK is listed.

results matching ""

    No results matching ""