1 / 7

CSS290 : Apps on Mobile Devices

In this lecture, we explore important concepts for developing mobile applications, focusing on image handling and text box behavior. Key topics include managing focus events, loading images from resources versus the environment, and utilizing camera or photo chooser tasks. We'll delve into the differences between project images and online resources, as well as demonstrate how to handle user input efficiently with text change events. Additionally, we’ll cover error handling in task management, providing foundational skills for building robust mobile apps.

penha
Télécharger la présentation

CSS290 : Apps on Mobile Devices

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSS290: Apps on Mobile Devices Lecture 4: Tasks + Working with Images

  2. Today: Concepts • Reading: Chapter 4 (Skip XNA Discussions)) • Focus of TextBox • Get/Lose Focus • Images as resource in project • Enter image as a stream from URI • Images in projects vs. images in the environment • Camera and PhotoChooser Tasks • For fun: • Working with Phone Vibrate • Working with images and camera on the phone

  3. TextBox Focus Events • TextChangeEvent • Invoked once per character input • In focus: • What should the behavior be? • Start editing: what is your expectation? (selected text?) • Out of focus: • Have the final input

  4. System Resources • Images of a project vs. Photos on the phone • What is the difference? • How to load either? • The Image GUI element • Capable of displaying an image • The BitmapImage utility • Source from project environment (URI) • URI – Uniform Resource Identifier (a name) • Source from online (if you have wifi, or 3G connection) • Relative vs. Absolute URI

  5. Tasks: Threads?! • Activating a “Task” from our App • The Camera Task and PhotoChooserTask • Function calls that may fail! • Try/Catch

  6. Exercise • Add touch volume control to our simple audio playback App • Due beginning of next class

  7. References • More on Tasks (with return value) and Launchers (start an App): • http://msdn.microsoft.com/en-us/library/ff428753%28v=VS.92%29.aspx

More Related