KEMBAR78
Android Beginner Lecture-2 | PDF | Application Software | Android (Operating System)
0% found this document useful (0 votes)
85 views31 pages

Android Beginner Lecture-2

The document outlines an Android course lecture that discusses Android API levels and versions, introduces the Google App Inventor tool for building Android apps visually without coding, and demonstrates basic app examples and concepts like components, properties, events, functions, and animation. It provides an agenda and overview of topics covered in the lecture including a history of Android releases, a tutorial on creating a simple app using App Inventor, and conceptual explanations of what an app consists of and how it works.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views31 pages

Android Beginner Lecture-2

The document outlines an Android course lecture that discusses Android API levels and versions, introduces the Google App Inventor tool for building Android apps visually without coding, and demonstrates basic app examples and concepts like components, properties, events, functions, and animation. It provides an agenda and overview of topics covered in the lecture including a history of Android releases, a tutorial on creating a simple app using App Inventor, and conceptual explanations of what an app consists of and how it works.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

Android Course Lecture-2

CSDAN0101
Ramakrishna Reddy K Graduate Student ME Computer Science

Agenda
About your Instructor Android API level or Platform versions. Introduction to Google App inventor Tool
Introduction Building and Deploying an App with App Inventor An App Is... Components, Properties, Events, and Functions Animation

Basic Applications Demo


2

Think about it
"The BBC reports on an article in Science about scientists who calculate that the sum of all the world's stored data is 250 exabytes. Perhaps more interestingly, the total amount of data broadcast is 2 zetabytes (1000 exabytes) annually. In theory this means that the sum of the world's knowledge is broadcast 8 times a year, but I bet mostly thats just a lot of American Idol reruns.

Source: http://hardware.slashdot.org/

Android API level(versions)


Android has seen a number of updates since its original release. These updates to the base O.S. typically fix bugs and new features. Android 1.0Released 23 September 2008(API level-1)

Android 1.1 Released 9 February 2009(API level-2)


4

Android 1.5 (cupcake) API level-3


Based on Linux kernel 2.6.27

New features and UI updates included. Ability to record and watch videos through camcoder mode. A new soft-keyboard with text prediction Bluetooth A2DP and AVRCP support New widgets and folders that can populate the home screens. Animated screen transitions.
5

Android 1.6 (Donut) API level-4


Based on Linux kernel 2.6.29 An improved Android market experience Updated voice search , with faster response and deeper integration with native applications.

Updated search experience. Support for CDMA,802.11,VPNs,Text-to-Speech Engine. Gesture framework(Builder Development tool)
6

Android 2.0/2.1 (Eclair)


Optimized hardware speed.

New Browser UI and HTML5 support Improved Google maps 3.1.2


MS Exchange support Digital zoom Multi-touch events. Bluetooth 2.1 Improved virtual keyboard
7

Android 2.2 (Froyo)


Based on Linux Kernel 2.6.32

Speed , memory and performance optimizations Integration of chrome V8 JavaScript Engine. USB tethering and WIFI hotspot functionality Voice dialing and contact sharing over Bluetooth Adobe Flash 10.1 support Support foe extra high DPI screens(320 dpi).
8

Android 2.3 (Gingerbread)


Based on Linux Kernel 2.6.35.7 Support for extra large screen sizes and resolutions Native support for SIP VOIP telephony Support for NFC(Near Field Communication) System wide copy-paste functionality Redesigned multi-touch software keyboard Concurrent Garbage Collection. Improved power management Download manager for long running downloads. Native support for multiple Cameras. Switch from YAFFS to the ext4 Filesystem.

Android 3.0 (HoneyComb)


New UI designed from the ground up for tablets

New connectivity options (USB-connected camera or desktop computer) Redesigned keyboard


High-performance 2D and 3D graphics
New animation framework Hardware-accelerated 2D graphics Renderscript 3D graphics engine

Support for multicore processor architectures


Enhancements for enterprise Rich multimedia and connectivity
HTTP Live streaming Digital media file transfer
10

Next Releases
Ice-cream sandwich, a possible release in midNovember 2011

11

App Inventor
Motivation: Programming is like magic to most people, and only a small percentage of humans ever try it. The web started out as read-only It has now become a read-write web Just as there is a digital divide, there is also a programmer divide that limits people's control over the devices they use. Can this divide be breached? Can ordinary people be taught to program their computers and their phones? Google is very interested in this question designed a new visual programming language, App Inventor
12

App Inventor
Google's vision: Make mobile application development accessible to anyone. Enhance introductory learning experiences in computing through the vehicle of Androids open platform. Encourage a community of faculty and students to share material and ideas for teaching and exploring.
13

App Inventor
App Inventor lets you develop applications for Android phones using a web browser and either a connected phone or emulator. The App Inventor servers store your work and help you keep track of your projects. The App Inventor Designer, where you select the components for your app. The App Inventor Blocks Editor, where you assemble program blocks that specify how the components should behave. You assemble programs visually, fitting pieces together like pieces of a puzzle.
14

Getting Started: Downloading Some Apps


The Market: The Android Market has thousands of apps, many of which are free to download. Barcode Scanner This is required because when you build an app, App Inventor creates a barcode for the app.

15

Building and Deploying an App with App Inventor

Programming in App Inventor is a two-step process: you first design the user interface for the app-how it will look. Then you design how the application will behave. These two tasks are performed in separate windows.
The first window is the Component Designer. The second window is the Blocks Editor.

16

Building the User Interface

To build the application, first open the component designer.

17

Programming the App's Behavior

Click on the Open Blocks Editor button in the Designer menu to begin programming the behavior of the application. The Blocks Editor provides you with two palettes from which you can drag blocks, the Built-in pallete and the My Blocks palette.
18

An App Is...(This section is conceptual:)


A App is a Recipe
The simplest computer programs are like recipes: the app specifies the computer instructions that should be performed: do A then B then C:

19

An App Is...
An App is a Set of Event-Handlers
Mobile and web apps don't really fit the recipe paradigm, as they have graphical user interfaces (GUIs) with which the user interacts.

20

An App Is...
An App Consists of Event-Handlers That Can Ask Questions and Branch Many responses to events are not linear recipes, but contain branches and loops. The app is allowed to ask questions -- to query the data within it-and determine its course based on the answers. We say that such apps have conditional branches:

21

An App Is...
An App Consists of Event-Handlers That Can Ask Questions, Branch, and Repeat Besides asking questions and branching based on the answer, you can also branch up in a app so as to repeat some operations multiple times. Such an up-branch is called a loop and can be characterized with the following diagram:

22

An App Is...
An App Consists of Event-Handlers That Can Ask Questions, Branch, Repeat, and Talk to Web Services Some apps use only the information within the device they are running on, whether that device be a phone or a computer. But many apps communicate with the outside world by sending requests to web services.

Twitter: Web services like Twitter provide an application programmer interface (API), which is the protocol for how a program communicates with the service.
23

An App Is...
An App Consists of Event-Handlers That Can Ask Questions, Branch, Repeat, Talk to Web Services, and Remember Things When you use apps, you expect them to remember things for you, such as the contacts you enter into your contact manager app. Such memory that lives even after an app is closed is called persistent data and is stored in some type of a database: App Inventor provides persistent memory in two ways. The TinyDB component allows you to store data persistently directly on the phone. The TinyWebDB component allows you to store data on the web, and thus share the data with other phones and apps.

24

Components, Properties, Events, and Functions


Components: The items that appear on the phone when an app is running text, input boxes, list boxes, graphics, drawing canvases, etc.-- are called components There are also non-visible components representing things like motion sensors and the Twitter web service The components that you can add to an App Inventor app are organized into palettes that run along the left side of the designer
25

Components, Properties, Events, and Functions

Properties: All components have a name and properties-- the information that defines the component. A visual component has properties such as width, height, and background image, any text associated with it, and whether it is enabled or not.

26

Components, Properties, Events, and Functions

Events: Besides having properties that define its state, each component also has a set of events that the component can respond to. A component's events only appear in the Behavior editor, at the top of the component's drawer. User actions like a button click are the most common type of event. But there are other types as well:

27

Components, Properties, Events, and Functions

Functions: Besides having properties and events that it responds to, a component also has functions that can be applied to it. All components have functions to change and get the value of each of it's properties.

28

Animation
In this section you'll learn how to write a simple animated game and be introduced to timer events, randomness, and global variables. Animated Objects App Inventor has two types of animated objects:
a Ball and an ImageSprite

Timer Events
Many of the events that occur in a mobile phone app are end-user initiated,e.g. , the user clicks a button. There are other types of events as well, including the Timer event, which is triggered not by the user but by the passing of time.

To add a timer event, you first add a Clock component to the application in the Component Designer One important property of the Clock component is its interval.

29

References

Image courtesy : Google App Inventor sitesite. http://developer.android.com Wikipedia http://googleresearch.blogspot.com/2009/07/app-inventorfor-android.html

30

30

Q&A
Any questions?
www.google.com :P

31

You might also like