SkedGo's TripKit for Android
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
AccountData
AccountDomain
CommonCoreLegacy
TripKitAndroid
TripKitData
TripKitDomain
TripKitDomainLegacy
TripKitSamples
ValidBookingCountData
ValidBookingCountDomain
gradle/wrapper
maven/com/skedgo
route-persistence
trip-kit-booking-ui
trip-kit-booking
.gitignore
.travis.yml
LICENSE
README.md
build.gradle
dependencies.gradle
gradle.properties Release v1.20 (#322) Nov 13, 2018
gradlew
gradlew.bat
settings.gradle

README.md

TripKit for Android

Build Status

Set up TripKit

Add TripKit to your Android project

First, add JitPack maven:

allprojects {
  repositories {
    jcenter()
    maven { url "https://jitpack.io" }
  }
}

Then, in app's build file, add TripKitAndroid dependency into dependencies section:

dependencies {
  compile 'com.github.skedgo.tripkit-android:TripKitAndroid:<insert-newest-version-here>'
}

[Release] (https://jitpack.io/#skedgo/tripkit-android)

For a full setup, you can have a look at TripKitSamples' build file here.

Required configuration

Supported Android versions

TripKit supports for Android apps running Android 4.0.3 and above. To make sure that it works in your Android app, please specify minSdkVersion in your build.gradle file to 15:

android {
  defaultConfig {
    minSdkVersion 15
  }
}
Get an API key

An API key is necessary to use TripKit's services, such as A-2-B routing, and all-day routing. In order to obtain an API key, you can sign up at https://tripgo.3scale.net.

Create TripKit instance to access TripKit's services

We recommend to have an Application subclass. Next, in the onCreate() method, you can initiate following setup:

class App : Application() {
  override fun onCreate() {
    super.onCreate()
    JodaTimeAndroid.init(this)
    TripKit.initialize(
        Configs.builder()
            .context(this)
            .key { Key.ApiKey("YOUR_API_KEY") }
            .build()
    )
  }
}

With "YOUR_API_KEY" is the key that you obtained from https://tripgo.3scale.net in the previous step.