Using the Sample App

The Nike+ Android SDK ships with a sample application that can be configured with the application credentials that were received from Nike+. This sample application is to be used to demonstrate the capabilities of the Nike+ Android SDK.

Setup the Nike+ Android SDK

Setup the Nike+ Android SDK by choosing an integration approach outlined in the SDK Configuration documentation.

The Nike Plus SDK is the .aar file located in the NikeSDK directory alongside the sample application. The directory should look similar to this:

NikeSdkRelease
├── NikeSDK
│   ├── NikeSDK-0.1.0.aar
│   ├── README.md
│   ├── build.gradle
│   └── javadoc
└── NikeSample
    ├── NikeSample.iml
    ├── build
    ├── build.gradle
    ├── gradle
    ├── gradle.properties
    ├── gradlew
    ├── gradlew.bat
    ├── local.properties
    ├── sample
    └── settings.gradle
There is an example Gradle script to upload the aar to the default local Maven repository that can be used as a template to customize the installation.
apply plugin: 'maven'

# This needs to match the .aar file of the current release
def builtAarFile = file('NikeSDK-0.1.0.aar')

artifacts {
    archives builtAarFile
}

# This configuration needs to be updated to match the Maven installation.
# This is set to match the default local Maven configuration
uploadArchives() {
    repositories {
        mavenDeployer {
            repository url: 'file://' + new File(System.getProperty('user.home'), '.m2/repository').absolutePath
            pom.groupId = 'com.nike'
            pom.artifactId = 'NikeSDK'
            pom.version = '0.1.0'
        }
    }
}

After changing the default build.gradle file to match the appropriate settings for the development environment, it can be run using './gradlew uploadArchives'