SDKstatefuldeprecated

Mapmyindia Intouch Android SDK

mapmyindia-intouch-android-sdk

A Mappls sdk for tracking telematics, workforce, gis analytics, widgets deep links, identity platform across Android.

Integration notice

This source is classified as deprecated. Use it for migration context and verify the supported replacement before new development.

Migration plan available

This source is covered by a gated upgrade journey with candidate evidence, compatibility checks, parity proof, production acceptance, and rollback. Open InTouch Android SDK lineage

What this surface enables

A Mappls sdk for tracking telematics, workforce, gis analytics, widgets deep links, identity platform across Android.

Why this source is classified stateful

The source identity names a provider-backed durable operations family whose records or lifecycle survive a single request or screen.

Authority: Source Identity · Evidence: intouch
Platforms

Android

Product areas

Tracking TelematicsWorkforceGis AnalyticsWidgets Deep LinksIdentity Platform

Languages found

JavaTextKotlin

Authentication signals

Oauth2

Prepare the integration

  1. An Android project with a supported Gradle and Kotlin or Java toolchain
  2. OAuth client credentials issued for the intended Mappls project
Production guardrailsPin package versions and record the source fingerprint.Keep server credentials out of client binaries and logs.Test failures, timeouts, quota limits, upgrades, and rollback.Validate legacy examples against current authentication contracts.

Setup and usage examples

These examples were extracted from the canonical public source document and sanitized for credential-like values. Check the source branch and package version before copying into a production application.

mapmyindia-intouch-android-sdk examples
allprojects {  
    repositories {  
    
        maven {  
            url 'https://maven.mapmyindia.com/repository/mapmyindia/' 
        }  
    }  
}

Operate the whole lifecycle

This operational model supplements the repository-level setup instructions. Adapt its resource names and transitions to the owning product contract.

1
Provision

Create the owning project, enable entitlements, restrict credentials, and record the resource owner.

2
Initialize

Create the SDK, session, asset, task, workspace, or other durable aggregate exactly once.

3
Operate

Persist provider and application identifiers and transitions; make commands idempotent and observations replayable.

4
Recover

Reconcile restarts, delayed events, expired credentials, partial sync, and version changes against durable evidence.

5
Retire

Revoke access and release runtime resources while preserving required history and audit evidence.

Topics documented by the source

01DEPRECATED

This repository is no longer in active development & use.

02Introduction

Get Real-Time Location Tracking for your apps with MapmyIndia InTouch SDK. Track a user's live location with our simplified InTouch SDK integration (for Android), highly customizable to your specific needs.

The InTouch SDK comes with a variety of events that enable better control and power over your tracking needs. Get ready made events to create,, Geo-Fences, Event Alerts, and Trails of telematics/ phone devices. Also get location benefits built for various applications including logistics, delivery tracking, employee tracking, and live location sharing.

To get started, explore the InTouch Demo App.

Already have an application? Give it a boost with the powerful features of InTouch. Learn how to Integrate the InTouch SDK

• Setup: Please contact apisupport@mapmyindia.com to get the Intouch SDK authorisation for your Client ID and Client Secret. - Quick Start: Start with a ready-to-go app - Integrate the SDK: Integrate the SDK into your app - Dashboard: See all your devices' locations on MapmyIndia InTouch Dashboard - InTouch Telematics APIs: Use InTouch APIs to get the details of the devices.

03Setup.

We use your Client ID to identify your account details and assign all your user's devices under a single account.

To get your Outh2 Rest API Client ID and Client Secret please login to MapmyIndia API Dashboard

Please contact apisupport@mapmyindia.com to get InTouch SDK access to your Client ID

After getting the access, you can start with the InTouchDemo app, or Integrate the InTouch SDK in your app.

04InTouchDemo app

This guide allows you to add live location tracking to an Android app. Android Studio is the recommended development environment for building an app with the MapmyIndia InTouch SDK for Android.

05Step 1. Download the InTouchDemo App.

Click here to download the InTouchDemo App Project. Open this project in Android Studio

06Step 2. Set your Publishable key

1. Add the publishable key to SetUpKeyFragment Fragment file.

2. Run project on your device using simulator instance.

3. Go through run-time permission flow (applicable for Android M and later).

07Integrate the InTouch SDK

• Add InTouch SDK - Start tracking - InTouch Telematics APIs - Utility methods

08Step 1: Setup a project

1. Start Android Studio. 2. Create a new project as follows: - If you see the Welcome to Android Studio dialog, choose Start a new Android Studio project, available under 'Quick Start' on the right of the dialog. - Otherwise, click File in the Android Studio menu bar, click New-> New Project. - Select the form factors you need for your app. If you're not sure what you need, just select Phone and Tablet. - Select Add No Activity and click Next. 3. Enter your app name, package name, project location, language and minimum API version as prompted. Click Next. 4. Create a Basic Activity in the 'Add an activity to Mobile' dialog. Click Next. 5. Enter the activity name, layout name and title as prompted. Click Finish.

Android Studio starts Gradle and builds your project. This may take a few seconds. For more information about creating a project in Android Studio, see the Android Studio documentation.

The next few sections contain the code samples that you need to add to your activity's java file as well as its xml layout file for creating an app with MapmyIndia InTouch SDK for live tracking.

09Step 2. Add InTouch SDK

Follow these steps to add the SDK to your project – - Create a new project in Android Studio - Add MapmyIndia repository in your project level build.gradle

• Add below dependency in your app-level build.gradle

10Step 3: Initialize InTouch SDK

Initialization can be done either of the below mentioned method. Keep the same method accross your project.

11Method 1:

Initialize the SDK without unique Id. Intouch SDK will create a unique Id for the device. On every new device Login , a new device will be created and the new device id will be returned.

12Java

java // IAuthListener - returns authorization results in the forms of callbacks. InTouch.initialize( , , , new IAuthListener() { @Override public void onSuccess(Long id) { //write your code here } @Override public void onError(String reason, String identifier, String description) { // reason gives the error type. // errorIdentifier gives information about error code. // errorDescription gives a message for a particular error. } });

13Method 2:

Initialize the SDK with your own Unique Id. It is recommended to use when you maintain the unique Id for your users. Now when ever this Unique Id is passed same device id will be returned in the response, even if the user s logs from different devices.

14Java

java // IAuthListener - returns authorization results in the forms of callbacks. InTouch.initialize( , , , , , new IAuthListener() { @Override public void onSuccess(Long id) { //write your code here } @Override public void onError(String reason, String identifier, String description) { // reason gives the error type. // errorIdentifier gives information about error code. // errorDescription gives a message for a particular error. } });

15Kotlin

On sucessful registration you will get the Id, use this Id in APIs to get the live location or to create trips against the user.

16Step 4: Start Tracking

Track your app user's phone live location by using the below method.

17IMPORTANT

To read further, please refer to documentation available here: https://github.com/mappls-api/mapmyindia-intouch-android-sdk/wiki

Service references found

URLs are sanitized during ingestion and may include documentation or legacy hosts. Use them to trace the source, not as a substitute for the current API contract.

https://github.com/MapmyIndia/mapmyindia-intouch-android-sdk#intouchdemo-app):https://github.com/MapmyIndia/mapmyindia-intouch-android-sdk/wiki#-intouch-telematics-apis):https://github.com/MapmyIndia/mapmyindia-intouch-android-sdk/wiki):https://www.mapmyindia.com/api/dashboardhttps://developer.android.com/studio/index.htmlhttps://github.com/MapmyIndia/mapmyindia-intouch-android-sdk/archive/master.ziphttps://github.com/MapmyIndia/mapmyindia-intouch-android-sdkhttps://developer.android.com/training/permissions/requestinghttps://intouch.mapmyindia.com/nextgenhttps://github.com/MapmyIndia/mapmyindia-intouch-android-sdk/wiki#-intouch-telematics-apishttps://github.com/MapmyIndia/mapmyindia-intouch-android-sdk/wiki/Utility-Methodshttps://developer.android.com/studio/projects/create-project.html).https://maven.mapmyindia.com/repository/mapmyindia/https://github.com/MapmyIndia/mapmyindia-intouch-android-sdk/wiki/MapmyIndia-BLE-Pluginhttps://github.com/mappls-api/mapmyindia-intouch-android-sdk/wiki