Mobile Programming Dr. Mohsin Ali Memon.

Slides:



Advertisements
Similar presentations
Samsung Smart TV is a web-based application running on an application engine installed on digital TVs connected to the Internet.
Advertisements

Introduction to XNA on Windows Phone 7 SILVERLIGHTSHOW.NET Webinar Peter Kuhn, June 30 th, 2011.
Graphics with Canvas, SurfaceView, and multitouch processing (panning and multitouch zoom) GraphicsWithCanvas_2012.pptx.
ANDROID – GESTURES L. Grewe. What and why  a great way to interact with applications on mobile devices.  With a touch screen, users can easily tap,
Touch & Gestures.  MotionEvents  Touch Handling  Gestures.
SET UP COMPUTER ** PLEASE BE AWARE SCREENSHOTS MAY NOT MATCH **
SCERSIG: Creating Android Apps with App Inventor 26 October 2011 Ric Paul, Health Services Library, Southampton.
Android Application Development 2013 PClassic Chris Murphy 1.
CS378 - Mobile Computing What's Next?. Fragments Added in Android 3.0, a release aimed at tablets A fragment is a portion of the UI in an Activity multiple.
© by Pearson Education, Inc. All Rights Reserved. 1 Introduction to Android From “Android: How to Program” By Paul Deitel and Harvey Deitel.
Three-tier Mobile Application Testing Framework:
6-2 2D Graphics CSNB544 Mobile Application Development Thanks to Utexas Austin.
Introduction to Mobile Programming. Slide 2 Overview Fundamentally, it all works the same way You get the SDK for the device (Droid, Windows, Apple) You.
WiZiQ Tutorial for the Teacher During the class. After you launch the class, you will enter our virtual classroom.
Doodlz App Android How to Program © by Pearson Education, Inc. All Rights Reserved.
DUE Hello World on the Android Platform.
© by Pearson Education, Inc. All Rights Reserved. 1 Introduction to Android From “Android: How to Program” By Paul Deitel and Harvey Deitel.
CS378 - Mobile Computing More UI - Part 2. Special Menus Two special application menus – options menu – context menu Options menu replaced by action bar.
SpotOn Game App Android How to Program © by Pearson Education, Inc. All Rights Reserved.
Creating “Apps” with your students. iPod/iPhone Pro Very clean interface Touch implementation fairly easy to implement Recognized Con Cost  Hardware.
CS378 - Mobile Computing Sensing and Sensors Part 2.
Mobile Programming Lecture 12 HierarchyViewer, Linkify, Gestures, and Version Control.
FCM Workflow using GCM.
HW#9 Clues CSCI 571 Fall, HW#9 Prototype
Internet Explorer 10 IE9 hardware-accelerated platform CSS 2D Transforms CSS Backgrounds & Borders CSS Color CSS Fonts CSS Media Queries CSS Namespaces.
CS378 - Mobile Computing More UI - Part 2. Special Menus Two special application menus – options menu – context menu Options menu replaced by action bar.
CS378 - Mobile Computing Sensing and Sensors Part 2.
Chapter 7 Touch Gestures. Figure 07.01: Common touch gestures for Android devices.
| Mobile Accessibility Development Making an Accessible App Usable Scott McCormack.
Accelerometer based motion gestures for mobile devices Presented by – Neel Parikh Advisor Committee members Dr. Chris Pollett Dr. Robert Chun Dr. Mark.
CHAPTER 7 TouchGestures. Chapter objectives: To code the detection of and response to touch gestures. Patterns of common touches to create touch gestures.
School of Engineering and Information and Communication Technology KIT305/KIT607 Mobile Application Development Android OS –Permissions (cont.), Fragments,
Java for android Development Nasrullah Khan. Using instanceof in Android Development the classes such as Button, TextView, and CheckBox, which represent.
User Interaction Radan Ganchev Astea Solutions. Content Basic input events Gestures Drag and drop Sensors.
The Doodlz app enables you to paint by dragging one or more fingers across the screen. The app provides options for setting the drawing color.
Building UI Components Димитър Н. Димитров Astea Solutions AD.
PRIMARY SESSIONS Developing Mobile Apps: Session 1.
CS371m - Mobile Computing Gestures. Common Gestures 2.
Cosc 4735 Nougat API 24+ additions.
Mobile Applications (Android Programming)
Downloading and Installing
Android Application 2D Graphics cs.
TUTORIAL ON MULTITOUCH AND SWIPE GESTURES
AnDroid GoogleMaps API
Mobile Navigation Control for Planetary Web Portals Team Members: John Calilung, Miguel Martinez, Frank Navarrete, Kevin Parton, Max Ru, Catherine Suh.
Messaging Unit-4.
Technologies Overview Media files, such as the sounds, are placed in the app’s resource folder res/raw. When an Activity is shut down, its Fragment.
Development-Introduction
Creation of an Android App By Keith Lynn
Mobile Application Development Chapter 4 [Android Navigation and Interface Design] IT448-Fall 2017 IT448- Fall2017.
Sensors, maps and fragments:
Mobile Computing With Android ACST 4550 Android Logs and Gestures
MonoGame and Windows 8.
Android Studio Hello World
Download OriginMobile
Find your friend – An Android application
Cannon Game App Android How to Program
CSC 581: Mobile App Development
CS371m - Mobile Computing Gestures.
Android Developer Fundamentals V2
Chapter 7: Touches and Swipes
Android Developer Fundamentals V2
Interactive Graphics in Android
Mobile Programming Gestures in Android.
Mobile Programming Dr. Mohsin Ali Memon.
Apple Xcode with Swift Demo
Cosc 4730 An Introduction.
Mobile Programming Dr. Mohsin Ali Memon.
Mobile Programmming Dr. Mohsin Ali Memon.
Presentation transcript:

Mobile Programming Dr. Mohsin Ali Memon

Gestures

Common Gestures

Common Gestures http://developer.android.com/design/patterns/gestures.html

Common Gestures Fling or flick gesture: similar to swipe or drag scroll/swipe/drag user presses then moves finger in a steady motion before lifting finger fling or flick user presses then moves finger in an accelerating motion before lifting

Handling Common Gestures Use the GestureDetector class Add a GestureDetector object to View override View.onTouchEvent method to pass MotionEvent on to the GestureDetector.onTouchEvent method

Handling Common Gestures create a GestureDetector.OnGestureListener (several gestures) or a GestureDetector.SimpleOnGestureListener (more gestures) and register it with the GestureDetector callback methods for onLongPress, onScroll, onFling, onSingleTapConfirmed, others

Simple Gesture Demo App that listens for simple gestures update lower TextView in call back methods

Gesture Demo

Gesture Demo Here, simply pass event on to the GestureDetectorCompat object it will call back methods

Callback Methods for OnGestureListener

Callback Methods for OnGestureListener

Callback Methods for DoubleTapListener

Multi Touch Gestures Multiple fingers (pointers) touch screen at same time Handled via MotionEvents each pointer (finger) has a MotionEvent track via index (in array of MotionEvents) or ID MotionEvent object sent to onTouch contains number of "pointers" involved

Displaying Multitouch data static methods from MotionEventCompat class Min sdk 19

Scale Gestures ScaleGestureDetector class from Api level 8 (API 2.2) pinch to zoom in our out out -> scale up in -> scale down

Scale Gestures Create class that implements ScaleGestureDetector.OnScaleGestureL istener OR create class that extends ScaleGestureDetector.SimpleOnScaleGesture Listener Implement methods from OnScaleGestureListener with dummy methods override only the methods you care about

Scaling Example listener updates overall scale factor shows current scale factor in TextView

Scale Example

Drag Gestures Similar to handling Scale gestures Implement View.OnDragListener one method, onDrag(View v, DragEvent de) Drag event phases: start continuing dropped ended

Complex Gestures Non standard gestures require lots of code to recognize Android 1.6 introduced new APIs to store, load, draw, and recognize gestures Gesture Builder app on emulator emulator must include virtual SD card allows creating set of gestures for your application limited success with jelly bean emulators

GestureBuilder on Devices GestureBuilder app included on emulators Possible to put on a real device Create project from sample

Select Build Target Gesture Builder in SDK examples for multiple API levels

Finish Project Create After project created, install on real device

Complex Gestures Each gesture associated with name Limited to single pointer multiple gestures can have same name variations on same gesture, better chance of recognizing Move gestures from emulator to application res/raw folder

Gesture Data File DDMS file explorer

Complex Gestures Recognizing gestures via a GestureOverlayView simple drawing board on top of view that shows and records user gestures When gesture complete GestureLibrary queried to see if gesture is recognized Predictions between entered gesture and those in the library

Animal Sounds App

Predictions

onCreate

Listener