Professional Documents
Culture Documents
CSDAN0101
Ramakrishna Reddy K Graduate Student ME Computer Science
Agenda
App Inventor Tool
Animation Conditional Blocks Lists Iteration Web services , APIs and Mashing Data Persistent Data
Think about it !!
Witricity: (Marin Soljacic)
Wireless electricity
Source: http://www.witricity.com/
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 To add a timer event, you first add a Clock component to the application in the Component Designer. Moving an Object Periodically
Animation
Ball/Image Sprite Events
Animation
Reacting to Touch and the Ball Reaching an Edge
Variables
Animation
Randomness
Conditional blocks
This chapter discusses apps that branch to execute different functions based on some condition.
If and Ifelse Blocks
Conditional blocks
Sample: Calling a random friend from a set of friends.
Conditional Blocks
Sample: Mastermind
10
Lists
This chapter describes how to work with lists of data in an App Inventor application. A list is a variable, but instead of representing a single memory cell, it represents an array of cells: E.g. : PhoneNumberList |3219872 |4153297878 |4592371| Making a List
Selecting an Item
11
Lists
Text Random Using a List
12
Lists
13
Lists
14
Lists
Iterating Through a List: For Each
15
Iteration
Computing the Sum of the First Three Numbers
16
Iteration
17
19
20
21
Persistent Data
Most interesting apps keep track of data over time, usually in some type of database. App Inventor provides two components, TinyDB and TinyWebDB, which allow your app to put things in a database and retrieve them later. Persistent data is information stored in a database or a file. It is persistent in that even when the user closes the app, the data lives on.
22
Persistent Data
TinyWebDB: App Inventor provides a component, tinywebdb, which allows for apps to store and retrieve data from a database. The component can store data on any web service that follows a particular protocol.
23
Persistent Data
24
25
Limitations: Limited UIs. Limited Access to the device Limited Access to Web Limited access to the Android Market
26
References
27
27