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



Similar documents
Android Sensors. XI Jornadas SLCENT de Actualización Informática y Electrónica

Android Sensors. CPRE 388 Fall 2015 Iowa State University

Using the Android Sensor API

Android Sensor Programming. Weihong Yu

CS 403X Mobile and Ubiquitous Computing Lecture 6: Maps, Sensors, Widget Catalog and Presentations Emmanuel Agu

Sensors & Motion Sensors in Android platform. Minh H Dang CS286 Spring 2013

! Sensors in Android devices. ! Motion sensors. ! Accelerometer. ! Gyroscope. ! Supports various sensor related tasks

E0-245: ASP. Lecture 16+17: Physical Sensors. Dipanjan Gope

Developing Sensor Applications on Intel Atom Processor-Based Android* Phones and Tablets

SENSORS ON ANDROID PHONES. Indian Institute of Technology Kanpur Commonwealth of Learning Vancouver

Android Programming Lecture 18: Menus Sensors 11/11/2011

Motion Sensing with mcube igyro Delivering New Experiences for Motion Gaming and Augmented Reality for Android Mobile Devices

How to Convert 3-Axis Directions and Swap X-Y Axis of Accelerometer Data within Android Driver by: Gang Chen Field Applications Engineer

HP TouchPad Sensor Setup for Android

Effective Use of Android Sensors Based on Visualization of Sensor Information

06 Team Project: Android Development Crash Course; Project Introduction

Sensors and Cellphones

Fitness Motion Recognition

ELET4133: Embedded Systems. Topic 15 Sensors

Kathy Au Billy Yi Fan Zhou Department of Electrical and Computer Engineering University of Toronto { kathy.au, billy.zhou }@utoronto.

Obsoleted chapter from The Busy Coder's Guide to Advanced Android Development

Module 1: Sensor Data Acquisition and Processing in Android

Application Note IMU Visualization Software

Android Concepts and Programming TUTORIAL 1

CSE476 Mobile Application Development. Yard. Doç. Dr. Tacha Serif Department of Computer Engineering Yeditepe University

Graduate presentation for CSCI By Janakiram Vantipalli ( Janakiram.vantipalli@colorado.edu )

CHAPTER 2: USING THE CAMERA WITH THE APP

Pedometer Project 1 Mr. Michaud /

Quick Start Guide ActiGraph GT9X Link + ActiLife

Making Android Motion Applications Using the Unity 3D Engine

YOUR INTERACTIVE SECURITY

Sensor Fusion Mobile Platform Challenges and Future Directions Jim Steele VP of Engineering, Sensor Platforms, Inc.

AN APPLYING OF ACCELEROMETER IN ANDROID PLATFORM FOR CONTROLLING WEIGHT

North Texas FLL Coaches' Clinics. Beginning Programming October Patrick R. Michaud republicofpi.org

Make your own Temple Run game

SwannView Link for Android

Centripetal force, rotary motion, angular velocity, apparent force.

How to Build a Simple Pac-Man Game

COMPACT GUIDE. Camera-Integrated Motion Analysis

Stop Alert Flasher with G-Force sensor

App Development for Smart Devices. Lec #5: Android Sensors

Frequently Asked Questions (FAQs)

Improving Workflow Efficiency using the Trimble R10 with SurePoint. Marco Wuethrich Trimble Applications Specialist

Using Sensors on the Android Platform. Andreas Terzis Android N00b

FNC-1000 User Guide Table of Contents

Android Geek Night. Application framework

Table of Contents. 3 Setup 6 Home Screen 8 Modes 12 Watch Live & Timeline 17 HomeHealth Technology 21 Emergency Options 24 Settings 26 Plans 28 Help

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

Rotation: Moment of Inertia and Torque

ECE 455/555 Embedded System Design. Android Programming. Wei Gao. Fall

Acellus Natural 3D Tablet

A DECISION TREE BASED PEDOMETER AND ITS IMPLEMENTATION ON THE ANDROID PLATFORM

Blender Notes. Introduction to Digital Modelling and Animation in Design Blender Tutorial - week 9 The Game Engine

Digital Field Mapping

Alarm Security Kit - NVR

Tutorial 1. Introduction to robot

類 比 與 MEMS 感 測 器 啟 動 智 慧 新 生 活 The Smart-World Started with ST (Analog, MEMS and Sensors)

Modern Market Sensors in Smartphones: State-of-the-art How to make smartphones even more smarter? Conclusions

Solar Shading Android Application v6.0. User s Manual

Center of Gravity. We touched on this briefly in chapter 7! x 2

Unit 4 Practice Test: Rotational Motion

Tutorial for Android users *with the CONNECTED WATCH App

Point of View SmartTV-500 Center - Android 4.2. General notices for use...2 Disclaimer...2 Box Contents...2

EyeOn Baby Camera User Guide for Android smartphone and tablet

Mobile Mapping. VZ-400 Conversion to a Mobile Platform Guide. By: Joshua I France. Riegl USA

The 8 th International Scientific Conference elearning and software for Education Bucharest, April 26-27, / X

VERVE 2 First Time User Guide

Information Technology Career Cluster Game Design: Animation and Simulation. Course Standard 1

Mobile Apps with App Inventor

User Manual. NETGEAR, Inc. 350 East Plumeria Drive San Jose, CA 95134, USA. December

The Essential Steps For Mobile Games Success Todd Marks CEO

Configuration Software User Instruction

Lecture 16. Newton s Second Law for Rotation. Moment of Inertia. Angular momentum. Cutnell+Johnson: 9.4, 9.6

Dynamics of Rotational Motion

Quick Start Guide. From setup to gameplay. Basic Setup. Configuring Your System. Using Game Discs IMPORTANT INFORMATION

Homeguard Wireless Home Camera Quick Start Guide

AUTOMATIC HUMAN FREE FALL DETECTION USING ANDROID

Objective. Android Sensors. Sensor Manager Sensor Types Examples. Page 2

CDVS-7000 Series Remote Software Users Guide

Autos Limited Ghana Vehicle Tracking Business Proposal

FiLIP 2 USER GUIDE 2015 Filip Technologies, Inc. All Rights Reserved. APR 2015

Educator Guide to S LAR SYSTEM El Prado, San Diego CA (619)

User's Guide. [Home Network] app. Model No.

separate the content technology display or delivery technology

CREATE A 3D MOVIE IN DIRECTOR

Transcription:

Sensor Overview ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL II) Lecture 5: Sensor and Game Development Most Android-powered devices have built-in sensors that measure motion, orientation, and various environmental conditions. These sensors are capable of providing raw data with high precision and accuracy, and are useful if you want to monitor three-dimensional device movement or positioning, or you want to monitor changes in the ambient environment near a device. Peter Lo 2 Categories of Sensors Environment Sensor Android platform supports three broad categories of sensors: Environmental Sensors These sensors measure various environmental parameters, such as ambient air temperature and pressure, illumination, and humidity (barometers, photometers, and thermometers) Motion Sensors These sensors measure acceleration forces and rotational forces along three axes (Accelerometers, gravity sensors, gyroscopes, and rotational vector sensors) Position Sensors These sensors measure the physical position of a device. (Orientation sensors and magnetometers) Android provides four sensors that let you monitor various environmental properties. Sensor Type Unit Sensor Event Data TYPE_AMBIENT_TEMPERATURE C Data Description SensorEvent.values[0] Ambient air temperature TYPE_LIGHT lx SensorEvent.values[0] Illuminance TYPE_PRESSURE hpa/ mbar SensorEvent.values[0] Ambient air pressure TYPE_RELATIVE_HUMIDITY % SensorEvent.values[0] Ambient relative humidity 3 These sensors are hardware-based and are available only if a device manufacturer has built them into a device. 4

Position Sensor Motion Sensor Android provides the geomagnetic field sensor and the orientation sensor that let you determine the position of a device. It also provide a proximity sensor that lets you determine how close the device to an object. Sensor Type Unit Sensor Event Data Data Description TYPE_PROXIMITY cm SensorEvent.values[0] Distance from object TYPE_MAGNETIC_FIELD μt SensorEvent.values[0] Geomagnetic field strength along the x axis SensorEvent.values[1] Geomagnetic field strength along the y axis SensorEvent.values[2] Geomagnetic field strength along the z axis Android provides several sensors that let you monitor the motion of a device. Accelerometer and gyroscope sensors are always hardware-based. Gravity, linear acceleration and rotation vector sensors can be either hardware-based or software-based. 5 6 Motion Sensors Type Acceleration Sensor Sensor Type Unit Sensor Event Data Data Description TYPE_ACCELEROMETER m/s 2 SensorEvent.values[0-2] Acceleration force along the x, y, z axis TYPE_GRAVITY m/s 2 SensorEvent.values[0-2] Force of gravity along the x, y, z axis. TYPE_GYROSCOPE TYPE_LINEAR_ACCELERATION m/s 2 TYPE_ROTATION_VECTOR rad/s SensorEvent.values[0-2] Rate of rotation around the x, y, z axis. SensorEvent.values[0-2] Acceleration force along the x, y, z axis (excluding gravity). SensorEvent.values[0-3] Rotation vector component along the x, y, z axis and rotation vector. 7 An acceleration sensor measures the acceleration applied to the device, including the force of gravity. The force of gravity is always influencing the measured acceleration according to the following relationship: A = - g - F / mass To measure the real acceleration of the device, the force of gravity must be removed from the accelerometer data because: When the device is sitting on a table, g = 9.81 m/s 2. When the device is in free fall and therefore rapidly accelerating toward the ground at 9.81 m/s 2, g = 0 m/s 2. 8

Rotation Vector Sensor Sensor Rate Accelerometers use the standard sensor coordinate system. In practice, this means that the following conditions apply when a device is laying flat on a table in its natural orientation: If you push the device on the left side (so it moves to the right), the x acceleration value is positive. If you push the device on the bottom (so it moves away from you), the y acceleration value is positive. If you push the device toward the sky with an acceleration of A m/s 2, the z acceleration value is equal to A + 9.81, which corresponds to the acceleration of the device (+A m/s 2 ) minus the force of gravity (-9.81 m/s 2 ). The stationary device will have an acceleration value of +9.81, which corresponds to the acceleration of the device (0 m/s 2 minus the force of gravity, which is -9.81 m/s 2 ). The rate sensor events are delivered at. This is only a hint to the system. Events may be received faster or slower than the specified rate. Usually events are received faster. SENSOR_DEPLAY_FASTEST Get sensor data as fast as possible SENSOR_DEPLAY_GAME Rate suitable for games SENSOR_DEPLAY_NORMAL Default rate suitable for screen orientation changes SENSOR_DEPLAY_UI Rate suitable for the user interface (Slowest) 9 10 Using Sensor Mobile Game Development Used for receiving notifications from the SensorManager when sensor values have changed Get an instance of the sensor service, and use that to get an instance of a particular sensor Handling incoming sensor data in the onsensorchanged() callback method Mobile Phones have become the new GameBoys. Covers an even larger demographic: Hardcore gamers, casual gamers, mom, pop and even grandma play games now. Always connected. New distribution channels. Big Market, Small Developers. Register a listener for the sensor with specified rate Unregister the sensor when the activity pauses 11 12

Key Areas for Game Design How to build an Android Game? All game tell a story. The complexity and depth of that story depends on the game. Storytelling and Narrative Core Mechanics The rule that define the operation of the game world make up the core mechanics of the game, or the foundations of gameplay. Interactivity For our purposes, interactivity is the way that the player sees, hears, and acts within the game s world. In short, the way the player plays the game Normally, the design of the game is simple. Which contain the game flow: Splash Menu Play Scores Help 13 Ref: http://www.computerworld.com/s/article/9181925/how_to_build_an_android_application_step_by_step 14 Game Screen Design Gameplay Mode A game is more than just its mechanics We have different screens for different status: Main Menu, Game Playing, Paused, Game Over, Score Different events in a screen trigger a transition to another screen. Gameplay modes consist of the available gameplay and user interface at a specific time Not all actions are available at all times Available user interface choices should be related to the current actions A game is in exactly one gameplay mode at a time. It can move to another mode as necessary 15 16

Defining the Game World How to Design Character? You need to define the virtual game world for your game, while only part of view port is available to users Base on the experiences from your own life. You know best how you felt when something happened to you, you know what different types of people are like. Make characters that other people can relate to. Make your characters unique. While you will have to have a lot of similarities to other video game characters, part of being human is being unique, and if your character is not in the least unique then they will be less believable. 17 18