Understanding Mobile App Development Concepts and Working with APIs Lesson 6.

Slides:



Advertisements
Similar presentations
WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
Advertisements

Bring Life to Your Web Pages with JavaScript and HTML5 Part 2 Ole Ildsgaard Hougaard -
Using Multimedia on the Web Enhancing a Web Site with Sound, Video, and Applets.
Microsoft Office 2010 Office 2010 and Windows 7: Essential Concepts and Skills Mark Worden Instructor Use your spacebar or down arrow key to advance slides.
Basic iPad Use How to help your students use their iPad in your class!
Chapter 3 Reusing a Presentation and Adding Media and Animation
Microsoft Office Illustrated Fundamentals Unit N: Polishing and Running a Presentation.
The Web Warrior Guide to Web Design Technologies
Chapter 16 Dynamic HTML and Animation The Web Warrior Guide to Web Design Technologies.
Macromedia Dreamweaver 4 Advanced Level Course. Add Rollovers Rollovers or mouseovers are possibly the most popular effects used in designing Web pages.
JavaScript 101 Lesson 5: Introduction to Events. Lesson Topics Event driven programming Events and event handlers The onClick event handler for hyperlinks.
Microsoft Office Illustrated Inserting Illustrations, Objects, and Media Clips.
Chapter 9 Introduction to the Document Object Model (DOM) JavaScript, Third Edition.
Charles Petzold Navigation.
 jQuery Mobile An Introduction. What is jQuery Mobile  A framework built on top of jQuery, used for creating mobile web applications  Designed to make.
Microsoft Office 2010 Office 2010 and Windows 7: Essential Concepts and Skills.
Chapter 9 Introduction to ActionScript 3.0. Chapter 9 Lessons 1.Understand ActionScript Work with instances of movie clip symbols 3.Use code snippets.
Chapter 11 Adding Media and Interactivity. Flash is a software program that allows you to create low-bandwidth, high-quality animations and interactive.
4.5 Multimedia Production. Learning Outcome 1. Design the structure and user interface for a multimedia project. 2. Produce a successful multimedia project.
E0262 – MIS – Multimedia Storage Techniques SMIL – Synchronized Multimedia Integration Language.
Win8 on Intel Programming Course Modern UI : Features Cédric Andreolli Intel Software.
Building the User Interface by Using HTML5: Organization, Input, and Validation Lesson 3.
Chapter 6: Forms JavaScript - Introductory. Previewing the Product Registration Form.
© Cheltenham Computer Training 2001 Macromedia Dreamweaver 4 - Slide No 1 Macromedia Dreamweaver 4 Advanced Level Course.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
Office 2013 and Windows 8: Essential Concepts and Skills
Building the User Interface by Using HTML5: Text, Graphics, and Media Lesson 2.
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.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 4 1 Microsoft Office FrontPage 2003 Tutorial 4 – Using Shared Borders and Themes.
Advanced Level Course. Site Extras Site Extras consist of four categories: Stationeries Site Trash Designs Components.
An Introduction to Silverlight Matt Harrington Developer Evangelist, Microsoft October 20, 2011.
Office 2013 and Windows 8: Essential Concepts and Skills Microsoft Access 2013.
Developing the Game User Interface (UI) Lesson 5.
Chapter 10 Fireworks: Part II The Web Warrior Guide to Web Design Technologies.
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
JavaScript, Fourth Edition
Adobe Flash CS3 Revealed Chapter 1 - GETTING STARTED WITH FLASH.
MULTIMEDIA DEFINITION OF MULTIMEDIA
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Week 11 Creating Framed Layouts Objectives Understand the benefits and drawbacks of frames Understand and use frame syntax Customize frame characteristics.
COMPUTER SOFTWARE FORM 1. Learning Area Introduction to computer software Operating System (OS) Application Software Word Processing Software Presentation.
Introduction to HTML. _______________________________________________________________________________________________________________ 2 Outline Key issues.
1 CSC317/318 INTERNET PROGRAMING / DYNAMIC WEB APPLICATION DEVELOPMENT Siti Nurbaya Ismail Faculty of Computer Science & Mathematics, Universiti Teknologi.
Building Windows Phone Applications with Silverlight Jaime Rodriguez
Managing the Application Life Cycle
Tutorial 7 Creating Animations. XP Objectives Learn about animation Create a timeline Add AP divs and graphics to a timeline Move and resize animation.
Creating Animations, Working with Graphics, and Accessing Data Lesson 9.
Chapter 11 Adding Media and Interactivity. Chapter 11 Lessons Introduction 1.Add and modify Flash objects 2.Add rollover images 3.Add behaviors 4.Add.
Microsoft Office 2008 for Mac – Illustrated Unit D: Getting Started with Safari.
®® Microsoft Windows 7 Windows Tutorial 7 Managing Multimedia Files.
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 5 1 Adding Shared Site Elements.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
Exploring Networked Data and Data Stores Lesson 3.
丁建文 國立高雄應用科大資管系副教授 兼任計網中心軟體發展組組長 跨平台行動應用軟體開發技術 : HTML5 & Mobile JavaScript Framework 暨南大學.
Chapter 10 Using Macros, Controls and Visual Basic for Applications (VBA) with Excel Microsoft Excel 2013.
Understanding Mobile Devices, Interactions, and Tools Lesson 1.
Programering af mobile enheder Windows Phone Uge 9 Part 1.
04 | Code by Using JavaScript Christopher Harrison | Content Developer, Microsoft Rachel Jones| Microsoft Certified Trainer, SourceDev.
Office 2013 and Windows 8: Essential Concepts and Skills Microsoft Office 2013.
Working in a Mobile App Development Environment Lesson 2.
Chapter 10 Creating a Template for an Online Form Microsoft Word 2013.
Office 2016 and Windows 10: Essential Concepts and Skills
Chapter 1: An Introduction to Visual Basic .NET
Chapter 1: An Introduction to Visual Basic 2015
Office 2010 and Windows 7: Essential Concepts and Skills
Windows Phone multitasking
Windows xp PART 1 DR.WAFAA SHRIEF.
Tutorial 6 Creating Dynamic Pages
Review: Applying Computer Basics
Presentation transcript:

Understanding Mobile App Development Concepts and Working with APIs Lesson 6

Exam Objective Matrix Skills/ConceptsMTA Exam Objectives Developing Mobile Applications Manage the application life cycle. (4.1) Understanding Mobile Device APIs Understand mobile device APIs. (4.2)

The General Windows Phone OS 7.01 Application Life Cycle Terminated Launching Tombstoned Closing

Dormant App and Tombstoning Dormant application –Is still in memory but is not executing Tombstoning –Terminates an application but saves its state so it can be activated and resume where it left off

Exploring Windows Phone Applications Life Cycle Events Launching Deactivated Activated Closing

Code Stubs for the Launching, Activated, Deactivated, and Closing events

Page and Application States Page state –Information about a particular page in an application, like data entered into TextBox and TextBlock controls Application state –A set of information about an application –Includes data used by multiple pages in the application, such as Web service data or a user interface theme

Preserving Application State Information and Handling Activate/Deactivate Functions Application state data stored and retrieved through PhoneApplicationService.State property Deactivated event stores data through the property, whereas Activated event retrieves data IsApplicationInstancePreserved property of ActivatedEventArgs indicates whether the application is returning from dormant state or if tombstoned

Preserving Application State Information and Handling Activate/Deactivate Functions Page data is accessed during or after the page’s OnNavigatedTo method has been called and during or before the page’s OnNavigatedFrom method has been called OnNavigatedTo method called when user navigates to a page OnNavigatedFrom method called when user navigates away from a page, and when the application is deactivated

More on Tombstoning Tombstoned application has been deactivated but state information is stored If user navigates back to tombstoned application, it activates IsApplicationInstancePreserved property of ActivatedEventArgs indicates whether application is returning from a dormant state or was tombstoned

More on Tombstoning (continued) IsApplicationInstancePreserved takes on Boolean values –True means app was dormant, false means app was tombstoned Up to five applications can be tombstoned at a time Save data to persistent storage during the Deactivated event

Balancing Code between Battery Usage and Performance Ways to conserve battery: –Background audio –Fast Application Switching –Scheduled tasks

This Solution Includes an Application Project and a Background Agent Project

The CopyToIsolatedStorage Method

The OnPlayStateChanged Method

Providing User Feedback and Visible Status for Applications Provide user-friendly message when handling exceptions Use a progress bar Provide a cancel button Use a splash screen –Must be 480 pixels wide by 800 pixels tall –Must be named SplashScreenImage.jpg

A Progress Bar that Displays Red Dots across the Screen

Adding Text to the Splash Screen

A Custom Splash Screen

Storing Passwords Data Protection API (DPAPI) –Introduced in Windows 7.1 OS –Safely stores passwords, PINs, and other private data on a device –You must encrypt data ProtectedData class and Protect and Unprotect methods encrypt and decrypt data

Working with the NavigationService Class Enables users to navigate two or more pages in an application A frame is a kind of container that contains one or more pages A page is a Silverlight page that contains content –May include links and/or buttons A link or button lets the user move to another page

A Page within a Frame

Adding the NavigationService.Navigate Method

Modifications Made to SecondPage.xaml

Using Mapping and GeoLocation APIs Location API works with hardware and Microsoft Location Service to provide location information to applications Bing Maps Silverlight Control for Windows Phone displays maps in applications based on user input

The Bing Maps Sample MainPage.xaml.cs File

Part of App.xaml.cs for Bing Maps Sample

Understanding Forms in HTML5 Use start and end tags Most forms include the id attribute in the start tag Example:

The Fieldset Element Groups Related Elements in a Form and Adds a Border

Code for Simple Form < div id = "contact-form" style = "font-family:'Arial Narrow','Nimbus Sans L',sansserif;" > Name E mail

A Very Simple Form

The Beginning of a Web Form

A Web Form Using Tags to Align Fields Vertically

A Web form with Placeholders in Fields

Understanding Canvas A new element in HTML5 that creates a container for graphics Uses JavaScript to draw graphics dynamically Developers use canvas to create online games, rotating photo galleries, stock tickers, more

Understanding Canvas Canvas Test function f1() { var canvas = document.getElementById("smlRectangle"); context = canvas.getContext("2d"); context.fillStyle = "rgb(0,0,255)"; context.fillRect(10, 20, 200, 100); }

Web Page with a Canvas Shape

video Element Enables you to incorporate videos in HTML documents using minimal code Markup example:

video Attributes poster : Displays a static image file before the video loads autoplay : Start playing the video automatically upon page load controls : Displays a set of controls for playing, pausing, and stopping the video, and controlling the volume loop : Repeats the video

Video Markup Example

audio Element Enables you to incorporate audio (music, other sounds) in HTML documents using minimal code Markup example:

audio Example

Understanding Manipulation Events Windows Phone devices have four-point multi-touch screen for capturing gestures as input Standard gestures include tap, double tap, drag, flick, and pinch

Understanding Manipulation Events (cont.) System.Windows.Input.Touch.FrameRepo rted event is called when user creates individual touch contact points like tap, double tap, and hold ManipulationStarted, ManipulationDelta, and ManipulationCompleted events control more complicated gestures such as drag, pinch, and flick

Recap The application life cycle Windows Phone events Application state information and handling activate/deactivate functions Tombstoning Balancing code between battery usage and performance Providing user feedback and visible status for applications Storing passwords Mobile device application programming interfaces (APIs) The NavigationService class Mapping and GeoLocation APIs Forms, canvas, and media APIs in HTML5 Manipulation events