API Config
In order to start using location data provided by the NEON Location Service, it is necessary to configure your project to link the NEON API.
Update Gradle Configuration
Open your project’s build.gradle
file and insert the following line into the allprojects.repositories
section.
maven {
url "https://www.myget.org/F/trxsystems/maven"
}
NOTE: Multiple
build.gradle
files are present in a new Android Studio project. You need to find the root level file that manages configuration for the project.
Once added, the allprojects
section should look like the configuration below.
allprojects {
repositories {
google()
jcenter()
maven {
url "https://www.myget.org/F/trxsystems/maven"
}
}
}
Update Gradle Dependencies
Open your module’s build.gradle
file (located in the folder with the name of your app) and insert the following line in the dependencies
section.
implementation 'com.trxsystems.neon:android-api:4.0.0'
Once added, the dependencies
section should look like the configuration below.
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.trxsystems.neon:android-api:4.0.0'
}
Sync Gradle Files
When making changes to any build.gradle
files you will get a prompt in Android Studio notifying you to sync your gradle files and build your project. Once the build succeeds you should be able to develop against the NEON API.