Skip to content

Adding Locus API to project

Jiří M. aka Menion edited this page Sep 14, 2021 · 8 revisions

Setup of project.

Suggested developing tool: Android Studio

  • create/use new project for your application. How to create project: here

Adding Locus API

Using Locus API as the dependency

  • in most cases, using Locus API available over Maven should be perfect for you. To do it, open build.gradle file of your module (not the root build.gradle) and add dependency to Locus API. Do not forget also dependency on Kotlin runtime.
dependencies {
    // Kotlin
    implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:' + KOTLIN_VERSION

    // get locus API
    implementation 'com.asamm:locus-api-android:[latest]'
}

Using Locus API source directly

In this case

  • checkout source https://github.com/asamm/locus-api.git into your working directory
  • add modules into your project in settings.gradle
include ':core:locus-api'
include ':core:locus-api-android'
include ':core:locus-api-android-sample'
  • add dependency as in the first case, but now directly on downloaded Locus API module
dependencies {
    // use locus API
    implementation project(':core:locus-api-android')
}

Signing

Locus API Sample application (and also add-ons we publish) warn about missing parameters.

All parameters needed to sign app, place into system Environmental variables as follows:

# Setup signing by DEBUG certificate
ANDROID_SIGN_DEBUG = <path to debug keystore>|android|androiddebugkey|android

# Setup signing by RELEASE certificate
ANDROID_SIGN_DEBUG = <path to release keystore>|<store password>|<key alias>|<key password>

Note: usually it is necessary to restart Android Studio to make new ENV keys available.

Clone this wiki locally