Mobile Devices Developers Guide
Total Page:16
File Type:pdf, Size:1020Kb
MOBILE DEVICES DEVELOPERS GUIDE MOBILE DEVICES DEVELOPERS GUIDE 8000271-001 Rev. A April 2015 ii Mobile Devices Developers Guide No part of this publication may be reproduced or used in any form, or by any electrical or mechanical means, without permission in writing from Zebra. This includes electronic or mechanical means, such as photocopying, recording, or information storage and retrieval systems. The material in this manual is subject to change without notice. The software is provided strictly on an “as is” basis. All software, including firmware, furnished to the user is on a licensed basis. Zebra grants to the user a non-transferable and non-exclusive license to use each software or firmware program delivered hereunder (licensed program). Except as noted below, such license may not be assigned, sublicensed, or otherwise transferred by the user without prior written consent of Zebra. No right to copy a licensed program in whole or in part is granted, except as permitted under copyright law. The user shall not modify, merge, or incorporate any form or portion of a licensed program with other program material, create a derivative work from a licensed program, or use a licensed program in a network without written permission from Zebra. The user agrees to maintain Zebra’s copyright notice on the licensed programs delivered hereunder, and to include the same on any authorized copies it makes, in whole or in part. The user agrees not to decompile, disassemble, decode, or reverse engineer any licensed program delivered to the user or any portion thereof. Zebra reserves the right to make changes to any software or product to improve reliability, function, or design. Zebra does not assume any product liability arising out of, or in connection with, the application or use of any product, circuit, or application described herein. No license is granted, either expressly or by implication, estoppel, or otherwise under any Zebra, intellectual property rights. An implied license only exists for equipment, circuits, and subsystems contained in Zebra products. iii iv Mobile Devices Developers Guide Revision History Changes to the original guide are listed below: Change Date Description Rev A 4/2012 Initial release. Rev. B 11/2013 Update -001 Rev. A 4/2015 Zebra re-branding. v vi Mobile Devices Developers Guide TABLE OF CONTENTS Table of Contents About this Guide ............................................................................................................................. xix Text Conventions ............................................................................................................................ xx Command Syntax...........................................................................................................................xxi Non-Psion Computers..................................................................................................................... xxi Other Documentation for Application Development........................................................................ xxi Chapter 1: Backlight Backlighting..................................................................................................................................... 1-3 Omnii and EP10 .............................................................................................................................1-3 Thresholds......................................................................................................................................1-3 Timeouts .........................................................................................................................................1-3 Backlight Configuration Parameters ............................................................................................... 1-5 Mobile Devices SDK Version 5.4 and Later...................................................................................1-6 Mobile Devices SDK Version 5.3 and Earlier.................................................................................1-6 Getting Started with Backlights ....................................................................................................... 1-10 Code Samples for Backlights.......................................................................................................... 1-10 Backlight API Elements................................................................................................................... 1-10 Chapter 2: Batteries and Power Management Suspend Timeout............................................................................................................................ 2-3 Psion Power States......................................................................................................................... 2-4 Suspend/resume Cycle ..................................................................................................................2-4 Comparison of Power States..........................................................................................................2-4 Fully on ..................................................................................................................................... 2-4 Standby Mode (Unattended Mode)........................................................................................... 2-4 Suspend Mode.......................................................................................................................... 2-4 Suspend with Radio Off Mode (Shutdown Mode)..........................................................................2-5 Power Off........................................................................................................................................2-5 Manual Initiation of Standby and Suspend...................................................................................... 2-5 Wake up from Suspend Mode, or Suspend With Radio Off Mode.................................................. 2-8 EP10 Power Options Registry Settings .......................................................................................... 2-9 viii Mobile Devices Developers Guide Programmatic Control of the Suspend/resume Cycle..................................................................... 2-10 Initiation of Suspend ................................................................................................................. 2-10 Selection of Wakeup Sources................................................................................................... 2-10 Accelerometer and Gyroscope.......................................................................................................2-11 Wake up that Stops in Standby Mode....................................................................................... 2-11 Setting a Time Until Wakeup ..........................................................................................................2-11 Getting Started with the Suspend/resume Cycle ............................................................................ 2-11 Code Samples for the Suspend/resume Cycle............................................................................... 2-11 Suspend API Elements................................................................................................................... 2-11 Power Management........................................................................................................................ 2-12 Events....................................................................................................................................... 2-12 Battery Information ......................................................................................................................... 2-13 Battery Suspend Threshold ...................................................................................................... 2-13 Main Battery and Backup Battery Lifetimes and Remaining Charge........................................ 2-13 Smart Batteries ......................................................................................................................... 2-13 Smart Battery Registry Settings...................................................................................................... 2-14 Getting Started with Power Management and Smart Batteries ...................................................... 2-15 Code Samples for Power Management and Smart Batteries ......................................................... 2-15 Power Management and Battery API Elements ............................................................................. 2-15 Chapter 3: Reset Reset Types and Effects................................................................................................................. 3-3 Manual Initiation of Resets ............................................................................................................. 3-5 Programmatic Initiation of Resets................................................................................................... 3-11 Controlling Keyboard Resets..........................................................................................................3-12 Detecting and Identifying Resets .............................................................................................. 3-12 Getting Started with Resets ............................................................................................................ 3-12 Code Samples for Resets..............................................................................................................