ExtremeLocation Android SDK Reference Guide 9036427-00 Rev AA Published August 2019
Copyright © 2019 Extreme Networks, Inc. All rights reserved. Legal Notice Extreme Networks, Inc. reserves the right to make changes in specifications and other information contained in this document and its website without prior notice. The reader should in all cases consult representatives of Extreme Networks to determine whether any such changes have been made. The hardware, firmware, software or any specifications described or referred to in this document are subject to change without notice.
Table of Contents Preface......................................................................................................................................... 4 Conventions............................................................................................................................................................................. 4 Providing Feedback to Us........................................................................................................................................
Preface This section discusses the conventions used in this guide, ways to provide feedback, additional help, and other Extreme Networks® publications. Conventions This section discusses the conventions used in this guide. Text Conventions The following tables list text conventions that are used throughout this guide. Table 1: Notice Icons Icon New! Notice Type Alerts you to... General Notice Helpful tips and notices for using the product. Note Important features or instructions.
Preface Terminology When features, functionality, or operation is specific to a switch family, such as ExtremeSwitching, the family name is used. Explanations about features and operations that are the same across all product families simply refer to the product as the switch. Providing Feedback to Us Quality is our first concern at Extreme Networks, and we have made every effort to ensure the accuracy and completeness of this document.
Preface • • The device history (for example, if you have returned the device before, or if this is a recurring problem) Any related RMA (Return Material Authorization) numbers Subscribing to Service Notifications You can subscribe to email notifications for product and software release announcements, Vulnerability Notices, and Service Notifications. 1 Go to www.extremenetworks.com/support/service-notification-form. 2 Complete the form with your information (all fields are required).
1 ExtremeLocation Android SDK Step-by-Step Integration Initializing the SDK Scanning Handling Beacon and Experience Responses This guide describes the ExtremeLocation Android SDK’s methods, properties, callbacks and experience response structure. You can use this guide to get an in-depth understanding on how to best utilize the ExtremeLocation SDK in conjunction with the ExtremeLocation cloud. Step-by-Step Integration 1 Go to https://manage.extremelocation.
ExtremeLocation Android SDK Refer to Google documentation for information on how to request permission https:// developer.android.com/training/permissions/requesting. Note The ExtremeLocation Android SDK will not function without this permission and may respond with an error upon calling the init function(). Initializing the SDK You need to have an instance of the FootmarksAPI class to interact with the ExtremeLocation SDK. It is obtained by calling a static method to initialize the SDK.
ExtremeLocation Android SDK You can customize the notification by passing a notification to the startScan call, or just pass null and the SDK will use the default notification. mFootmarksAPI.startScan(notification, new FootmarksAPI.InitCallback() { @Override public void onError(FootmarksSdkError footmarksSdkError) { Log.w(TAG, String.format("Error type:%1$s message:%2$s", footmarksSdkError.getError().toString(), footmarksSdkError.getMessage())); switch (footmarksSdkError.
ExtremeLocation Android SDK case ExperienceTypeHtml: HtmlExp html = ((HtmlExp)exp); html.presentHtmlInWebView(((WebView)findViewById(R.id.webview))); break; case ExperienceTypeUrl: UrlExp url = ((UrlExp)exp); url.presentUrlInWebView(((WebView)findViewById(R.id.webview))); break; case ExperienceTypeCustom: CustomExp custom = ((CustomExp)exp); String item = custom.text; break; case ExperienceTypeAlert: AlertExp alert = ((AlertExp)exp); alert.
2 Experience Properties Dynamic Payload Examples Send Converted Experience Examples All experiences inherit from the base class, Experience. Currently, there are six experience types: Video, Image, Html, Url, Alert, and Custom. Experiences are created in the ExtremeLocation UI. The properties for the Experience base class and each subclass are described below. You could use the properties however you like.
Experience Properties Java public FMDisplayType displayType: Enum that indicates what mode to display the video in. public enum FMDisplayType { Fullscreen("fullscreen"), Large("large"), Small("small"); } public FMVideoProvider contentProvider: Enum that informs you of where the video is hosted. public enum FMVideoProvider { YouTube("youtube"), Vimeo("vimeo"), Custom("custom"); } public String videoURL: A URL that points to the video.
Experience Properties AlertExp An Experience that is intended to simply present a notification to the user. This class contains a helper method, showAlert(). showAlert() parses out the notificationTitle and notificationDescription from the experience and presents a notification in the Android notification bar with this string. Java public void showAlert(); CustomExp This is a catchall Experience that can be modified to fit your use case in the Footmarks Management Console.
Experience Properties Send Converted Experience Examples After a user has received and/or interacted with your Experience payload (or if they didn't), you will want to call one of the following methods to let the API (and your reporting dashboard) know what happened after the user received it. Experience experience = incoming experince; experience.sendConvertedExperience(Experience.ConvertedAction.Clicked); experience.sendConvertedExperience(Experience.ConvertedAction.Clicked,true); experience.