HW#9 Clues CSCI 571 Fall, 2015. HW#9 Prototype https://youtu.be/V64H0s8ZvnQ.

Slides:



Advertisements
Similar presentations
Bruce Scharlau, University of Aberdeen, 2010 Android UI, and Networking Mobile Computing Based on android-sdk_2.2 Unless otherwise stated, images are from.
Advertisements

Prepared by: Prepared by: Jameela Rabaya Jameela Rabaya Fatima Darawsha Fatima Darawsha.
Unlocking Android Chapter 4.  Understanding activities and views  Exploring the Activity lifecycle  Working with resources  Defining the AndroidManifest.xml.
All About Android Introduction to Android 1. Creating a New App “These aren’t the droids we’re looking for.” Obi-wan Kenobi 1. Bring up Eclipse. 2. Click.
Application Fundamentals. See: developer.android.com/guide/developing/building/index.html.
Filip Debelić What is it? Android is a mobile operating system (OS) based on the Linux kernel and currently developed by Google Android,
Android Application Development with Java UPenn CS4HS 2011 Chris Murphy
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
Hints for HW#8. HW#6 Architecture Result of Query GOOG Browser with web page PHP Script client Apache web server finance.yahoo.com Send query with arguments.
Android Development (Basics)
Chien-Chung Shen Manifest and Activity Chien-Chung Shen
Mobile Programming Lecture 1 Getting Started. Today's Agenda About the Eclipse IDE Hello, World! Project Android Project Structure Intro to Activities,
Introduction to Android Programming Content Basic environmental structure Building a simple app Debugging.
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 9: Customize! Navigating with a Master/Detail.
Android: versions Note that: Honeycomb (Android v3.0) A tablet-only release Jelly Bean (Android v4.1) Released on July 09, 2012.
JavaScript & jQuery the missing manual Chapter 11
CS5103 Software Engineering Lecture 08 Android Development II.
CS378 - Mobile Computing Web - WebView and Web Services.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Concurrency in Android with.
Favorite Twitter® Searches App Android How to Program © by Pearson Education, Inc. All Rights Reserved.
1 Mobile Computing Monetizing An App Copyright 2014 by Janson Industries.
Chapter 2: Simplify! The Android User Interface
Android development basics Introduction,Structure,Development Boncho Valkov.Net Developer.
Basic Android Tutorial USF’s Association for Computing Machinery.
Networking: Part 2 (Accessing the Internet). The UI Thread When an application is launched, the system creates a “main” UI thread responsible for handling.
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.
Frank Xu Gannon University.  Linear Layout  Relative Layout  Table Layout.
CS378 - Mobile Computing Web - WebView and Web Services.
Chapter 2 The Android User Interface. Objectives  In this chapter, you learn to:  Develop a user interface using the TextView, ImageView, and Button.
INTRODUCTION TO ANDROID. Slide 2 Application Components An Android application is made of up one or more of the following components Activities We will.
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
Programming with Android: Layouts, Widgets and Events Luca Bedogni Marco Di Felice Dipartimento di Scienze dell’Informazione Università di Bologna.
User Interfaces: Part 1 (View Groups and Layouts).
Application Development for mobile Devices
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 2: Simplify! The Android User Interface.
Android Hello World 1. Click on Start and type eclipse into the textbox 2.
MAKANI ANDROID APPLICATION Prepared by: Asma’ Hamayel Alaa Shaheen.
NOAA Weather Patrick Wolfram. What it does Allows user to specify a zip code Performs HTTP GET requests on noaa.gov for the specified zip code Displays.
MOBILE COMPUTING D10K-7D02 MC05: Android UI Design Dr. Setiawan Hadi, M.Sc.CS. Program Studi S-1 Teknik Informatika FMIPA Universitas Padjadjaran.
Copyright© Jeffrey Jongko, Ateneo de Manila University Deconstructing HelloWorld.
Recap of Part 1 Terminology Windows FormsAndroidMVP FormActivityView? ControlViewView? ?ServiceModel? Activities Views / ViewGroups Intents Services.
1 Android Development Lean and mean introduction Based on a presentation by Mihail L. Sichitiu.
CS378 - Mobile Computing User Interface Basics. User Interface Elements View – Control – ViewGroup Layout Widget (Compound Control) Many pre built Views.
Building User Interfaces Basic Applications
© 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.
Chapter 2 Building User Interfaces and Basic Applications.
ANDROID LAYOUTS AND WIDGETS. Slide 2 Introduction Parts of the Android screen Sizing widgets and fonts Layouts and their characteristics Buttons, checkboxes.
INTRODUCTION TO ANDROID. Slide 2 Introduction I take a top-down approach to describing an application’s anatomy.
USING ANDROID WITH THE INTERNET. Slide 2 Lecture Summary Getting network permissions Working with the HTTP protocol Sending HTTP requests Getting results.
Android apps development - Eclipse, Android SDK, and ADT plugin Introduction of.
H W #9 Clues CSCI 571 Spring, H W# 9 P rototype YouTube Link :
Chapter 2: Simplify! The Android User Interface
Open Handset Alliance.
Android Application Development 1 6 May 2018
Android Runtime – Dalvik VM
WebView and Web Services
HW#9 IOS Clues CSCI571 Spring 2017
MAD.
Creation of an Android App By Keith Lynn
Mobile Application Development Chapter 4 [Android Navigation and Interface Design] IT448-Fall 2017 IT448- Fall2017.
HUJI Post PC Workshop 1 Introduction to Android Development Ari Sprung
Android SDK & App Development
CIS 470 Mobile App Development
Building User Interfaces Basic Applications
CIS 470 Mobile App Development
CS 240 – Advanced Programming Concepts
Android Sensor Programming
Presentation transcript:

HW#9 Clues CSCI 571 Fall, 2015

HW#9 Prototype

Tutorials 1. Building your first App Creating a Project with Android Studio 2. Running your first App (on same page see also “Run on the Emulator”) 3. Starting another activity 4. Comprehensive Tutorial / Article on getting started with Android

What is needed You will need to download and install Android Studio Download the Facebook Android SDK Register your new App with Facebook and get an Application ID Download the AERIS Android SDK Register you new App with AERIS and get keys

HW#9 Architecture Overview PHP pre-processor executes PHP script; PHP script parses XML, makes request for JSON Sends JSON client Apache web Server running on AWS RESTful WEB SERVICE PROVIDER Eg. Google APIs, Forecast.io Posting to Facebook PHP script sends query with arguments retrieve JSON User clicks on Facebook icon Android App send input data to AWS retrieve XML retrieve JSON

HW9 Implementation You will create 5 activities and a Manifest file AndroidManifest.xml MainActivity.java – routine that controls the entire process –Puts up initial user interface, –sets Listeners to buttons –Validates input –Calls AWS server ResultActivity.java –implements the table of results using the json result –Facebook request

HW9 Implementation contd. DetailsActivity.java –Displays detail data in a tabular view MapActivity.java –Displays weather map for the input location AboutActivity.java –Displays student details

AndroidManifest.xml File Every application must have an AndroidManifest.xml file in its root directory. The manifest presents essential information about the application to the Android system. Among other things, the manifest does the following: It names the Java package for the application. It describes the components of the application — the activities, services, broadcast receivers, and content providers that the application is composed of. It names the classes that implement each of the components and publishes their capabilities. See Please note that the file is created by default on creation of a new Android project using Android Studio IDE.

UI Controls in Android (1 of 2) For the homework exercise, you can use the following widgets (not limited to): TextView ( i.e., label ) EditText ( i.e., text field ) Spinner ( i.e., drop-down list ) Button RadioButton ImageView

UI Controls in Android (2 of 2) ImageSwitcher ( It is useful to animate an Image on screen ) TextSwitcher ( It is useful to animate a label on screen ) TableLayout TableRow RelativeLayout LinearLayout (It arranges “components” in vertical or horizontal order, via orientation attribute.) ScrollView

RelativeLayout RelativeLayout lets you position your component base on the nearby (relative or sibling) component’s position. You can use “above, below, left and right” to arrange the component position. <RelativeLayout xmlns:android=" android:layout_width="fill_parent" android:layout_height="fill_parent" > <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Button 1"/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Button 2" <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Button 3"

LinearLayout LinearLayout is a common layout that arranges “component” in vertical or horizontal order, via orientation attribute

MainActivity.java (1 of 3) onCreate does the following Display the search UI Register a click event with the search button. –More info about OnClickListener: onClickListener for the search button does the following Build the URL for AWS (xxx.elasticbeanstalk.com) Create a new task which is of type AsyncTask to fetch the JSON data. It will initiate an asynchronous call. – Execute the task

MainActivity.java - AsyncTask (2 of 3) Create a class that extends AsyncTask which overrides two essential methods – doInBackground, onPostExecute. 1.doInBackground: used to perform background computation that can take a long time For our homework exercise we perform basically the following steps in doInBackground method: Set up the HTTP connection stream, see Use HttpGet to GET, see: et.html Retrieve the data with HttpResponse Return the data using an InputStream object, see:

MainActivity.java - AsyncTask (3 of 3) 2. onPostExecute: invoked on the UI thread after the background computation finishes. The result of the background computation is passed to this step as a parameter For our homework exercise we perform basically the following steps in onPostExecute method: Retrieve JSON data using task’s onPostExecute. Call function to parse JSON, see After parsing is complete, start a new activity, ResultActivity, passing the extracted data.

ResultActivity.java ResultActivity starts with onCreate - onCreate does the following retrieves JSON data which was passed from MainActivity stores the data in a JSONObject parses the result extracts all JSON Objects values shows the results Shows the image and main text content, facebook, all scrollable. Fills the table layout Displays image from drawable image resources Register event hander for More Details, View Map and Facebook button Add Facebook related code as described later.

Shows tabs, both scrollable. Tabs are created with two buttons and two relative layouts, all contained in one relative layout. Register event handlers for both tab buttons. Toggle visibility of respective tab layouts using event handlers. DetailsActivity.java

MapActivity.java Create a Fragment extending MapViewFragment tied with a layout containing AerisMapView as an element. In the Fragment initialize AerisEngine before creating AerisMapView. Use AerisMap client secret key and package name of the android app to intitialize the AerisEngine. Set Location information and Layers in AerisMapView. Create an Activity with FrameLayout as a holder for fragment and add the fragment in it using FragmentManager.

AboutActivity.java ImageView can be used for student image. TextView can be utilized for student name and student id.

FACEBOOK POST For the latest versions of Facebook SDK 4.x, share functionality may require following: ●Modifications in AndroidManifest file: ○ Introducing Fb Application Id ○Adding FacebookActivity <activity android:name="com.facebook.FacebookActivity" android:configChanges= "keyboard|keyboardHidden|screenLayout|screenSize|orientation" /> ○Adding Facebook Content Provider <provider android:authorities="com.facebook.app.FacebookContentProvider{app_id}" android:name="com.facebook.FacebookContentProvider" android:exported="true"/>

FACEBOOK POST (Cont.) -To implement the functionality you may use the following approach on click of the fb button: -Initialize facebook sdk -Create a ShareDialog -Create LinkContent for the post -Share the LinkContent through ShareDialog -Register Callback for the ShareDialog -Bind onActivityResult for maintaining session