Skip to content
Android-MobileSDK-External
Java Other
  1. Java 99.9%
  2. Other 0.1%
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
sample-app
.gitignore
License.pdf
Privacy Policy (Sample) - INRIX.pdf
README.md
Release Notes.pdf
SDK 7.0 Quick Start Guide.pdf
Terms of Service (Sample) - INRIX.pdf

README.md

Android-MobileSDK-External

This repository contains multiple components that make up an SDK for building applications to run on Android and access INRIX services/data.

IDs/Keys

Each new project will require a set of IDs/Keys to enable projects to be built and data services to be accessed. Some IDs are specific/unique to the project.

Quick Start Guide

Download the INRIX SDK .aar library files and add them to your project. These libraries can be found here: sample-app/libs

Update your app's build.gradle to include INRIX SDK dependences

dependencies {
    // INRIX SDK.
    compile(name: "com.inrix.sdk-${inrixSdkVersion}", ext: 'aar')
    compile(name: "com.inrix.sdk.cache-${inrixCacheVersion}", ext: 'aar')

    // Google Play Services.
    compile "com.google.android.gms:play-services-base:${googlePlayServicesVersion}"
    compile "com.google.android.gms:play-services-gcm:${googlePlayServicesVersion}"
    compile "com.google.android.gms:play-services-location:${googlePlayServicesVersion}"

    // Additional INRIX SDK dependencies.
    compile "com.android.support:support-v4:${supportLibVersion}"
    compile "com.google.code.gson:gson:${gsonVersion}"
    compile "com.android.volley:volley:${volleyVersion}"
    compile "org.slf4j:slf4j-api:${slf4jVersion}"

	...
}

Configure and initialize INRIX SDK:

  1. Add following configuration to AndroidManifest.xml in your project under <application> node:

    <meta-data
        android:name="com.inrix.appKey"
        android:value="@string/inrix_app_key"/>
    <meta-data
        android:name="com.inrix.appId"
        android:value="@string/inrix_app_id"/>
  2. Initialize INRIX SDK in Application's onCreate

    public class App extends Application {
        @Override
        public void onCreate() {
            super.onCreate();
    
            InrixCore.initialize(this);
        }
    }

    if additional configuration is needed, InrixCore.initialize(context, Configuration) can be used to configure INRIX SDK.

Call INRIX APIs:

public void onButtonClick() {
    final IncidentsManager incidentsManager = InrixCore.getIncidentsManager();
    final IncidentsManager.IncidentRadiusOptions options = new IncidentRadiusOptions(new GeoPoint(47, -122), 500);
    incidentsManager.getIncidentsInRadius(options, new IIncidentsResponseListener() {
        @Override
        public void onResult(List<Incident> incidents) {
            // TODO: Handle results.
        }

        @Override
        public void onError(Error error) {
            // TODO: Handle error.
        }
    });
}

Migrating from 6.x to 7.0

In 7.0 we changed the default InrixCore.initialize(Context) behavior and updated the Configuration.Builder default features. The INRIX SDK is now initialized with the following Configuration.Builder methods disabled, unless explicitly set to true:

Methods now disabled by default
com.inrix.sdk.Configuration.Builder.calendarSyncEnabled
com.inrix.sdk.Configuration.Builder.tripRecordingEnabled
com.inrix.sdk.Configuration.Builder.monitorUserLocation

We have also removed the android.permission.READ_CALENDAR permission from the SDK's manifest. In order for calendar syncing to function properly, the application must have this permission granted.

JavaDocs

INRIX SDK JavaDocs can be found here: http://docs.inrix.com/sdk/android/

License

The SDK Developer License can be found here as License.pdf

Terms of Service & Privacy Policy

Now included are samples for the “Terms of Service” and “Privacy Policy”. These are just samples. All commercial applications will access these documents via a future public URL.

You can’t perform that action at this time.