app development on android. contents introduction of mobile app and android key concepts in...

31
App Development on Android

Upload: arnold-robertson

Post on 18-Dec-2015

228 views

Category:

Documents


0 download

TRANSCRIPT

App Development on Android

ContentsIntroduction of Mobile App and AndroidKey Concepts in AndroidDesigning the User InterfaceGraphicMultimediaStoring Local Data

Introduction of Mobile AppMobile App and Computer Application

Introduction of Mobile AppUser Interface (UI)

Introduction of Mobile AppUser Friendly (UE)

Introduction of AndroidAndroid and JAVA

Introduction of AndroidAndroid Software Development Kit

Introduction of AndroidAndroid Virtual Device

Android

Each layer uses the services provided by the layers below it.

Linux Kernel

Transparent to users Android programs can not make Linux calls directly.

I. Memory managementII. NetworkingIII. Other operating system service

Native Libraries Surface Manager: It is a compositing widow manager similar to Vista or Compiz.

I. Drawing commands go into off-screen bitmaps,

II. Combine bitmaps to form the display the user sees.

Native Libraries 2D and 3D Graphics 2- and 3-Dimensional elements can be combined in a single user interface with Android. The library will use 3D hardware if the device has it or a fast software renderer if it doesn’t.

Native Libraries Media CodecsAndroid can play video, record and play back audio in a variety of formats.AAC, AVC (H.264), H.263, MP3 and MPEG-4.

Native Libraries SQL databaseA lightweight data engine.Use SQLite for persistent storage in applications.

Application Framework Application Framework layer provides the high-level building blocks used to create applications. It comes preinstalled with Android, but can be extended with own components as needed.We will discuss the most important parts of the framework.

Application FrameworkActivity ManagerControl the life cycle of applications, Maintain a common “backstack” for user navigation.

Application FrameworkContent ProvidersEncapsulate data that needs to be shared between applications.

Resource ManagerResources are anything that goes with programs that is not code.

Application FrameworkLocation ManagerTrack and record the location information of phone.

Notification ManagerPresent events such as arriving messages, appointments, proximity alerts and alien invasions.

Building BlocksActivitiesAn activity is a user interface screen. Applications can define one or more activities to handle different phases of the program.

Building BlocksIntentsAn intent is a mechanism for describing a specific action, such as “pick a photo,” “phone home,” or “open the pod bay doors.” In Android, just about everything goes through intents.

Building BlocksServicesA service is a task that runs in the background without the user’s direct interaction.For example, the music may be started by an activity, but you want it to keep playing even when the user has moved on to a different program.

Building BlocksContent ProvidersA content provider is a set of data wrapped up in a custom API to read and write it. This is the best way to share global data between applications.For example, For example, Google provides a content provider for contacts. All the information in contacts can be shared by any application that wants to use it.

ResourcesResources are the additional files and static content that your code uses, such as bitmaps, layout definitions, user interface strings, animation instructions, and more.

ResourcesAnimationColorDrawableLayoutMenuValuesAsset

LayoutLinear Layout

The Linear Layout arranges its children in a single column or a single row.

Horizontal Vertical

LayoutRelative Layout

The Relative Layout is a Layout where the positions of the children can be described in relation to each other or to the parent.

LayoutRelative Layout

The Relative Layout is a Layout where the positions of the children can be described in relation to each other or to the parent.

GraphicsColorAlpha, Red, Green, Blue (ARGB).Each of them have 256 possible values.Alpha is a measure of transparency. 0 means completely transparent, whatever RGB are. 255 means completely opaque.For example, (127, 255, 0, 255).

Animation

10 pixels1 second

Repeat 7 times

Shake Res/anim/shake.xml

Res/anim/cycle_7.xml

Multimedia We can play almost all kinds of multimedia resources in our Android app.

Storing Local DataFile system in Android Context classI. deleteFile()II. fileList(III. openFileInput()IV. openFileOutput()

http://www.pace.edu/seidenberg/mobile-app-development-bowl-2015-challenge/technical-resources-support