1. 2 3 4 5 Editing a Twitter search. Viewing search results in a browser.

Slides:



Advertisements
Similar presentations
Google Android Introduction to Mobile Computing. Android is part of the build a better phone process Open Handset Alliance produces Android Comprises.
Advertisements

CE881: Mobile and Social Application Programming Simon M. Lucas Quiz, Walkthrough, Exercise, Lifecycles, Intents.
Cosc 5/4730 Android: “Dynamic” data.. Saving Dynamic data. While there are a lot of ways to save data – Via the filesystem, database, etc. You can also.
User Training. Step 1 Press Ctrl-I or choose File > Login, this will open the Login window. Figure 1-1 shows the Login window. Figure 1-1 Login Window.
 data/data-storage.html#pref data/data-storage.html#pref 
The Web Warrior Guide to Web Design Technologies
Unlocking Android Chapter 4.  Understanding activities and views  Exploring the Activity lifecycle  Working with resources  Defining the AndroidManifest.xml.
Android 02: Activities David Meredith
 Definition of HTML Definition of HTML  Tags in HTML Tags in HTML  Creation of HTML document Creation of HTML document  Structure of HTML Structure.
CS378 - Mobile Computing Persistence - SQLite. Databases RDBMS – relational data base management system Relational databases introduced by E. F. Codd.
Android Application Development 2013 PClassic Chris Murphy 1.
Data Storage: Part 1 (Preferences)
A First Program Using C#
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
 Understanding an activity  Starting an activity  Passing information between activities  Understanding intents  Understanding the activity lifecycle.
© Keren Kalif Intro to Android Development Written by Keren Kalif, Edited by Liron Blecher Contains slides from Google I/O presentation.
Web Page Design I Retest Terms Review. 1. Web pages are created using a language known as ___________. The coding of this language must follow specific.
Favorite Twitter® Searches App Android How to Program © by Pearson Education, Inc. All Rights Reserved.
Android How to Program Presented by Thomas Bucag, Rob Goodfellowe, Samantha Tomeï © by Pearson Education, Inc. All Rights Reserved.
Tip Calculator App Building an Android App with Java © by Pearson Education, Inc. All Rights Reserved.
London April 2005 London April 2005 Creating Eyeblaster Ads The Rich Media Platform The Rich Media Platform Eyeblaster.
Creating a Web Site to Gather Data and Conduct Research.
Doodlz App Android How to Program © by Pearson Education, Inc. All Rights Reserved.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Typing Application Introducing Keyboard Events, Menus, Dialogs and the Dictionary.
DUE Hello World on the Android Platform.
CS378 - Mobile Computing Persistence. Saving State We have already seen saving app state into a Bundle on orientation changes or when an app is killed.
1 Announcements Homework #2 due Feb 7 at 1:30pm Submit the entire Eclipse project in Blackboard Please fill out the when2meets when your Project Manager.
LiveCycle Data Services Introduction Part 2. Part 2? This is the second in our series on LiveCycle Data Services. If you missed our first presentation,
SpotOn Game App Android How to Program © by Pearson Education, Inc. All Rights Reserved.
CS378 - Mobile Computing Intents. Allow us to use applications and components that are part of Android System – start activities – start services – deliver.
Android Boot Camp for Developers Using Java, 3E
Nilesh Singh Local Data Storage option Android provides several options for you to save persistent application data. - Shared preferences - Creation.
9 Persistence - SQLite CSNB544 Mobile Application Development Thanks to Utexas Austin.
Networking: Part 1 (Web Content). Networking with Android Android provides A full-featured web browser based on Chromium, the open source browser engine.
The generic Genome Browser (GBrowse) A combination database and interactive web page for manipulating and displaying annotations on genomes Developed by.
Field Trip #32 Digital Alarm Clock By Keith Lynn.
Introduction to JavaScript CS101 Introduction to Computing.
XP Tutorial 8 Adding Interactivity with ActionScript.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
CS378 - Mobile Computing Persistence. Saving State We have already seen saving app state into a Bundle on orientation changes or when an app is killed.
Microsoft FrontPage 2003 Illustrated Complete Integrating a Database with a Web Site.
Working with Multiple Activities. Slide 2 Introduction Working with multiple activities Creating multiple views Introduction to intents Passing data to.
Introducing Intents Intents Bind application components and navigate between them Transform device into collection of interconnected systems Creating a.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Android Intents Nasrullah. Using the application context You use the application context to access settings and resources shared across multiple activity.
JavaScript: Objects 1 © by Pearson Education, Inc. All Rights Reserved.
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
Easy WP Guide V2.6 for WordPress 3.8. easywpguide.com Adding Tags within your Post Adding Tags whilst editing your Post, will automatically assign those.
CHAPTER 9 File Storage Shared Preferences SQLite.
Live. learn. work. play Superior Avenue Suite 310 Cleveland Ohio Tel: Fax:
The Ingredients of Android Applications. A simple application in a process In a classical programming environment, the OS would load the program code.
Mobile Application Development Data Storage. Android provides several options for you to save persistent application data. The solution you choose depends.
The Flag Quiz app tests your ability to correctly identify 10 flags from various countries and territories.
Working with Multiple Activities. Slide 2 Introduction Working with multiple activities Putting together the AndroidManifest.xml file Creating multiple.
The Doodlz app enables you to paint by dragging one or more fingers across the screen. The app provides options for setting the drawing color.
Android Application Data Storage 1.
Android Application SQLite 1.
Activities and Intents
Android Activities An application can have one or more activities, where Each activity Represents a screen that an app present to its user Extends the.
Mobile Application Development Chapter 4 [Android Navigation and Interface Design] IT448-Fall 2017 IT448- Fall2017.
Favorite Twitter Searches App
lec 05 Admin stuff; schedule IOS versus Android Preferences
Activities and Intents
Favorite Twitter Searches App
Activities and Intents
11.1 Applets & graphics.
It is used to Start an Activity Start a Service Deliver a Broadcast
Mobile Programming Dr. Mohsin Ali Memon.
Preference Activity class
Presentation transcript:

1

2

3

4

5 Editing a Twitter search. Viewing search results in a browser

6 Technologies Overview Using EditText, ScrollView and Button GUI components. Each search is associated with a Button, which the user can tap to pass the search to the browser SharedPreferences: Files containing key/value pairs associated with each app Manipulate a file called searches storing the pairs of tags and Twitter search queries that the user creates SharedPreferences objects and SharedPreferences.editor to read and edit the file.

7 Technologies Overview Read in the saved searches file in our refreshButtons method, which is called from the Activity’s onCreate method Android creates a main thread called the UI thread which handles the GUI Touching a Button represents a search and creates a URL that contains the Twitter search query. Loads the URL into a web browser by creating a new Intent for viewing a URL, then passing that Intent to the startActivity method

8 Technologies Overview Displaying messages and confirmations with an AlertDialog. While the dialog is displayed, the user cannot interact with the app—this is known as a modal dialog. Specify the settings for the dialog with an AlertDialog.Builder object, then use it to create the AlertDialog.

9 Building the App’s GUI and Resource Files

10 Building the App’s GUI and Resource Files

11 A literal color value and a few literal dimension values in the files colors.xml and dimen.xml are stored respectively. Each color and dimension will be represented in the auto- generated R.java file by a constant that you can use to reference the specified value.

12

13 Building the App

14 Class Intent of package android.content enables us to work with Intents. An Intent specifies an action to be performed and the data to be acted upon. Android uses Intents to launch the appropriate activities. Class SharedPreferences of package android.content is used to manipulate persistent key/value pairs that are stored in files associated with the app. Class InputMethodManager of package android.view.inputmethod enables us to hide the soft keyboard when the user saves a search.

15 Favorite Twitter Searches App Activity (Only activity in the application) Shared- Preferences objects store key/value pairs in which the keys are Strings and the values are primitive types or Strings.

16 The onCreate method is called by the system when the app loads killed by theOS while the app was in the background, and the app is then restored each time the configuration changes, (when the user rotates the device or opens/closes a physical keyboard) onCreate method initializes the Activity’s instance variables and GUI components. keep it simple so the app loads quickly.

17 The application uses the method getSharedPreferences (inherited from class Context) to get a SharedPreferences object to read tag/query pairs stored previously

18 refreshButtons Method of Class FavoriteTwitterSearches creates and displays new query tag and edit Buttons either for a newly saved search (when its argument is not null) or for all saved searches (when its argument is null).

19 SharedPreferences. Editor provides methods for adding key/value pairs to, removing key/value pairs from, and modifying the value associated with a particular key in a SharedPreferences file. put- String method to save the new search’s tag and query.

20

21

22

23

24 Lines 229–230 create a new Intent to launch the device’s web browser and display the Twitter search results. An Intent is a description of an action to be performed with associated data. Many constants are defined in the Intent class describing actions such as searching, choosing, sending and playing.

25 This is an example of an implicit Intent—we did not specify a component to display the web page but instead allowed the system to launch the most appropriate Activity based on the type of data.

26

27