Skip to content

Installation

Minimum Requirements:

  • Android API level: 15+

To install the SDK, include this in your app build.gradle

dependencies {
    implementation 'it.near.sdk:nearit:2.10.2'
    implementation 'it.near.sdk:nearit-ui:2.10.5'
}

In the same file make sure that your compileSdkVersion is at least 26.

In the project build.gradle include the following:

buildscript {
    dependencies {
    ...
    classpath 'com.google.gms:google-services:4.0.1'
    }
}
allprojects {
    repositories {
        maven { url "https://maven.google.com" }
    }
}

In your AndroidManifest.xml, add the following element as a child of the <application> element, by inserting it just before the closing </application> tag:

<meta-data
       android:name="near_api_key"
       android:value="<your-near-api-key>" />

You can find your API key on NearIT web interface, under the "SDK Integration" section.

Enable Test Devices

Test Devices allow you to test NearIT features on single devices and is extremely useful for debugging.

Navigate "Settings > Test devices" section of NearIT and follow the instructions to enable this feature.

In the same section, you can send invite links to mail addresses. If users have the app installed, they can click the link on their smart-phone to be prompted with a request to enroll their device among the testers.