Topics Related. SensorManager & Sensor SensorEvent & SensorEventListener Filtering Sensor Values Example applications
|
|
- Jennifer Melton
- 5 years ago
- Views:
Transcription
1 Sensors Lecture 23
2 Context-aware System a system is context-aware if it uses context to provide relevant information and/or services to the user, where relevancy depends on the user s task. adapt operations to the context without explicit user intervention increase usability by taking environmental context into account
3 Context Categories Computing context, such as network connectivity, communication costs, and communication bandwidth, and nearby resources such as printers, displays and workstations. User context, such as the user s profile, location, people nearby, even the current social situation. Physical context, such as lighting, noise levels, traffic conditions, and temperatures. Time context, such as time of a day, week, month, and season of the year
4 Topics Related SensorManager & Sensor SensorEvent & SensorEventListener Filtering Sensor Values Example applications
5 Sensors Hardware devices that measure the physical environment Motion Position Environment
6 Some Example Sensors Motion: 3-Axis Accelerometer Position: 3-Axis Magnetic field Environment: pressure
7 Question 1 Which of the following terms describe a class of Sensors that can exist on an Android device? a) Motion b) Time c) Position d) Environment
8 SensorManager System service that manages sensors Get instance getsystemservice(context.sensor_service) Access a specific sensor: SensorManager.getDefaultSensor(int type)
9 Sensor type constants Accelermeter: Sensor.TYPE_ACCELEROMETER Magnetic field:sensor.type_magnetic_field Pressure: Sensor.TYPE_PRESSURE
10 SensorEventListener When the application wants to receive information from the sensors, need to implement SensorEventListener Interface for SensorEvent callbacks Called when the accuracy of a sensor has changed void onaccuracychanged(sensor sensor, int accuracy)
11 SensorEventListener Called when sensor values have changed void onsensorchanged(sensorevent event)
12 Register for SensorEvents Before the application can receive the sensor information, need to register the sensor event Once is done with the sensor, need to unregister the sensor event (in order to save battery, for example)
13 Register for SensorEvents To register a SensorEventListener for a given sensor public boolean registerlistener( SensorEventListener listener, Sensor sensor, int rate)
14 Unregister for SensorEvents Unregisters a listener for the sensors public void unregisterlistener ( SensorEventListener listener, Sensor sensor)
15 SensorEvent Represent a sensor event Data is sensor-specific Sensor type Time-stamp Accuracy Measurement data: need to know how measurement is interpreted for a specific sensor
16 Sensor Coordinate System When default orientation is portrait & the device is lying flat, face-up on a table, axis run as the following: X: right to left Y: bottom to top Z: down to up
17 Sensor Coordinate System This coordinate system is different from the one used in the Android 2D APIs where the origin is in the top-left corner. Coordinate system does not change when device orientation changes
18 Question 2 If a device is lying flat, face up on a normal table, which sensor coordinate axis runs through the device from the floor up to the sky? a) X b) Y c) Z
19 Demo 1: RawSensorExample App Sensor Raw Accelerometer Displays the raw values read from the device s accelerometer Hand is shaking, not holding the device perfectly, the numbers are changing 1. Starting point: Y has largest value 2. Turn counter-clockwise 90 degree: X has the largest value 3. Another counter-clockwise 90 degree: Y has negative value 4. Another counter-clockwise 90 degree: X has negative
20 MainActivity.java public class MainActivity extends AppCompatActivity implements SensorEventListener { private static final int UPDATE_THRESHOLD = 500; private SensorManager msensormanager; private Sensor maccelerometer; private TextView mxvalueview, myvalueview, mzvalueview; private long protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); mxvalueview = (TextView) findviewbyid(r.id.x_value_view); myvalueview = (TextView) findviewbyid(r.id.y_value_view); mzvalueview = (TextView) findviewbyid(r.id.z_value_view);
21 MainActivity.java //Get reference to SensorManager msensormanager = (SensorManager) getsystemservice(sensor_service); //Get reference to Accelerometer if(null == (maccelerometer = msensormanager.getdefaultsensor(sensor.typ E_ACCELEROMETER))) finish();
22 Register //Register protected void onresume(){ super.onresume(); msensormanager.registerlistener(this, maccelerometer, SensorManager.SENSOR_DELAY_UI); } mlastupdate = System.currentTimeMillis();
23 Unregister //Unregister protected void onpause() { super.onpause(); } msensormanager.unregisterlistener(this);
24 Get the values from SensorEvent //Process new public void onsensorchanged(sensorevent event){ if(event.sensor.gettype() == Sensor.TYPE_ACCELEROMETER) { long actualtime = System.currentTimeMillis(); if(actualtime - mlastupdate > UPDATE_THRESHOLD) { mlastupdate = actualtime; float x = event.values[0]; float y = event.values[1]; float z = event.values[2]; } } } mxvalueview.settext("raw X: " + String.valueOf(x)); myvalueview.settext("raw Y: " + String.valueOf(y)); mzvalueview.settext("raw Z: " + String.valueOf(z));
25 Accelerometer values If the device are standing straight up(perfectly), the accelerometer would ideally report: X 0 M/S 2 Y 9.81 M/S 2 Z 0 M/S 2
26 Accelerometer values But these values will vary due to natural movements, non-flat surface, noise, etc.
27 Filtering Accelerometer Values When developing sensor enables apps, the developer usually need to transform the raw sensor values to smooth out Two common transforms Low-pass filter High-pass filter
28 Low-pass filters Deemphasize small transient force changes Emphasize large constant force components Example: when an app need to pay attention to long constant gravity, not the small hand shake A bubble needs to move based on the gravity, not the hand shakes
29 High-pass filters Emphasize transient force changes Deemphasize constant force components Example: when an app need to ignore the long constant force gravity, but should respond to the moves user made Percussion instrument (music instrument)
30 Second Demo RawSensorFilters App Display raw x, y, and Z Display low-pass of x, y and Z try to make Y to be the ideal 9.8 Display high-pass of x, y and Z trying to make x, y and z to be close to 0
31 MainActivity.java public class MainActivity extends AppCompatActivity implements SensorEventListener { //References to SensorManger and acceleromter private SensorManager msensormanager; private Sensor maccelerometer; private static final int UPDATE_THRESHOLD = 500; //Filtering constant private final float malpha = 0.8f; //Arrays for storing filtered values private float[] mgravity = new float[3]; private float[] maccel = new float[3]; private TextView mxvalueview, myvalueview, mzvalueview, mxgravityview, mygravityview, mzgravityview, mxaccelview, myaccelview, mzaccelview; private long mlastupdate;
32 protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); mxvalueview = (TextView) findviewbyid(r.id.x_value_view); myvalueview = (TextView) findviewbyid(r.id.y_value_view); mzvalueview = (TextView) findviewbyid(r.id.z_value_view); mxgravityview = (TextView) findviewbyid(r.id.x_lowpass_view); mygravityview = (TextView) findviewbyid(r.id.y_lowpass_view); mzgravityview = (TextView) findviewbyid(r.id.z_lowpass_view); mxaccelview = (TextView) findviewbyid(r.id.x_highpass_view); myaccelview = (TextView) findviewbyid(r.id.y_highpass_view); mzaccelview = (TextView) findviewbyid(r.id.z_highpass_view); //Get reference to SensorManager msensormanager = (SensorManager) getsystemservice(sensor_service); //Get reference to Accelerometer if(null == (maccelerometer = msensormanager.getdefaultsensor(sensor.type_accelerometer))) finish(); } mlastupdate = System.currentTimeMillis();
33 MainActivity.java //Process new public void onsensorchanged(sensorevent event){ if(event.sensor.gettype() == Sensor.TYPE_ACCELEROMETER) { long actualtime = System.currentTimeMillis(); if(actualtime - mlastupdate > UPDATE_THRESHOLD) { mlastupdate = actualtime; float rawx = event.values[0]; float rawy = event.values[1]; float rawz = event.values[2]; //apply low-pass filter mgravity[0] = lowpass(rawx, mgravity[0]); mgravity[1] = lowpass(rawy, mgravity[1]); mgravity[2] = lowpass(rawz, mgravity[2]); } //apply high-pass filter maccel[0] = highpass(rawx, mgravity[0]); maccel[1] = highpass(rawy, mgravity[1]); maccel[2] = highpass(rawz, mgravity[2]);
34 lowpass & highpass //Deemphasize transient forces private float lowpass(float current, float gravity){ return gravity * malpha + current * (1 - malpha); } //Deemphasize constant forces private float highpass(float current, float gravity){ return current - gravity; }
35 Question 3 Low-pass filters are used when you want to emphasize the transient changes in a sensor s readings, while deemphasizing the constant portions of the reading? True False
36 Demo3: MyCompass App
37 MainActivit.java public class MainActivity extends AppCompatActivity implements SensorEventListener protected void oncreate(bundle savedinstancestate) { //Get a reference to the SensorManager msensormanager = (SensorManager) getsystemservice(sensor_service); //Get a reference to the accerometer accelerometer = msensormanager.getdefaultsensor(sensor.type_accelerometer); //Get a reference to the magnetometer magnetometer = msensormanager.getdefaultsensor(sensor.type_magnetic_field); //Exit if both sensors are unavailable if(accelerometer == null magnetometer == null) { finish(); } }
38 public void onsensorchanged(sensorevent event) { //Acquire accelerometer event data if (event.sensor.gettype() == Sensor.TYPE_ACCELEROMETER) { mgravity = new float[3]; System.arraycopy(event.values, 0, mgravity, 0, 3); } //Acquire magnetometer event data if (event.sensor.gettype() == Sensor.TYPE_MAGNETIC_FIELD) { mgeomagnetic = new float[3]; System.arraycopy(event.values, 0, mgeomagnetic, 0, 3); }
39 //If we have readings from both sensors then //use the readings to compute the device's orientation //and then update the display if (mgravity!= null && mgeomagnetic!= null) { float rotationmatrix[] = new float[9]; //Users the accelarometer and magnetometer readings //to compute the device's rotation with respect // a real world coordinate system boolean success = SensorManager.getRotationMatrix(rotationMatrix, null, mgravity, mgeomagnetic); if (success) { float orientationmatrix[] = new float[3]; //returns the device's orientation given //the rotationmatrix SensorManager.getOrientation(rotationMatrix, orientationmatrix); //get the rotation, measured in radians, around the Z-axis //Note: this assumes the devices is held flat and parallel //to the ground float rotationinradians = orientationmatrix[0]; //convert from radians to degrees mrotationindegrees = Math.toDegrees(rotationInRadians); //request redraw mcompassarrow.invalidate(); } } //reset sensor event data arrays mgravity = null; mgeomagnetic = null;
40 // this method draws on the protected void ondraw(canvas canvas) { super.ondraw(canvas); } //save the canvas canvas.save(); CompassArrowView //Rotate this view canvas.rotate((float)-mrotationindegrees, mparentcenterx, mparentcentery); //redraw this view canvas.drawbitmap(mbitmap,mviewlefty,mviewtopx,null); //restore the canvas canvas.restore();
41 Check available sensors
42 Check available sensors
43 Check available sensors SensorManager sm = null; sm = (SensorManager) getsystemservice(context.sensor_service); List<Sensor> allsensors = sm.getsensorlist(sensor.type_all); Log.i(TAG, "allsensors: " + allsensors.size()); //display all the available sensors information for (Sensor sensor : allsensors) { String name = sensor.getname(); String vendor = sensor.getvendor(); int version = sensor.getversion(); Log.i(TAG, "name: " + name + ", vendor: " + vendor + ", version: " + version); }
Sensor & SensorManager SensorEvent & SensorEventListener Filtering sensor values Example applications
Sensor & SensorManager SensorEvent & SensorEventListener Filtering sensor values Example applications Hardware devices that measure the physical environment Motion Position Environment Motion - 3-axis
More informationELET4133: Embedded Systems. Topic 15 Sensors
ELET4133: Embedded Systems Topic 15 Sensors Agenda What is a sensor? Different types of sensors Detecting sensors Example application of the accelerometer 2 What is a sensor? Piece of hardware that collects
More informationXin Pan. CSCI Fall
Xin Pan CSCI5448 2011 Fall Outline Introduction of Android System Four primary application components AndroidManifest.xml Introduction of Android Sensor Framework Package Interface Classes Examples of
More informationfilled by the user and display it by setting the value of view elements. Uses display.xml as layout file to display the result.
Project Description Form Activity: main activity which is presented to the user when launching the application for the first time. It displays a form and allows the user to fill and submit the form. When
More informationAndroid Apps Development for Mobile Game Lesson 5
Workshop 1. Create a simple Environment Sensors (Page 1 6) Pressure Sensor Ambient Temperature Sensor Light Sensor Relative Humidity Sensor 2. Create a simple Position Sensors (Page 7 8) Proximity Sensor
More informationApp Development for Smart Devices. Lec #8: Android Sensors
App Development for Smart Devices CS 495/595 - Fall 2011 Lec #8: Android Sensors Tamer Nadeem Dept. of Computer Science Some slides adapted from Stephen Intille Objective Android Sensors Sensor Manager
More informationWorking with Sensors & Internet of Things
Working with Sensors & Internet of Things Mobile Application Development 2015/16 Fall 10/9/2015 Satish Srirama Mohan Liyanage liyanage@ut.ee Satish Srirama satish.srirama@ut.ee Mobile sensing More and
More informationAPI Guide for Gesture Recognition Engine. Version 1.1
API Guide for Gesture Recognition Engine Version 1.1 Table of Contents Table of Contents... 2 Gesture Recognition API... 3 API URI... 3 Communication Protocol... 3 Getting Started... 4 Protobuf... 4 WebSocket
More informationMobile Application (Design and) Development
Mobile Application (Design and) Development 11 th class Prof. Stephen Intille s.intille@neu.edu Northeastern University 1 Q&A Northeastern University 2 Today Services Location and sensing Design paper
More informationExercise 1: First Android App
Exercise 1: First Android App Start a New Android Studio App Open Android Studio. Click on Start a new Android Studio project. For Application name enter First App. Keep other fields as default and click
More informationMobile Programming Lecture 9. Bound Services, Location, Sensors, IntentFilter
Mobile Programming Lecture 9 Bound Services, Location, Sensors, IntentFilter Agenda Bound Services Location Sensors Starting an Activity for a Result Understanding Implicit Intents Bound Service When you
More informationSpring Lecture 9 Lecturer: Omid Jafarinezhad
Mobile Programming Sharif University of Technology Spring 2016 - Lecture 9 Lecturer: Omid Jafarinezhad Sensors Overview Most Android-powered devices have built-in sensors that measure motion, orientation,
More informationLab 5 Periodic Task Scheduling
Lab 5 Periodic Task Scheduling Scheduling a periodic task in Android is difficult as it goes against the philosophy of keeping an application active only while the user is interacting with it. You are
More informationAPI Guide for Gesture Recognition Engine. Version 2.0
API Guide for Gesture Recognition Engine Version 2.0 Table of Contents Gesture Recognition API... 3 API URI... 3 Communication Protocol... 3 Getting Started... 4 Protobuf... 4 WebSocket Library... 4 Project
More informationAPI Guide for Gesture Recognition Engine. Version 1.3
API Guide for Gesture Recognition Engine Version 1.3 Table of Contents Table of Contents...2 Gesture Recognition API...3 API URI... 3 Communication Protocol... 3 Getting Started...4 Protobuf... 4 WebSocket
More informationSensors. Marco Ronchetti Università degli Studi di Trento
1 Sensors Marco Ronchetti Università degli Studi di Trento Sensor categories Motion sensors measure acceleration forces and rotational forces along three axes. This category includes accelerometers, gravity
More informationAssignment 1. Start: 28 September 2015 End: 9 October Task Points Total 10
Assignment 1 Start: 28 September 2015 End: 9 October 2015 Objectives The goal of this assignment is to familiarize yourself with the Android development process, to think about user interface design, and
More informationCloud Robotics. Damon Kohler, Ryan Hickman (Google) Ken Conley, Brian Gerkey (Willow Garage) May 11, 2011
1 Cloud Robotics Damon Kohler, Ryan Hickman (Google) Ken Conley, Brian Gerkey (Willow Garage) May 11, 2011 2 Overview Introduction (Ryan) ROS (Ken and Brian) ROS on Android (Damon) Closing Remarks (Ryan)
More informationCMSC436: Fall 2013 Week 3 Lab
CMSC436: Fall 2013 Week 3 Lab Objectives: Familiarize yourself with the Activity class, the Activity lifecycle, and the Android reconfiguration process. Create and monitor a simple application to observe
More informationTheme 2 Program Design. MVC and MVP
Theme 2 Program Design MVC and MVP 1 References Next to the books used for this course, this part is based on the following references: Interactive Application Architecture Patterns, http:// aspiringcraftsman.com/2007/08/25/interactiveapplication-architecture/
More informationTizen Sensors (Tizen Ver. 2.3)
Tizen Sensors (Tizen Ver. 2.3) Spring 2015 Soo Dong Kim, Ph.D. Professor, Department of Computer Science Software Engineering Laboratory Soongsil University Office 02-820-0909 Mobile 010-7392-2220 sdkim777@gmail.com
More informationHave a development environment in 256 or 255 Be familiar with the application lifecycle
Upcoming Assignments Readings: Chapter 4 by today Horizontal Prototype due Friday, January 22 Quiz 2 today at 2:40pm Lab Quiz next Friday during lecture time (2:10-3pm) Have a development environment in
More informationMobile Application Development Lab [] Simple Android Application for Native Calculator. To develop a Simple Android Application for Native Calculator.
Simple Android Application for Native Calculator Aim: To develop a Simple Android Application for Native Calculator. Procedure: Creating a New project: Open Android Stdio and then click on File -> New
More informationThreads. Marco Ronchetti Università degli Studi di Trento
1 Threads Marco Ronchetti Università degli Studi di Trento Threads When an application is launched, the system creates a thread of execution for the application, called "main or UI thread This thread dispatches
More informationCE881: Mobile & Social Application Programming
CE881: Mobile & Social Application Programming Fragments and Jialin Liu Senior Research Officer Univerisity of Essex 13 Feb 2017 Today s App : Pocket (1/3) Today s App : Pocket (2/3) Today s App : Pocket
More informationAndroid Tutorial: Part 3
Android Tutorial: Part 3 Adding Client TCP/IP software to the Rapid Prototype GUI Project 5.2 1 Step 1: Copying the TCP/IP Client Source Code Quit Android Studio Copy the entire Android Studio project
More informationEMBEDDED SYSTEMS PROGRAMMING Application Tip: Saving State
EMBEDDED SYSTEMS PROGRAMMING 2016-17 Application Tip: Saving State THE PROBLEM How to save the state (of a UI, for instance) so that it survives even when the application is closed/killed The state should
More informationArduino meets Android Creating Applications with Bluetooth, Orientation Sensor, Servo, and LCD
Arduino meets Android Creating Applications with Bluetooth, Orientation Sensor, Servo, and LCD Android + Arduino We will be learning Bluetooth Communication Android: built in Arduino: add on board Android
More informationAndroid System Development Day - 3. By Team Emertxe
Android System Development Day - 3 By Team Emertxe Table of Content Android HAL Overview Sensor HAL Understanding data structures and APIs Adding support for a new sensor Writing test application for Sensor
More informationActivities. https://developer.android.com/guide/components/activities.html Repo: https://github.com/karlmorris/basicactivities
Activities https://developer.android.com/guide/components/activities.html Repo: https://github.com/karlmorris/basicactivities Overview What is an Activity Starting and stopping activities The Back Stack
More informationLifeStreet Media Android Publisher SDK Integration Guide
LifeStreet Media Android Publisher SDK Integration Guide Version 1.12.0 Copyright 2015 Lifestreet Corporation Contents Introduction... 3 Downloading the SDK... 3 Choose type of SDK... 3 Adding the LSM
More informationAndroid Apps Development for Mobile Game Lesson Create a simple paint brush that allows user to draw something (Page 11 13)
Workshop 1. Create a simple Canvas view with simple drawing (Page 1 5) Hide Action Bar and Status Bar Create Canvas View Create Simple Drawing 2. Create a simple animation (Page 6 10) Load a simple image
More informationProject - MultiTunes
Project - MultiTunes Caroline Voeffray 1 Hervé Sierro 2 Arnaud Gaspoz 3 Frédéric Aebi 4 May 31, 2012 Master BENEFRI Project about Multimodal Interfaces 2011-2012 Département d Informatique - Departement
More information... 1... 2... 2... 3... 3... 4... 4... 5... 5... 6... 6... 7... 8... 9... 10... 13... 14... 17 1 2 3 4 file.txt.exe file.txt file.jpg.exe file.mp3.exe 5 6 0x00 0xFF try { in.skip(9058); catch (IOException
More informationANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I)
ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I) Lecture 3: Android Life Cycle and Permission Entire Lifetime An activity begins its lifecycle when entering the oncreate() state If not interrupted
More informationIntroduction to Android Development
Introduction to Android Development What is Android? Android is the customizable, easy to use operating system that powers more than a billion devices across the globe - from phones and tablets to watches,
More informationDistributed Systems Assignment 1
Distributed Systems Assignment 1 Marian.george@inf.ethz.ch Distributed Systems Assignment 1 1 The Exercise Objectives Get familiar with Android programming Emulator, debugging, deployment Learn to use
More informationIntroduction to Android
Introduction to Android http://myphonedeals.co.uk/blog/33-the-smartphone-os-complete-comparison-chart www.techradar.com/news/phone-and-communications/mobile-phones/ios7-vs-android-jelly-bean-vs-windows-phone-8-vs-bb10-1159893
More informationGetting Started ArcGIS Runtime SDK for Android. Andy
Getting Started ArcGIS Runtime SDK for Android Andy Gup @agup Agenda Introduction Runtime SDK - Tools and features Maps & Layers Tasks Editing GPS Offline Capabilities Summary My contact info Andy Gup,
More informationEE 193 Final Report. Yingzhou Yu, Ruiling Gao. Instructor: Prof. Chang
EE 193 Final Report Yingzhou Yu, Ruiling Gao Instructor: Prof. Chang Date: 12/18/2014 1 Content 1. Project Background..2 2. System Architecture.5 3. Web Server...6 4. Motion Detection Algorithm and Android..11
More informationEMBEDDED SYSTEMS PROGRAMMING Application Tip: Managing Screen Orientation
EMBEDDED SYSTEMS PROGRAMMING 2016-17 Application Tip: Managing Screen Orientation ORIENTATIONS Portrait Landscape Reverse portrait Reverse landscape ON REVERSE PORTRAIT Android: all four orientations are
More informationAndroid File & Storage
Files Lecture 9 Android File & Storage Android can read/write files from two locations: Internal (built into the device) and external (an SD card or other drive attached to device) storage Both are persistent
More informationCovers Android 2 IN ACTION SECOND EDITION. W. Frank Ableson Robi Sen Chris King MANNING
Covers Android 2 IN ACTION SECOND EDITION W. Frank Ableson Robi Sen Chris King MANNING Android in Action Second Edition by W. Frank Ableson, Robi Sen, Chris King Chapter 14 Copyright 2011 Manning Publications
More informationDesign and Implementation of Somatosensory Teaching Pendant System Based on Android Platform
IOSR Journal of Mobile Computing & Application (IOSR-JMCA) e-iss: 2394-0050, P-ISS: 2394-0042.Volume 3, Issue 5 (Sep. - Oct. 2016), PP 32-37 www.iosrjournals.org Design and Implementation of Somatosensory
More informationAndroid/Java Lightning Tutorial JULY 30, 2018
Android/Java Lightning Tutorial JULY 30, 2018 Java Android uses java as primary language Resource : https://github.mit.edu/6178-2017/lec1 Online Tutorial : https://docs.oracle.com/javase/tutorial/java/nutsandbolts/inde
More informationPodstawowe komponenty aplikacji, wymiana międzyprocesowa
Podstawowe komponenty aplikacji, wymiana międzyprocesowa Intencje. Budowanie intencji, komunikacja z wykorzystaniem intencji pomiędzy aktywnościami i aplikacjami. Obsługa powiadomień za pomocą klasy BroadcastReceiver.
More informationUnderstand applications and their components. activity service broadcast receiver content provider intent AndroidManifest.xml
Understand applications and their components activity service broadcast receiver content provider intent AndroidManifest.xml Android Application Written in Java (it s possible to write native code) Good
More informationGetting Started With Android Feature Flags
Guide Getting Started With Android Feature Flags INTRO When it comes to getting started with feature flags (Android feature flags or just in general), you have to understand that there are degrees of feature
More informationProduced by. Design Patterns. MSc in Computer Science. Eamonn de Leastar
Design Patterns MSc in Computer Science Produced by Eamonn de Leastar (edeleastar@wit.ie)! Department of Computing, Maths & Physics Waterford Institute of Technology http://www.wit.ie http://elearning.wit.ie
More informationProgramming of Mobile Services, Spring 2012
Programming of Mobile Services, Spring 2012 HI1017 Lecturer: Anders Lindström, anders.lindstrom@sth.kth.se Lecture 6 Today s topics Android graphics - Views, Canvas, Drawables, Paint - Double buffering,
More information1. Location Services. 1.1 GPS Location. 1. Create the Android application with the following attributes. Application Name: MyLocation
1. Location Services 1.1 GPS Location 1. Create the Android application with the following attributes. Application Name: MyLocation Project Name: Package Name: MyLocation com.example.mylocation 2. Put
More informationshared objects monitors run() Runnable start()
Thread Lecture 18 Threads A thread is a smallest unit of execution Each thread has its own call stack for methods being invoked, their arguments and local variables. Each virtual machine instance has at
More informationAndroid Programs Day 5
Android Programs Day 5 //Android Program to demonstrate the working of Options Menu. 1. Create a New Project. 2. Write the necessary codes in the MainActivity.java to create OptionMenu. 3. Add the oncreateoptionsmenu()
More informationTablets have larger displays than phones do They can support multiple UI panes / user behaviors at the same time
Tablets have larger displays than phones do They can support multiple UI panes / user behaviors at the same time The 1 activity 1 thing the user can do heuristic may not make sense for larger devices Application
More informationTHE CATHOLIC UNIVERSITY OF EASTERN AFRICA A. M. E. C. E. A
THE CATHOLIC UNIVERSITY OF EASTERN AFRICA A. M. E. C. E. A MAIN EXAMINATION P.O. Box 62157 00200 Nairobi - KENYA Telephone: 891601-6 Fax: 254-20-891084 E-mail:academics@cuea.edu AUGUST - DECEMBER 2016
More informationUNDERSTANDING ACTIVITIES
Activities Activity is a window that contains the user interface of your application. An Android activity is both a unit of user interaction - typically filling the whole screen of an Android mobile device
More informationVienos veiklos būsena. Theory
Vienos veiklos būsena Theory While application is running, we create new Activities and close old ones, hide the application and open it again and so on, and Activity can process all these events. It is
More informationIntents. Your first app assignment
Intents Your first app assignment We will make this. Decidedly lackluster. Java Code Java Code XML XML Preview XML Java Code Java Code XML Buttons that work
More informationANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I)
ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I) Lecture 3: Android Life Cycle and Permission Android Lifecycle An activity begins its lifecycle when entering the oncreate() state If not
More informationAndroid Apps Development for Mobile and Tablet Device (Level I) Lesson 4. Workshop
Workshop 1. Create an Option Menu, and convert it into Action Bar (Page 1 8) Create an simple Option Menu Convert Option Menu into Action Bar Create Event Listener for Menu and Action Bar Add System Icon
More informationPENGEMBANGAN APLIKASI PERANGKAT BERGERAK (MOBILE)
PENGEMBANGAN APLIKASI PERANGKAT BERGERAK (MOBILE) Network Connection Web Service K Candra Brata andra.course@gmail.com Mobille App Lab 2015-2016 Network Connection http://developer.android.com/training/basics/network-ops/connecting.html
More informationAccelerating Information Technology Innovation
Accelerating Information Technology Innovation http://aiti.mit.edu India Summer 2012 Review Session Android and Web Working with Views Working with Views Create a new Android project. The app name should
More informationDistributed Systems 2011 Assignment 1
Distributed Systems 2011 Assignment 1 Gábor Sörös gabor.soros@inf.ethz.ch The Exercise Objectives Get familiar with Android programming Emulator, debugging, deployment Learn to use UI elements and to design
More informationMobile Application Development
Mobile Application Development donation-web api { method: 'GET', path: '/api/candidates', config: CandidatesApi.find, { method: 'GET', path: '/api/candidates/{id', config: CandidatesApi.findOne, { method:
More informationDistributed Systems Assignment 1
Distributed Systems Assignment 1 marian.george@inf.ethz.ch Distributed Systems Assignment 1 1 The Exercise Objectives Get familiar with Android programming Emulator, debugging, deployment Learn to use
More informationmicro:bit Lesson 1. Using the Built-in Sensors
micro:bit Lesson 1. Using the Built-in Sensors Created by Simon Monk Last updated on 2018-03-02 05:46:13 PM UTC Guide Contents Guide Contents Overview Magnetometer Magnet Detector High-strength 'rare earth'
More informationProject Report Group 4
Project Report Group 4 Feng Chang Shufan Huang Xiangyu Lin Qingshan Yao May 18, 2017 1 Introduction This semester, our group successfully finished making an app named Gravity Snake, which is a combination
More informationAndroid App Development. Mr. Michaud ICE Programs Georgia Institute of Technology
Android App Development Mr. Michaud ICE Programs Georgia Institute of Technology Android Operating System Created by Android, Inc. Bought by Google in 2005. First Android Device released in 2008 Based
More informationVoice Control SDK. Vuzix M100 Developer SDK. Developer Documentation. Ron DiNapoli Vuzix Corporation Created: July 22, 2015 Last Update: July 22, 2015
Voice Control SDK Vuzix M100 Developer SDK Ron DiNapoli Vuzix Corporation Created: July 22, 2015 Last Update: July 22, 2015 Developer Documentation Introduction The Vuzix Voice Control SDK allows you to
More informationFragments. Lecture 11
Fragments Lecture 11 Situational layouts Your app can use different layouts in different situations Different device type (tablet vs. phone vs. watch) Different screen size Different orientation (portrait
More informationBasic GUI elements - exercises
Basic GUI elements - exercises https://developer.android.com/studio/index.html LIVE DEMO Please create a simple application, which will be used to calculate the area of basic geometric figures. To add
More informationEMBEDDED SYSTEMS PROGRAMMING Android Services
EMBEDDED SYSTEMS PROGRAMMING 2016-17 Android Services APP COMPONENTS Activity: a single screen with a user interface Broadcast receiver: responds to system-wide broadcast events. No user interface Service:
More informationWindows Phone Week5 Tuesday -
Windows Phone 8.1 - Week5 Tuesday - Smart Embedded System Lab Kookmin University 1 Objectives and what to study Training 1: To Get Accelerometer Sensor Value Training 2: To Get Compass Sensor Value To
More informationGame Application Using Orientation Sensor
IOSR Journal of Engineering (IOSRJEN) ISSN (e): 2250-3021, ISSN (p): 2278-8719 Vol. 04, Issue 01 (January. 2014), V4 PP 46-50 www.iosrjen.org Game Application Using Orientation Sensor Soon-kak Kwon, Won-serk
More information05. RecyclerView and Styles
05. RecyclerView and Styles 08.03.2018 1 Agenda Intents Creating Lists with RecyclerView Creating Cards with CardView Application Bar Menu Styles and Themes 2 Intents 3 What is Intent? An Intent is an
More informationStarting Another Activity Preferences
Starting Another Activity Preferences Android Application Development Training Xorsat Pvt. Ltd www.xorsat.net fb.com/xorsat.education Outline Starting Another Activity Respond to the Button Create the
More informationMobile App Design Project Doodle App. Description:
Mobile App Design Project Doodle App Description: This App takes user touch input and allows the user to draw colored lines on the screen with touch gestures. There will be a menu to allow the user to
More informationINTRODUCTION TO ANDROID
INTRODUCTION TO ANDROID 1 Niv Voskoboynik Ben-Gurion University Electrical and Computer Engineering Advanced computer lab 2015 2 Contents Introduction Prior learning Download and install Thread Android
More informationFragments were added to the Android API in Honeycomb, API 11. The primary classes related to fragments are: android.app.fragment
FRAGMENTS Fragments An activity is a container for views When you have a larger screen device than a phone like a tablet it can look too simple to use phone interface here. Fragments Mini-activities, each
More informationSoftware Engineering Large Practical: Preferences, storage, and testing
Software Engineering Large Practical: Preferences, storage, and testing Stephen Gilmore (Stephen.Gilmore@ed.ac.uk) School of Informatics November 9, 2016 Contents A simple counter activity Preferences
More informationMVC Apps Basic Widget Lifecycle Logging Debugging Dialogs
Overview MVC Apps Basic Widget Lifecycle Logging Debugging Dialogs Lecture: MVC Model View Controller What is an App? Android Activity Lifecycle Android Debugging Fixing Rotations & Landscape Layouts Localization
More informationMobile Programming Practice Background processing AsynTask Service Broadcast receiver Lab #5
1 Mobile Programming Practice Background processing AsynTask Service Broadcast receiver Lab #5 Prof. Hwansoo Han T.A. Sung-in Hong T.A. Minseop Jeong 2 Background processing Every Android app has a main
More informationKotlin for Android developers
ROME - APRIL 13/14 2018 Kotlin for Android developers Victor Kropp, JetBrains @kropp Kotlin on JVM + Android JS In development: Kotlin/Native ios/macos/windows/linux Links Kotlin https://kotlinlang.org
More informationSphero Lightning Lab Cheat Sheet
Actions Tool Description Variables Ranges Roll Combines heading, speed and time variables to make the robot roll. Duration Speed Heading (0 to 999999 seconds) (degrees 0-359) Set Speed Sets the speed of
More informationMobile Image Processing
Mobile Image Processing Part 1: Introduction to mobile image processing on Android" Part 2: Real-time augmentation of viewfinder frames" Part 3: Utilizing optimized functions in the OpenCV library" Digital
More informationUSER MANUAL. Sens it SENS IT 2.1
USER MANUAL www.sensit.io Sens it SENS IT 2.1 SUMMARY SAFETY INSTRUCTIONS 4 I. CONTENT OF THE PACK 4 II. PRESENTATION 5 III. HOW TO START 8 IV. TECHNICAL SPECIFICATIONS 9 V. WARNING STATEMENTS 10 VI. CREDITS
More informationBuilding MyFirstApp Android Application Step by Step. Sang Shin Learn with Passion!
Building MyFirstApp Android Application Step by Step. Sang Shin www.javapassion.com Learn with Passion! 1 Disclaimer Portions of this presentation are modifications based on work created and shared by
More informationAN INTEGRATED APPROACH FOR AUTHENTICATION AND ACCESS CONTROL WITH SMARTPHONES. Nitish Bhatia
AN INTEGRATED APPROACH FOR AUTHENTICATION AND ACCESS CONTROL WITH SMARTPHONES by Nitish Bhatia Submitted in partial fulfilment of the requirements for the degree of Master of Computer Science at Dalhousie
More informationUpcoming Assignments Quiz today Web Ad due Monday, February 22 Lab 5 due Wednesday, February 24 Alpha Version due Friday, February 26
Upcoming Assignments Quiz today Web Ad due Monday, February 22 Lab 5 due Wednesday, February 24 Alpha Version due Friday, February 26 To be reviewed by a few class members Usability study by CPE 484 students
More informationJava Basics A Simple Hit the Zombies Game
Lecture #3 Introduction Java Basics A Simple Hit the Zombies Game The previous lecture provided a guided tour to explore the basics of Android Studio and how to use it to create a project to build an Android
More informationIntents. 18 December 2018 Lecture Dec 2018 SE 435: Development in the Android Environment 1
Intents 18 December 2018 Lecture 4 18 Dec 2018 SE 435: Development in the Android Environment 1 Topics for Today Building an Intent Explicit Implicit Other features: Data Result Sources: developer.android.com
More informationFACULTY OF SCIENCE AND TECHNOLOGY
FACULTY OF SCIENCE AND TECHNOLOGY MASTER'S THESIS Study program/specialization: Master in Computer Science Spring semester, 2017 Open Author: Jhon Jairo Gutierrez Lautero (signature author) Instructor:
More informationComputer Science E-76 Building Mobile Applications
Computer Science E-76 Building Mobile Applications Lecture 3: [Android] The SDK, Activities, and Views February 13, 2012 Dan Armendariz danallan@mit.edu 1 http://developer.android.com Android SDK and NDK
More informationOverview of Activities
d.schmidt@vanderbilt.edu www.dre.vanderbilt.edu/~schmidt Institute for Software Integrated Systems Vanderbilt University Nashville, Tennessee, USA CS 282 Principles of Operating Systems II Systems Programming
More informationMAD ASSIGNMENT NO 2. Submitted by: Rehan Asghar BSSE AUGUST 25, SUBMITTED TO: SIR WAQAS ASGHAR Superior CS&IT Dept.
MAD ASSIGNMENT NO 2 Submitted by: Rehan Asghar BSSE 7 15126 AUGUST 25, 2017 SUBMITTED TO: SIR WAQAS ASGHAR Superior CS&IT Dept. Android Widgets There are given a lot of android widgets with simplified
More informationAndroid Activities. Akhilesh Tyagi
Android Activities Akhilesh Tyagi Apps, memory, and storage storage: Your device has apps and files installed andstoredonitsinternaldisk,sdcard,etc. Settings Storage memory: Some subset of apps might be
More informationReview Cellular Automata The Game of Life. 2D arrays, 3D arrays. Review Array Problems Challenge
Review Cellular Automata The Game of Life 2D arrays, 3D arrays Review Array Problems Challenge example1.pde Up until now All movement and sizing of graphical objects have been accomplished by modifying
More informationLifecycle Callbacks and Intents
SE 435: Development in the Android Environment Recitations 2 3 Semester 1 5779 4 Dec - 11 Dec 2018 Lifecycle Callbacks and Intents In this recitation we ll prepare a mockup tool which demonstrates the
More informationWorkshop. 1. Create a simple Intent (Page 1 2) Launch a Camera for Photo Taking
Workshop 1. Create a simple Intent (Page 1 2) Launch a Camera for Photo Taking 2. Create Intent with Parsing Data (Page 3 8) Making Phone Call and Dial Access Web Content Playing YouTube Video 3. Create
More informationRonin Release Notes. What s New?
Date : 2017.07.12 IMU Firmware : V 3.1 GCU Firmware : V 1.4 DJI Assistant App ios : V 1.1.28 PC Assistant V 2.5 MAC Assistant V 2.5 User Manual V 2.0 GCU firmware v1.4, PC/Mac Assistant v2.5. Added support
More information