Estimote Mirror Android SDK
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE.txt Update license Jun 28, 2017
README.md Updated readme to Mirror SDK 0.2.0. Aug 9, 2018

README.md

Estimote Mirror Android SDK

Download Apache License 2.0

This SDK allows you to take control of the big screen from your Android app with Estimote Mirror.

Main features:

  • Building Mirror experience based on mobile SDKs - you can start prototyping your first Mirror application, using only mobile Display SDK. There is no need to upload any code or resources upfront to the Mirror.

  • Pre-defined views - No need to design your first Mirror app view. Android Mirror SDK lets you define customized screens based on pre-defined views; All you need to do is to declare basic styling and data content.

  • Feedback from Mirror screen to mobile - Whenever any display action has been triggered, your mobile app is being notified about it. You can handle successful screen change and perform further actions with your mobile app.

Please check the rest of README to get further details.

We really appreciate your feedback about our SDKs, thank you!

Table of Contents

Installation

Prerequisities

  • 1 Estimote Mirror w/ 1.0.15+ firmware version.
  • An account in Estimote Cloud.
  • An Android device with Bluetooth Low Energy support. We suggest using Android 5.0+ (Lollipop or newer).

Maven/Gradle dependency

Add Estimote's Maven repo to your project's build.gradle:

repositories {
    maven {
        url  "http://estimote.bintray.com/android"
    }
}

Then, add the Display SDK as well as Proximity SDK dependency to your module's build.gradle:

implementation 'com.estimote:display-sdk:0.2.0'
implementation 'com.estimote:proximity-sdk:1.0.1'

Obtain app credentials from Estimote Cloud

To obtain Estimote Cloud credentials for your mobile application:

  1. Log in to your Estimote Cloud account.
  2. Go to Apps section and click Add new app option.
  3. Select Your own app option.
  4. Save your App Id/App Token credentials.

Check Bluetooth scanning requirements

Making sure that everything needed for Bluetooth scanning to work is set up - the user has Bluetooth enabled, location permissions were granted, etc. Displaying default popup dialogs to enable Bluetooth and give needed permissions. You can find more details in Proximity SDK readme.

  1. Add Estimote's support library Mustard to your module's build.gradle file:
implementation 'com.estimote:mustard:0.2.1'
  1. Use RequirementsWizard before performing any Bluetooth action:
RequirementsWizardFactory.createEstimoteRequirementsWizard().fulfillRequirements(
            YOUR_ACTIVITY_CONTEXT_HERE,
            onRequirementsFulfilled : { /* start the Bluetooth operations here! */ },
            onRequirementsMissing: { /* scanning won't work, handle this case in your app */ },
            onError: { /* Oops, some error occurred, handle it here! */ })

Quick start

The following is simple example for showing Poster View on the screen, when user appears in Mirror nearby range.

//KOTLIN

//Initialize your Estimote Cloud credentials
val cloudCredentials = EstimoteCloudCredentials(YOUR_APP_ID_HERE, YOUR_APP_TOKEN_HERE)
EstimoteSDK.initialize(applicationContext, cloudCredentials.appId, cloudCredentials.appToken)

//Define MirrorClient
val mirrorClient = MirrorClient.Builder(this).build()

//Declare your customized Poster View
val defaultPosterViewStyle = PosterViewStyle.Builder().create()
val defaultPosterViewData = PosterViewData.Builder()
                .setHeader("Congratulations!")
                .setBody("You've just created a Poster View! \n Let's tweak it a little bit!")
                .setImage("poster.jpg")
                .create()
val posterView = PosterView(defaultPosterViewData, defaultPosterViewStyle)

//Build ProximityObserver with Cloud credentials
proximityObserver = ProximityObserverBuilder(applicationContext, cloudCredentials)
                .withLowLatencyPowerMode()
                .withTelemetryReportingDisabled()
                .withEstimoteSecureMonitoringDisabled()
                .onError { /* Handle an error here! */}
                .build()

//Define near proximity zone
val nearZone = ProximityZoneBuilder()
                .forTag("mirror")
                .inNearRange()
                .onEnter { mirrorClient.forDevice(it.deviceId).take(posterView).display() }
                .build()

//Start proximity observation
observationHandler = proximityObserver.startObserving(nearZone)

Zone monitoring is based on Estimote Proximity SDK - most reliable signal-processing technology.

To get more details, you can find setting up ProximityObserver or defining Proximity Zones at Github readme.

Your feedback and questions

At Estimote we're massive believers in feedback! Here are some common ways to share your thoughts with us:

Changelog

To see what has changed in recent versions of our SDK, please visit our releases page.

License

Apache 2.0