WEARIT DEVELOPER DOCUMENTATION 0.2 preliminary release July 20 th, 2013



Similar documents
Cisco Cius Development Guide Version 1.0 September 30, 2010

Android Setup Phase 2

Hello World. by Elliot Khazon

Developing Android Apps for BlackBerry 10. JAM854 Mike Zhou- Developer Evangelist, APAC Nov 30, 2012

IOIO for Android Beginners Guide Introduction

MOVEIRO BT-200 Technical Information for Application Developer

CS378 -Mobile Computing. Android Overview and Android Development Environment

Android Development. 吳 俊 興 國 立 高 雄 大 學 資 訊 工 程 學 系

Application Development Setup Guide

CS 528 Mobile and Ubiquitous Computing Lecture 2: Android Introduction and Setup. Emmanuel Agu

App Development for Smart Devices. Lec #2: Android Tools, Building Applications, and Activities

GROUPTALK FOR ANDROID VERSION for Android

1) SETUP ANDROID STUDIO

Otium Gear S Smart Watch User Guide Please read the manual before use. * For further information, please visit

l What is Android? l Getting Started l The Emulator l Hello World l ADB l Text to Speech l Other APIs (camera, bitmap, etc)

Download and Installation Instructions. Android SDK and Android Development Tools (ADT) Microsoft Windows

ShareLink 200 Setup Guide

Download and Installation Instructions. Android SDK and Android Development Tools (ADT)

Christie Brio Frequently Asked Questions

ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I)

Download and Installation Instructions. Android SDK and Android Development Tools (ADT) Microsoft Windows

Developing for MSI Android Devices

Board also Supports MicroBridge

Android Application Development

Android Development. Marc Mc Loughlin

Getting Started with Android Development

Frameworks & Android. Programmeertechnieken, Tim Cocx

Setting Up Your Android Development Environment. For Mac OS X (10.6.8) v1.0. By GoNorthWest. 3 April 2012

Android Concepts and Programming TUTORIAL 1

Introduction to Android Development. Ed Burnette

Android Security Lab WS 2014/15 Lab 1: Android Application Programming

Pedometer Project 1 Mr. Michaud /

Programming with Android: SDK install and initial setup. Dipartimento di Informatica: Scienza e Ingegneria Università di Bologna

Running a Program on an AVD

Developer's Cookbook. Building Applications with. The Android. the Android SDK. A Addison-Wesley. James Steele Nelson To

JUSTOP Smart TV Player With Android 4.0. User Manual

5 reasons to choose Streamezzo SDK over Android SDK Page 2

Mobile application testing is a process by which application software developed for hand held mobile devices is tested for its functionality,

Android Development Tutorial. Nikhil Yadav CSE40816/ Pervasive Health Fall 2011

Android Environment SDK

Mocean Android SDK Developer Guide

Quick Start Guide. U.S. Cellular Customer Service:

SW10. User Guide. Smart Watch. Please read the manual before use.

The "Eclipse Classic" version is recommended. Otherwise, a Java or RCP version of Eclipse is recommended.

Developing Android Apps for BlackBerry 10. JAM 354 Matthew Whiteman - Product Manager February 6, 2013

ValveLink Mobile Software

Wzzard Sensing Platform Bluetooth App User Manual

New Technology Introduction: Android Studio with PushBot

Home Course Catalog Schedule Pricing & Savings Training Options Resources About Us

Introduction to Android

How To Use An Easymp Network Projector On A Computer Or Network Projection On A Network Or Network On A Pc Or Mac Or Ipnet On A Laptop Or Ipro Or Ipo On A Powerbook On A Microsoft Computer On A Mini

Getting Started with Android Programming (5 days) with Android 4.3 Jelly Bean

TomTom PRO 82xx PRO.connect developer guide

Mobile Phones Operating Systems

CUSTOMER SERVICE CONTACTS

Desi g n Document. Life Monitor. Group Members: Kenny Yee Xiangxiong Shi Emmanuel Panaligan

Introduction to Android: Hello, Android! 26 Mar 2010 CMPT166 Dr. Sean Ho Trinity Western University

Lecture 1 Introduction to Android

VIRTUAL DESKTOP COMPANION SOFTWARE FOR MAC

Develop a Hello World project in Android Studio Capture, process, store, and display an image. Other sensors on Android phones

Tutorial on Basic Android Setup

Mobile Application Development

ReSound Control App. Where to get ReSound Control

Basic Android Setup Windows Version

Mobile App Testing Process INFLECTICA TECHNOLOGIES (P) LTD

Oracle FLEXCUBE Direct Banking Android Tab Client Installation Guide Release

Android Basics. Xin Yang

With a single download, the ADT Bundle includes everything you need to begin developing apps:

Goal Status Bar. Time/Date. Activity type: distance calories steps. Activity value. Quick Start Guide

HP AppPulse Mobile. Adding HP AppPulse Mobile to Your Android App

Introduction to Android

An Android-based Instant Message Application

Workshop on Android and Applications Development

01. Introduction of Android

directory to "d:\myproject\android". Hereafter, I shall denote the android installed directory as

BlackVue Cloud App Overview...3. Getting Started...6. Basic Menu Screens BlackVue Cloud BlackVue Wi-Fi Internal Memory...

KNOX Customization: Find the Right Fit for your Customers

Android Programming: Installation, Setup, and Getting Started

Logitech ConferenceCam CC3000e. Best Practices for use with Software Clients. UC for Real People

How To Develop An Android App On An Android Device

Introduction to Android Programming (CS5248 Fall 2015)

Islamic University of Gaza. Faculty of Engineering. Computer Engineering Department. Mobile Computing ECOM Eng. Wafaa Audah.

Development. SriSeshaa Technologies. Table of Contents

[PACKTl. Flash Development for Android Cookbook. Flash, Flex, and AIR. Joseph Labrecque. Over 90 recipes to build exciting Android applications with

Pebble. E-Paper Watch for iphone and Android. 1 Button A. 4 Button B. 5 Button C. 2 Display. 6 Button D. 3 Charge Port

Android Development Setup [Revision Date: 02/16/11]

Acellus Natural 3D Tablet

Document Number: /15/2012

Chapter 2 Getting Started

3. Security Security center. Open the Settings app. Tap the Security option. Enable the option Unknown sources.

Mobile Application Development Android

FNC-1000 User Guide Table of Contents

Honor T1 8.0 FAQ. Issue 01. Date 06/30

Fahim Uddin 1. Java SDK

Login with Amazon Getting Started Guide for Android. Version 2.0

Introduction to Android Development. Jeff Avery CS349, Mar 2013

AdFalcon Android SDK Developer's Guide. AdFalcon Mobile Ad Network Product of Noqoush Mobile Media Group

Silk Test Testing Mobile Web Applications

Transcription:

WEARIT DEVELOPER DOCUMENTATION 0.2 preliminary release July 20 th, 2013 The informations contained in this document are subject to change without notice and should not be construed as a commitment by Si14 S.p.A page 1

Index Index Terms of Use 1 WEARIT SDK 2 Platform 3 Configure the Environment 4 Setup the Emulator 5 Code the Application 6 Sensors 6.1 Accelerometer 6.2 Magnetometer 6.3 ANT+ 6.4 Pedometer 6.5 GPS 6.6 Buzzer 6.7 Buttons page 3 page 4 page 5 page 7 page 9 page 13 page 14 page 14 page 14 page 14 page 14 page 18 page 19 page 20 The informations contained in this document are subject to change without notice and should not be construed as a commitment by Si14 S.p.A page 2

Terms of Use Copyright Information and Usage Notice The information disclosed herein is property of Si14 S.p.A. No part of this publication may be reproduced or transmitted in any form or by any means including electronic storage, reproduction, execution or transmission without the prior written consent of Si14 S.p.A. The recipient of this document by its retention and use agrees to respect the copyright of the information contained herein. The information contained in this document is subject to change without notice and should not be construed as a commitment by Si14 S.p.A. Android and the Android logo are trademarks or registered trademarks of Google Inc. ANT+ is trademarks or registered trademarks of Dynastream Innovations Inc. Bluetooth is trademarks or registered trademarks of Bluetooth SIG. WiFi is trademarks or registered trademarks of Wi-Fi Alliance If you have received this preliminary document it means that you have been selected to join the Alpha WearIT Developer Program. As the WearIT Developer Team, we want to thank you since we really rely on your co-operation and your feedback to improve the product and to ensure the best experience for the users and the developers. Since this is a work-in-progress version we ask you to not disclose this document nor its content to third-parties. 2013 Si14 S.p.A. All Rights Reserved. The informations contained in this document are subject to change without notice and should not be construed as a commitment by Si14 S.p.A page 3

WEARIT SDK Hello and thank you for your interest about the WEARIT platform. WEARIT is a watch designed for sport, health & wellness monitoring applications. WEARIT OS is based on Android and its APIs are compliant with Android 4.1.2. Within this guide you will find instructions on how to start developing your first WEARIT application starting from the Android SDK. Knowledge of the Android framework and the Android application lifecycle is essential before you start writing WEARIT Android applications. For more informations about Android development refer to the official documentation. A good starting place is the Android Developers Guide : http://developer.android.com/guide The informations contained in this document are subject to change without notice and should not be construed as a commitment by Si14 S.p.A page 4

The Platform The WEARIT Operating System is based on Android 4.1.2. When possible, the standard Android APIs are used. The following is a list of the main WEARIT Platform Features: OS Android Version 4.1.2 CPU RAM Screen Resolution Screen Size Touchscreen Connectivity TI Cortex A8 256 MB 240x240 MDPI 1.5 Multitouch capacitive sensor WiFi with WiFi Direct support. Bluetooth with support of A2DP AVRCP TEHTERING Bluetooth LE, not currently available, software support will be available in future OS releases ANT+ Sensors Accelerometer GPS Magnetometer Hardware Pedometer Storage 4GB emmc 700 MB available for the applications 2.7 GB available as SDCard storage Buttons Power Supply USB Audio notifications 3 Hardware Buttons Charging clip USB connection through charging clip Buzzer The informations contained in this document are subject to change without notice and should not be construed as a commitment by Si14 S.p.A page 5

In order to access the non-standard features of the device, two java libraries are available: The PedometerSystemService: a library to access the hardware pedometer informations; The BuzzerSystemService: a library to command the integrated buzzer. All the other features are available using their corresponding standard Android APIs. The informations contained in this document are subject to change without notice and should not be construed as a commitment by Si14 S.p.A page 6

Configure the Environment To build your first WEARIT application you need to get the Android SDK from the Android developers website. Download the ADT Bundle with Eclipse and the ADT Plugin from: http://developer.android.com/sdk/index.html unzip the package and follow the Android SDK documentation. The informations contained in this document are subject to change without notice and should not be construed as a commitment by Si14 S.p.A page 7

Launch the SDK Manager application and, inside the Packages section, select SDK Platform for Android 4.1.2 and ARM EABI v7a System Image for Android 4.1 to be installed. The informations contained in this document are subject to change without notice and should not be construed as a commitment by Si14 S.p.A page 8

Setup the Emulator To test your application for WEARIT you need to setup the emulator to emulate the WEARIT OS. WEARIT screen resolution is 240x240 MDPI. Android does not support square screen so setup your application for a screen sized 240x241 and remember that the last line will be not visible on the device screen. Create a new device definition in Android Virtual Manager as depicted in the following screenshots. The informations contained in this document are subject to change without notice and should not be construed as a commitment by Si14 S.p.A page 9

Under the Device Definitions section of the Android Virtual Device Manager application, press the New Device button. Setup the Virtual Device entering the following configuration values: Name: WearITSimulator Screen Size: 1.5 in Resolution: 240x241 px Under the Sensors section, ensure that only Accelerometer and GPS boxes are checked Under the Cameras section, ensure that there is no box checked Under the Input section, select No Nav. The Keyboard box should be unckecked. RAM: 256 Mib Size: Normal Screen Ratio: notlong Density: mdpi Buttons: Hardware Device States: Portrait and Landscape boxes should be checked. Once you have entered these values, press the Edit Device button. The informations contained in this document are subject to change without notice and should not be construed as a commitment by Si14 S.p.A page 10

The informations contained in this document are subject to change without notice and should not be construed as a commitment by Si14 S.p.A page 11

The informations contained in this document are subject to change without notice and should not be construed as a commitment by Si14 S.p.A page 12

Code the Application Create your application like a standard Android App. While developing, take into consideration the following notes: By default, activities are launched in full-screen mode The Android status bar is only showed when the Launcher is in the resumed state, i.e. visible to the user. For all the standard activity launched by the user the status bar is hidden by the system. This behavior differs from the standard Android behavior. To simulate it in the emulator you can set the following attribute to the <activity> or <application> element in your Android manifest: android:theme= @android:style/theme.notitlebar.fullscreen Screen resolution is 240x240, ensure that your application layouts are optimized for this resolution The informations contained in this document are subject to change without notice and should not be construed as a commitment by Si14 S.p.A page 13

Sensors Accelerometer Accelerometer measures the acceleration force (in m/s2) that is applied to the device on all three physical axes (x, y, and z), including the gravitational force. To use the accelerometer refer to Android Sensor Manager API: http://developer.android.com/reference/android/hardware/sensormanager.html Magnetometer A magnetometer is a measuring instrument used to measure the strength and the direction of the magnetic field, for all three physical axes (x, y, z) in μt. To use magnetometer refer to Android Sensor Manager API: http://developer.android.com/reference/android/hardware/sensormanager.html ANT+ ANT+ is a wireless communications used to connect WEARIT with ANT+ compatible accessories like heart rate monitors, speed sensors, weight measuring devices etx. To use the ANT+ integrated radio see documentation at http://www.thisisant.com/developer/ Download the ANT SDK Package and follow the documentation and the examples. To use the emulator in combination with an ant USB key you can use the ANT Android Emulator Bridge Tool and follow the documentation as you would do with any Android device. Pedometer WEARIT includes a hardware pedometer integrated in the accelerometer device. This sensor is able to measure steps, speed and calories independently from the OS, this allows it to collect data also when the system is in stand-by mode. Use of Pedometer is supported on WEARIT SDK through a system service and a dedicated library. To download the library and the documentation please refer to the WEARIT developer section on the website (still under development at the moment of writing). The Pedometer system service is an Android remote service implemented through.aidl files. The interface is described in two files: The informations contained in this document are subject to change without notice and should not be construed as a commitment by Si14 S.p.A page 14

IOnPedometerChangedListener.aidl * Interface used to receive notification from the remote * pedometer Service. interface IOnPedometerChangedListener * Called whenever one of the values read from the pedometer s value changes. * @param steps Absolute step count. * @param speed Actual estimated speed [m/h]. * @param calories Estimated calories consumption [cal]. * @param distance Estimated distance traveled [m]. * @param runstyle current kind of running, can be one of 0: unknown, 1: rest, 2: walking, 3: jogging void onpedometerchanged(float steps, float speed/*[m/h], float calories/*[cal], float distance/*[m], int runstyle); IPedometerService.aidl * IPedometerService is the remote interface to the WearIT pedometer * system service. interface IPedometerService * Use this function to read the pedometer gender. * Returns the gender, 0 female, 1 male int getgender(); * Use this function to configure the pedometer gender. * @param gender The sex, 0 female, 1 male The informations contained in this document are subject to change without notice and should not be construed as a commitment by Si14 S.p.A page 15

void setgender(int gender); * Use this function to read the pedometer height. * @param height The person height [cm] (from 100 to 225) int getheight(); * Use this function to configure the pedometer height. * Returns the person height in [cm] (from 100 to 225) void setheight(int height); * Use this function to read the pedometer weight. * Returns the weight in [Kg] (from 35 to 150) int getweight(); * Use this function to configure the pedometer weight. * @param weight The person weight [Kg] (from 35 to 150) void setweight(int weight); * Use this function to configure the pedometer service. * @param sex The sex, 0 female, 1 male * @param height The person height [cm] (from 100 to 225) * @param weight The person weight [Kg] (from 35 to 150) void setconfiguration(int sex, int height, int weight); * Use this function to reset the pedometer values. void reset(); * Call this function to register your local @link IOnPedometer- ChangedListener * to the remote pedometer service. * * @param onpedometerchangedlistener The @link IOnPedometer- ChangedListener * you want to register The informations contained in this document are subject to change without notice and should not be construed as a commitment by Si14 S.p.A page 16

void registerpedometerchangedlistener(in IOnPedometerChangedListener onpedometerchangedlistener); * Call this function to unregister your local @link IOnPedometer- ChangedListener * to the remote pedometer service. * * @param onpedometerchangedlistener The @link IOnPedometer- ChangedListener * you want to unregister void unregisterpedometerchangedlistener(in IOnPedometerChangedListener onpedometerchangedlistener); For informations on how to use an Android remote service, please refer to the services section of the Android official documentation: http://developer.android.com/guide/components/services.html IOnPedometerChangedListener.Stub can be extended to receive value change notifications and the Android ServiceConnection is implemented to connect with the remote pedometer service. The following is a code extract (see the download section for a complete example): private static class PedometerCallback extends IOnPedometerChangedListener.Stub public PedometerCallback() @Override public void onpedometerchanged(float steps, float speed, float calories, float distance, int runstyle) throws RemoteException // Use the values... private class PedometerConnection implements ServiceConnection @Override public void onserviceconnected(componentname name, IBinder service) mpedometer = IPedometerService.Stub.asInterface(service); try sendconfig(); The informations contained in this document are subject to change without notice and should not be construed as a commitment by Si14 S.p.A page 17

mpedometer.registerpedometerchangedlistener(mpedometerlistener); catch (RemoteException e) @Override public void onservicedisconnected(componentname name) if (mpedometer!= null) try mpedometer.unregisterpedometerchangedlistener(mpedom eterlistener); catch (RemoteException e) mpedometer = null; GPS WEARIT integrate a High Performance GPS location sensor. To use GPS refer to Android LocationManager API: http://developer.android.com/reference/android/location/locationmanager.html Use of particular GPS settings to enable low power consumption and fine tune the GPS behavior will be updated soon on SDK. In order to test the GPS with the emulator you could find helpful the following open source project: https://code.google.com/p/android-gps-emulator/ The informations contained in this document are subject to change without notice and should not be construed as a commitment by Si14 S.p.A page 18

Buzzer Use of Buzzer is supported on WEARIT through a system service and a dedicated library, called BuzzerSystemLib. We also released a client library, the BuzzerSystemClient, that allows you to directly use the BuzzerSystemLib writing a few lines of code. The client exposes only two functions: * Call this function to play a wave at the given frequence. * @param frequence The frequence to play, in Hz. * @param durationmillis For how long this frequence must be hold, in * milli seconds. public void ring(int frequence, int durationmillis) * Use this function to configure the buzzer volume. * @param volume The volume. Can be one of: * @link BuzzerService.VOLUME_MUTE * @link BuzzerService.VOLUME_MIN * @link BuzzerService.VOLUME_MEDIUM * @link BuzzerService.VOLUME_MAX public void setvolume(int volume) In order to use the client in you Activity or Service use:... BuzzerClient mbuzzer;... @Override public void oncreate(bundle savedinstancestate)... mbuzzer = new BuzzerClient(this); mbuzzer.oncreate();... and @Override public void ondestroy() The informations contained in this document are subject to change without notice and should not be construed as a commitment by Si14 S.p.A page 19

... mbuzzer = new BuzzerClient(this); mbuzzer.ondestroy(); to play the Buzzer simply call the ring method: mbuzzer.ring(myfrequencehz, mydurationmillis); and to change the volume use the setvolume method (note that this changes the duty cycle of the buzzer, and then the volume control has a coarse granularity): mbuzzer.setvolume(buzzerservice.volume_min); Buttons WEARIT has 3 hardware buttons: The central one is used as power button and is mapped to the Home key signal (KEYCODE_ HOME) The button on the top sends Back key signal (KEYCODE_BACK) The button on the bottom sends the Menu key signal (KEYCODE_MENU) You can override the KEYCODE_MENU and KEYCODE_BACK in your application to enhance its usability. Pressing for 8 seconds the central button allows to force the device reboot. The informations contained in this document are subject to change without notice and should not be construed as a commitment by Si14 S.p.A page 20