MAD Gaze GLOW & GLOW PLUS
MADConnect SDK for Unity

MAD Gaze GLOW & GLOW Plus: MADConnect SDK for Unity

v2021.2 (Release Date: 06/18/2021)

  • Updates [Scene Tracking SDK]
  1. Standardize application flow for Scene Tracking
  2. Developers can now customise the Animation and Virtual Planes on their apps.
  3. Different callbacks among all state changes are now available.
  4. Two control modes are now available, Arbitary-Placement mode and Center-Placement mode.

View historical changes

Build History

Date Package File (.unitypackage) Demo Project
06/18/2021 v2021.2 v2021.2 (Unity 2020.3.9)
02/10/2021 v2021.1 v2021.1

Capabilities

MADConnect SDK enables interconnection between you (as a developer) and your target users who download your apps from MAD Store.

With this SDK, you will be able to

  • Distinguish your users
  • Validate the purchase record

Prerequisite

*This SDK is applicable to both MAD Gaze GLOW and MAD Gaze GLOW Plus model.

The application shall be

  • an Android application
  • with Target SDK at 27 (Android 8.1 'Oreo')
  • with Minimum SDK at 27 (Android 8.1 'Oreo')
  • with Landscape Left/Right orientation

Tested Unity Editor Versions

  • Unity 2020.2
  • Unity 2019.4.1
  • Unity 2019.3.12
  • Unity 2019.2.3

The target user will need to install and login on MAD Gaze Connector.

Developers need to generate an API Key from Developer Console in order to be granted access to App Purchase Status and Unique User ID specifically for your app.

Once integrating this feature into your app, your app will communicate with MAD Gaze Connector in the background to obtain the required information.

  • Your app will not connect to MAD Gaze server directly, but MAD Gaze Connector instead.

  • Your APK must be uploaded to Developer Console/Build first in order to obtain an API Key, i.e. you will need to confirm your application package name before uploading and testing your application for these features.

  • To obtain an API Key, you can go to Developer Console/Connect and press Generate API Key button after you have uploaded at least a build to the system.

Getting Started

  1. Download the Unity Package here.
  2. Double Tap on the downloaded package and import the files.
  3. You are ready to develop GLOW-enabled apps.

Obtain your first API Key

  1. Register as Developer from Developer Console. (If you already have an MAD ID, you can register as a Developer with your existing account.)
  2. Create your app from Dashboard.
  3. Check and confirm if your application package name configuration is valid.
  4. Export an Android build with Unity. (This build can be updated anytime before submitting to review.)
  5. Upload the exported APK file to Developer Console/Build.
  6. Go to Developer Console/Connect and press the Generate API Key button.
  7. You now have your own API key specific to your app and you can configure it in the Unity Editor.

Configure API Key

  1. Select MAD Gaze from the Unity menu.

  2. Select Change API Key from the expanded menu.

  3. Enter the API Key obtained from last section to the text input field on the Inspector window.

Retrieve User ID

This API allows developer to obtain a unique identifier for the logged-in user on MAD Gaze Connector app.

MadConnect.Instance.requestMadId(
   (id)=>{
      //Successfully retrieve, ID shown above represents the current logged-in user.   
   },
   (error) =>{
      //Check Error Table as below.
   }
);
Error Description
ERROR_NO_CONNECTOR_INSTALLED MAD Gaze Connector is not installed on target user's phone.
ERROR_INVALID_DEVELOPER_CONFIG Package Name or API Key might be wrong.
ERROR_NO_LOGIN User is not logged-in on MAD Gaze Connector.
ERROR_NO_NETWORK No reachable network available.
ERROR_UNKNOWN Unknown errors.

Check App Purchase Status

This API allows developer to check if the logged-in user has/has not purchased your application.

MadConnect.Instance.requestAppPurchaseStatus(
   (purchased, id)=>{
      if (purchased)
         //This user has purchased or subscribed to your application.
      } else {
         //This user has not purchased or subscribed to your application.
      }
   },
   (error) =>{
      //Check Error Table as below.
   }
);
Error Description
ERROR_NO_CONNECTOR_INSTALLED MAD Gaze Connector is not installed on target user's phone.
ERROR_INVALID_DEVELOPER_CONFIG Package Name or API Key might be wrong.
ERROR_NO_LOGIN User is not logged-in on MAD Gaze Connector.
ERROR_NO_NETWORK No reachable network available.
ERROR_UNKNOWN Unknown errors.

Sample Scene

You can check DeviceControlDemo in MADGaze/Demo/Scenes.

Troubleshooting

  • Q: What user information will be exposed to the developers?

    Developers can obtain a User ID which is a Unique ID that represents the current user, and the app purchase records but limited to the records that belongs to the app owner.

    There is no other user information such as email address, phone number, names or other sensitive information that will be exposed to the developers.

  • Q: My application is a free app. Can I check if the user has ever downloaded my app?

    Currently we don't have any APIs to serve this purpose.

  • Q: I have uploaded an app with incorrect package name. What should I do?

    Package name is extracted from the APK file once you have uploaded your first build (APK file). The package name cannot be modified manually. You have to create another application and upload the valid build instead.

    You can remove the applications that have never been submitted for review or published to MAD Store.

Changelog

v2021.2 (Release Date: 06/18/2021)

  • Updates [Scene Tracking SDK]
  1. Standardize application flow for Scene Tracking
  2. Developers can now customise the Animation and Virtual Planes on their apps.
  3. Different callbacks among all state changes are now available.
  4. Two control modes are now available, Arbitary-Placement mode and Center-Placement mode.

v2021.1 (Release Date: 02/10/2021)

v1.3.0 (Release Date: 08/19/2020)

  • First Release
    1. Scene Tracking SDK: This SDK allows user to recognize table-sized plain surface patterns and place the target to the tracked surface.
  • Updates
    1. All SDK: Support USB Connection with MAD Gaze Adapters.

v1.1.0 (Release Date: 07/10/2020)

  • First Release
    1. Head Tracking SDK: This SDK allows users to control the application via operating with head rotation.

v1.0.0 (Release Date: 06/29/2020)

  • First Release
    1. Camera SDK: This SDK allows users to access the camera with codes.

Disclaimer

This library is licensed under the MAD Gaze - Terms of Use.

Copyright © 2021 MAD Gaze. All rights reserved.