The Suggest Example layout (cont ed)
|
|
- Timothy Sanders
- 6 years ago
- Views:
Transcription
1 Using Web Services 5COSC005W MOBILE APPLICATION DEVELOPMENT Lecture 7: Working with Web Services Android provides a full set of Java-standard networking APIs, such as the java.net package containing among others the HttpURLConnection class. Dr Dimitris C. Dracopoulos Example: Use the Suggest web service to create an application which autocompletes phrases by making suggestions. Dimitris C. Dracopoulos 1/39 Dimitris C. Dracopoulos 2/39 The Suggest Example The layout of the main activity res/layout/activity main.xml: <? xml version =" 1.0 " encoding ="utf -8"?> < LinearLayout xmlns:android =" http: // schemas. android. com / apk / res / android " android: layout_ height =" fill_ parent " android: orientation =" vertical " android:padding ="10 dip " > < TextView android: layout_ height =" wrap_ content " android:text / original_label " /> < EditText android:id ="@+id/ original_text " android: layout_ height =" wrap_ content " android: hint / original_ hint " android: inputtype =" textnosuggestions " android:padding ="10 dip " android:textsize ="18 sp" /> < TextView android: layout_ height =" wrap_ content " android:text / result_label " /> Dimitris C. Dracopoulos 3/39 The Suggest Example layout (cont ed) < ListView android:id ="@+id/ result_list " android:layout_height ="0dp" android: layout_ weight =" 1" / > < TextView android:id ="@+id/ eband_text " android: layout_ height =" wrap_ content " android:gravity =" bottom right " android:text / eband " /> </ LinearLayout > Dimitris C. Dracopoulos 4/39
2 Specifying special permissions Add this to the AndroidManifest.xml: <uses - permission android: name =" android. permission. INTERNET " / > The main activity MainActivity.java: package org. example. suggest ; import... // look up the imports in the textbook or autoimport public class MainActivity extends Activity { private EditText origtext ; private ListView sugglist ; private TextView ebandtext ; private Handler ; private ExecutorService ; private ; private <? > ; private List < String > items ; private ArrayAdapter < String > adapter ; public void oncreate ( Bundle savedinstancestate ) { super. oncreate ( savedinstancestate ); Dimitris C. Dracopoulos 5/39 setcontentview ( R. layout. activity_ main ); initthreading (); findviews (); setlisteners (); setadapters (); Dimitris C. Dracopoulos 6/39 private void findviews () { origtext = ( EditText ) findviewbyid ( R. id. original_ text ); sugglist = ( ListView ) findviewbyid ( R. id. result_ list ); ebandtext = ( TextView ) findviewbyid ( R. id. eband_ text ); /* * Setup user interface event handlers */ private void setlisteners () { // Define listener text change TextWatcher textwatcher = new TextWatcher () { public void beetextchanged ( CharSequence s, int start, int count, int after ) { /* Do nothing */ public void ontextchanged ( CharSequence s, int start, int bee, int count ) { queueupdate (1000 /* milliseconds */ ); public void aftertextchanged ( Editable s) { /* Do nothing */ ; // Set listener on the original text field origtext. addtextchangedlistener ( textwatcher ); // Define listener clicking on an item OnItemClickListener clicklistener = new OnItemClickListener () public void onitemclick ( AdapterView <? > parent, View view, int position, long id) { String query = ( String ) parent. getitematposition ( position ); dosearch ( query ); ; // Set listener on the suggestion list sugglist. setonitemclicklistener ( clicklistener ); // Make website link clickable ebandtext. setmovementmethod ( LinkMovementMethod. getinstance ()); Dimitris C. Dracopoulos 7/39 Dimitris C. Dracopoulos 8/39
3 initthreading() method private void dosearch ( String query ) { Intent intent = new Intent ( Intent. ACTION_ WEB_ SEARCH ); intent. putextra ( SearchManager. QUERY, query ); startactivity ( intent ); /* * Set up adapter list view. */ private void setadapters () { items = new ArrayList < String >(); adapter = new ArrayAdapter < String >( this, android. R. layout. simple_list_item_1, items ); sugglist. setadapter ( adapter ); Dimitris C. Dracopoulos 9/39 Dimitris C. Dracopoulos 10/39 initthreading() method initthreading() method Dimitris C. Dracopoulos 11/39 Dimitris C. Dracopoulos 12/39
4 initthreading() method initthreading() method Dimitris C. Dracopoulos 13/39 Dimitris C. Dracopoulos 14/39 initthreading() method Dimitris C. Dracopoulos 15/39 Dimitris C. Dracopoulos 16/39
5 new new Dimitris C. Dracopoulos 17/39 Dimitris C. Dracopoulos 18/39 new new Dimitris C. Dracopoulos 19/39 Dimitris C. Dracopoulos 20/39
6 remove Dimitris C. Dracopoulos 21/39 Dimitris C. Dracopoulos 22/39 cancel Dimitris C. Dracopoulos 23/39 Dimitris C. Dracopoulos 24/39
7 cancel cancel Dimitris C. Dracopoulos 25/39 Dimitris C. Dracopoulos 26/39 new new Dimitris C. Dracopoulos 27/39 Dimitris C. Dracopoulos 28/39
8 Threading the task: private void initthreading () { = new Handler (); = Executors. newsinglethreadexecutor (); // This task gets suggestions and updates the screen = new () { public void run () { // Get text to suggest String original = origtext. gettext (). tostring (). trim (); // Cancel previous suggestion if there was one if (!= null ). cancel ( true ); ; // Check to make sure there is text to work on if ( original. length ()!= 0) { // Let user know we re doing something settext (R. string. working ); // Begin suggestion now but don t wait it try { SuggestTask = new SuggestTask ( MainActivity. this, // reference to activity original // original text ); =. submit ( ); catch ( RejectedExecutionException e) { // Unable to start new task settext (R. string. error ); Dimitris C. Dracopoulos 29/39 Dimitris C. Dracopoulos 30/39 /* * Request an update to start after a short delay */ private void queueupdate ( long delaymillis ) { // Cancel previous update if it hasn t started yet. removecallbacks ( ); // Start an update if nothing happens after a few milliseconds. postdelayed (, delaymillis ); Dimitris C. Dracopoulos 31/39 /* * Modify list on the screen ( called from another thread ) */ public void setsuggestions ( List < String > suggestions ) { guisetlist ( sugglist, suggestions ); /* * All changes to the GUI must be done in the GUI thread */ private void guisetlist ( final ListView view, final List < String > list ) {. post ( new () { public void run () { setlist ( list ); ); /* * Display a list */ private void setlist ( List < String > list ) { adapter. clear (); adapter. addall ( list ); /* * Display a message */ private void settext ( int id) { adapter. clear (); adapter. add ( getresources (). getstring (id )); Dimitris C. Dracopoulos 32/39
9 The strings.xml < resources > < string name =" app_name ">Suggest </ string > < string name =" action_settings ">Settings </ string > < string name =" original_ hint " > Enter partial text </ string > < string name =" original_ label " > Original text: </ string > < string name =" result_label ">Suggestions: </ string > < string name =" working ">Working... </ string > < string name =" error ">( Web service error )</ string > < string name =" interrupted " >( Web service interrupted ) </ string > < string name =" no_results ">(No suggestions )</ string > < string name =" eband " > Example from <a href =" http: // pragprog. com / book / eband4 ">Hello, Android </a> by Ed Burnette </ string > </ resources > Dimitris C. Dracopoulos 33/39 The Suggest task (SuggestTask.java file: package org. example. suggest ; import java. io. IOException ; import java. net. HttpURLConnection ; import java. net. URL ; import java. net. URLEncoder ; import java. util. LinkedList ; import java. util. List ; import org. xmlpull.v1. XmlPullParser ; import org. xmlpull. v1. XmlPullParserException ; import android. util. Log ; import android. util. Xml ; public class SuggestTask implements { private static final String TAG = " SuggestTask "; private final MainActivity suggest ; private final String original ; SuggestTask ( MainActivity context, String original ) { this. suggest = context ; this. original = original ; Dimitris C. Dracopoulos 34/39 private List < String > dosuggest ( String original ) { List < String > messages = new LinkedList < String >(); String error = null ; HttpURLConnection con = null ; Log.d(TAG, " dosuggest (" + original + ")"); public void run () { // Get suggestions the original text List < String > suggestions = dosuggest ( original ); suggest. setsuggestions ( suggestions ); try { // Check if task has been interrupted if ( Thread. interrupted ()) throw new InterruptedException (); // Build RESTful query Google API String q = URLEncoder. encode ( original, "UTF -8"); URL url = new URL ( " http :// google. com / complete / search? output = toolbar &q=" + q); con = ( HttpURLConnection ) url. openconnection (); con. setreadtimeout (10000 /* milliseconds */ ); con. setconnecttimeout (15000 /* milliseconds */ ); con. setrequestmethod (" GET "); con. addrequestproperty (" Referer ", " http :// www. pragprog. com / book / eband4 "); con. setdoinput ( true ); Dimitris C. Dracopoulos 35/39 Dimitris C. Dracopoulos 36/39
10 // Start the query con. connect (); // Check if task has been interrupted if ( Thread. interrupted ()) throw new InterruptedException (); // Read results from the query XmlPullParser parser = Xml. newpullparser (); parser. setinput ( con. getinputstream (), null ); int eventtype = parser. geteventtype (); while ( eventtype!= XmlPullParser. END_ DOCUMENT ) { String name = parser. getname (); if ( eventtype == XmlPullParser. START_ TAG && name. equalsignorecase (" suggestion ")) { ( int i = 0; i< parser. getattributecount (); i ++) { if ( parser. getattributename ( i). equalsignorecase ( " data ")) { messages. add ( parser. getattributevalue (i )); eventtype = parser. next (); Dimitris C. Dracopoulos 37/39 catch ( IOException e) { Log.e(TAG, " IOException ", e); error = suggest. getresources (). getstring ( R. string. error ) + " " + e. tostring (); catch ( XmlPullParserException e) { Log.e(TAG, " XmlPullParserException ", e); error = suggest. getresources (). getstring ( R. string. error ) + " " + e. tostring (); catch ( InterruptedException e) { Log.d(TAG, " InterruptedException ", e); error = suggest. getresources (). getstring ( R. string. interrupted ); finally { if ( con!= null ) { con. disconnect (); Dimitris C. Dracopoulos 38/39 // If there was an error, return the error by itself if ( error!= null ) { messages. clear (); messages. add ( error ); // Print something if we got nothing if ( messages. size () == 0) { messages. add ( suggest. getresources (). getstring ( R. string. no_results )); // All done Log. d( TAG, " -> returned " + messages ); return messages ; Dimitris C. Dracopoulos 39/39
This lecture. The BrowserIntent Example (cont d)
This lecture 5COSC005W MOBILE APPLICATION DEVELOPMENT Lecture 10: Working with the Web Browser Dr Dimitris C. Dracopoulos Android provides a full-featured web browser based on the Chromium open source
More informationO X X X O O X O X. Tic-Tac-Toe. 5COSC005W MOBILE APPLICATION DEVELOPMENT Lecture 2: The Ultimate Tic-Tac-Toe Game
Tic-Tac-Toe 5COSC005W MOBILE APPLICATION DEVELOPMENT Lecture 2: The Ultimate Tic-Tac-Toe Game Dr Dimitris C. Dracopoulos O X X X O O X O X The Ultimate Tic-Tac-Toe: Rules of the Game Dimitris C. Dracopoulos
More informationAndroid User Interface
Android Smartphone Programming Matthias Keil Institute for Computer Science Faculty of Engineering 20. Oktober 2014 Outline 1 Android User Interface 2 Multi-Language Support 3 Summary Matthias Keil Android
More informationSQLite. 5COSC005W MOBILE APPLICATION DEVELOPMENT Lecture 6: Working with Databases. What is a Database Server. Advantages of SQLite
SQLite 5COSC005W MOBILE APPLICATION DEVELOPMENT Lecture 6: Working with Databases Dr Dimitris C. Dracopoulos SQLite is a tiny yet powerful database engine. Besides Android, it can be found in: Apple iphone
More informationLab 3. Accessing GSM Functions on an Android Smartphone
Lab 3 Accessing GSM Functions on an Android Smartphone 1 Lab Overview 1.1 Goals The objective of this practical exercise is to create an application for a smartphone with the Android mobile operating system,
More informationAndroid User Interface Android Smartphone Programming. Outline University of Freiburg
Android Smartphone Programming Matthias Keil Institute for Computer Science Faculty of Engineering 20. Oktober 2014 Outline 1 2 Multi-Language Support 3 Summary Matthias Keil 20. Oktober 2014 2 / 19 From
More informationThe drawable/tile empty.xml file
The X and O Symbols 5COSC005W MOBILE APPLICATION DEVELOPMENT Lecture 3: Ultimate Tic-Tac-Toe Game: The Interface Dr Dimitris C. Dracopoulos Create them with the filenames x blue.png and o red.png in an
More informationInitialising the Views (GameFragment) 5COSC005W MOBILE APPLICATION DEVELOPMENT Lecture 5: Ultimate Tic-Tac-Toe Game: The Interface (Part III)
5COSC005W MOBILE APPLICATION DEVELOPMENT Lecture 5: Ultimate Tic-Tac-Toe Game: The Interface (Part III) Dr Dimitris C. Dracopoulos Making a Move (GameFragment) Dimitris C. Dracopoulos 1/22 Initialising
More informationListView Containers. Resources. Creating a ListView
ListView Containers Resources https://developer.android.com/guide/topics/ui/layout/listview.html https://developer.android.com/reference/android/widget/listview.html Creating a ListView A ListView is a
More informationCreating a Custom ListView
Creating a Custom ListView References https://developer.android.com/guide/topics/ui/declaring-layout.html#adapterviews Overview The ListView in the previous tutorial creates a TextView object for each
More informationAndroid App Development. Mr. Michaud ICE Programs Georgia Institute of Technology
Android App Development Mr. Michaud ICE Programs Georgia Institute of Technology Android Operating System Created by Android, Inc. Bought by Google in 2005. First Android Device released in 2008 Based
More informationGUI Widget. Lecture6
GUI Widget Lecture6 AnalogClock/Digital Clock Button CheckBox DatePicker EditText Gallery ImageView/Button MapView ProgressBar RadioButton Spinner TextView TimePicker WebView Android Widgets Designing
More informationUseful tools for an effcient development of an Android App - The Android SDK
RWTH Aachen University Chair of Data Management and Data Exploration Prof. Dr. T. Seidl Proseminar Useful tools for an effcient development of an Android App - The Android SDK Marco Moscher June 2012 Supervision:
More informationCreating a User Interface
Creating a User Interface Developing for Android devices is a complicated process that requires precision to work with. Android runs on numerous devices from smart-phones to tablets. Instead of using a
More informationMOBILE CLIENT FOR ONLINE DICTIONARY. Constantin Lucian ALDEA 1. Abstract
Bulletin of the Transilvania University of Braşov Vol 4(53), No. 2-2011 Series III: Mathematics, Informatics, Physics, 123-128 MOBILE CLIENT FOR ONLINE DICTIONARY Constantin Lucian ALDEA 1 Abstract The
More informationMobile User Interfaces
Mobile User Interfaces CS 2046 Mobile Application Development Fall 2010 Announcements Next class = Lab session: Upson B7 Office Hours (starting 10/25): Me: MW 1:15-2:15 PM, Upson 360 Jae (TA): F 11:00
More informationMobile Programming Lecture 3. Resources, Selection, Activities, Intents
Mobile Programming Lecture 3 Resources, Selection, Activities, Intents Lecture 2 Review What widget would you use to allow the user to enter a yes/no value a range of values from 1 to 100 What's the benefit
More informationProduced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology
Mobile Application Development Produced by David Drohan (ddrohan@wit.ie) Department of Computing & Mathematics Waterford Institute of Technology http://www.wit.ie User Interface Design" & Development -
More informationLab 1 - Setting up the User s Profile UI
Lab 1 - Setting up the User s Profile UI Getting started This is the first in a series of labs that allow you to develop the MyRuns App. The goal of the app is to capture and display (using maps) walks
More informationFragments were added to the Android API in Honeycomb, API 11. The primary classes related to fragments are: android.app.fragment
FRAGMENTS Fragments An activity is a container for views When you have a larger screen device than a phone like a tablet it can look too simple to use phone interface here. Fragments Mini-activities, each
More informationIntroductory Mobile App Development
Introductory Mobile App Development 152-160 Quick Links & Text References Overview Pages ListView Pages ArrayAdaper Pages Filling a ListView Pages Sensing Click Pages Selected Item Info Pages Configuring
More information10.1 Introduction. Higher Level Processing. Word Recogniton Model. Text Output. Voice Signals. Spoken Words. Syntax, Semantics, Pragmatics
Chapter 10 Speech Recognition 10.1 Introduction Speech recognition (SR) by machine, which translates spoken words into text has been a goal of research for more than six decades. It is also known as automatic
More informationProduced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology
Mobile Application Development Produced by David Drohan (ddrohan@wit.ie) Department of Computing & Mathematics Waterford Institute of Technology http://www.wit.ie The image cannot be displayed. Your computer
More informationSoftware Engineering Large Practical: Accessing remote data and XML parsing. Stephen Gilmore School of Informatics October 8, 2017
Software Engineering Large Practical: Accessing remote data and XML parsing Stephen Gilmore School of Informatics October 8, 2017 Contents 1. Android system permissions 2. Getting a network connection
More informationFigure 2.10 demonstrates the creation of a new project named Chapter2 using the wizard.
44 CHAPTER 2 Android s development environment Figure 2.10 demonstrates the creation of a new project named Chapter2 using the wizard. TIP You ll want the package name of your applications to be unique
More informationDependence Graph Considerering Resource for Automatic Sample Program Generation
1 2 2 2 ( ) Google Android Dependence Graph Considerering Resource for Automatic Sample Program Generation Yoshimasa Fujiura, 1 Hirotaka Ohkubo, 1 Hideto Kasuya 1 and Shinichiro Yamamoto 1 This paper propose
More informationCMSC436: Fall 2013 Week 3 Lab
CMSC436: Fall 2013 Week 3 Lab Objectives: Familiarize yourself with the Activity class, the Activity lifecycle, and the Android reconfiguration process. Create and monitor a simple application to observe
More informationEECS 4443 Mobile User Interfaces. More About Layouts. Scott MacKenzie. York University. Overview (Review)
EECS 4443 Mobile User Interfaces More About Layouts Scott MacKenzie York University Overview (Review) A layout defines the visual structure for a user interface, such as the UI for an activity or app widget
More informationAndroid Tutorial: Part 3
Android Tutorial: Part 3 Adding Client TCP/IP software to the Rapid Prototype GUI Project 5.2 1 Step 1: Copying the TCP/IP Client Source Code Quit Android Studio Copy the entire Android Studio project
More informationCS371m - Mobile Computing. User Interface Basics
CS371m - Mobile Computing User Interface Basics Clicker Question Have you ever implemented a Graphical User Interface (GUI) as part of a program? A. Yes, in another class. B. Yes, at a job or internship.
More informationDeveloping Android Applications Introduction to Software Engineering Fall Updated 1st November 2015
Developing Android Applications Introduction to Software Engineering Fall 2015 Updated 1st November 2015 Android Lab 3 & Midterm Additional Concepts No Class Assignment 2 Class Plan Android : Additional
More informationMobile Programming Lecture 2. Layouts, Widgets, Toasts, and Event Handling
Mobile Programming Lecture 2 Layouts, Widgets, Toasts, and Event Handling Lecture 1 Review How to edit XML files in Android Studio? What holds all elements (Views) that appear to the user in an Activity?
More informationCOMP4521 EMBEDDED SYSTEMS SOFTWARE
COMP4521 EMBEDDED SYSTEMS SOFTWARE LAB 5: USING WEBVIEW AND USING THE NETWORK INTRODUCTION In this lab we modify the application we created in the first three labs. Instead of using the default browser,
More informationAgenda. Overview of Xamarin and Xamarin.Android Xamarin.Android fundamentals Creating a detail screen
Gill Cleeren Agenda Overview of Xamarin and Xamarin.Android Xamarin.Android fundamentals Creating a detail screen Lists and navigation Navigating from master to detail Optimizing the application Preparing
More informationWhen programming in groups of people, it s essential to version the code. One of the most popular versioning tools is git. Some benefits of git are:
ETSN05, Fall 2017, Version 1.0 Software Development of Large Systems Lab 2 preparations Read through this document carefully. In order to pass lab 2, you will need to understand the topics presented in
More informationAction Bar. Action bar: Top navigation bar at each screen The action bar is split into four different functional areas that apply to most apps.
1 Action Bar Action bar: Top navigation bar at each screen The action bar is split into four different functional areas that apply to most apps. 1) App Icon 3) Action Buttons 2)View Control 4) Action Overflows
More informationEECS 4443 Mobile User Interfaces. More About Layouts. Scott MacKenzie. York University
EECS 4443 Mobile User Interfaces More About Layouts Scott MacKenzie York University Overview (Review) A layout defines the visual structure for a user interface, such as the UI for an activity or app widget
More informationExercise 1: First Android App
Exercise 1: First Android App Start a New Android Studio App Open Android Studio. Click on Start a new Android Studio project. For Application name enter First App. Keep other fields as default and click
More informationListView (link) An ordered collection of selectable choices. key attributes in XML:
CS 193A Lists This document is copyright (C) Marty Stepp and Stanford Computer Science. Licensed under Creative Commons Attribution 2.5 License. All rights reserved. ListView (link) An ordered collection
More informationBCS3283-Mobile Application Development
For updated version, please click on http://ocw.ump.edu.my BCS3283-Mobile Application Development Chapter 7 Intent Editor Dr. Mohammed Falah Mohammed Faculty of Computer Systems & Software Engineering
More informationCS 4330/5390: Mobile Application Development Exam 1
1 Spring 2017 (Thursday, March 9) Name: CS 4330/5390: Mobile Application Development Exam 1 This test has 8 questions and pages numbered 1 through 7. Reminders This test is closed-notes and closed-book.
More information14.1 Overview of Android
14.1 Overview of Android - Blackberry smart phone appeared in 2003 First widely used mobile access to the Web - Smart phone market now dominated by Android, iphone, and Windows Phone - Tablets are now
More informationProduced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology
Mobile Application Development Produced by David Drohan (ddrohan@wit.ie) Department of Computing & Mathematics Waterford Institute of Technology http://www.wit.ie The image cannot be displayed. Your computer
More informationCMSC 436 Lab 10. App Widgets and Supporting Different Devices
CMSC 436 Lab 10 App Widgets and Supporting Different Devices Overview For this lab you will create an App Widget that uses a Configuration Activity You will also localize the widget to support different
More informationLecture 6: Android XML, Inversion of Control, Timers (Handlers), Activity
1 / 31 Lecture 6: Android XML, Inversion of Control, Timers (Handlers), Activity Engineering Design with Embedded Systems Patrick Lam University of Waterloo January 18, 2013 2 / 31 Housekeeping: Tutorials
More information(c) Dr Sonia Sail LAJMI College of Computer Sciences & IT (girl Section) 1
Level 5: Baccalaureus in Computer Sciences CHAPTER 4: LAYOUTS AND VIEWS Dr. Sonia Saïd LAJMI PhD in Computer Sciences 1 Layout.xml 2 Computer Sciences & IT (girl Section) 1 Layout Requirements android:layout_width:
More informationCS 4518 Mobile and Ubiquitous Computing Lecture 2: Introduction to Android Programming. Emmanuel Agu
CS 4518 Mobile and Ubiquitous Computing Lecture 2: Introduction to Android Programming Emmanuel Agu Android Apps: Big Picture UI Design using XML UI design code (XML) separate from the program (Java) Why?
More informationA view is a widget that has an appearance on screen. A view derives from the base class android.view.view.
LAYOUTS Views and ViewGroups An activity contains Views and ViewGroups. A view is a widget that has an appearance on screen. A view derives from the base class android.view.view. One or more views can
More informationCS 234/334 Lab 1: Android Jump Start
CS 234/334 Lab 1: Android Jump Start Distributed: January 7, 2014 Due: Friday, January 10 or Monday, January 13 (in-person check off in Mobile Lab, Ry 167). No late assignments. Introduction The goal of
More informationBuilding User Interface for Android Mobile Applications II
Building User Interface for Android Mobile Applications II Mobile App Development 1 MVC 2 MVC 1 MVC 2 MVC Android redraw View invalidate Controller tap, key pressed update Model MVC MVC in Android View
More informationEmbedded Systems Programming - PA8001
Embedded Systems Programming - PA8001 http://goo.gl/ydeczu Lecture 9 Mohammad Mousavi m.r.mousavi@hh.se Center for Research on Embedded Systems School of Information Science, Computer and Electrical Engineering
More information<uses-permission android:name="android.permission.internet"/>
Chapter 11 Playing Video 11.1 Introduction We have discussed how to play audio in Chapter 9 using the class MediaPlayer. This class can also play video clips. In fact, the Android multimedia framework
More informationOur First Android Application
Mobile Application Development Lecture 04 Imran Ihsan Our First Android Application Even though the HelloWorld program is trivial in introduces a wealth of new ideas the framework, activities, manifest,
More informationUniversity of Stirling Computing Science Telecommunications Systems and Services CSCU9YH: Android Practical 1 Hello World
University of Stirling Computing Science Telecommunications Systems and Services CSCU9YH: Android Practical 1 Hello World Before you do anything read all of the following red paragraph! For this lab you
More informationEventually, you'll be returned to the AVD Manager. From there, you'll see your new device.
Let's get started! Start Studio We might have a bit of work to do here Create new project Let's give it a useful name Note the traditional convention for company/package names We don't need C++ support
More informationES E 3 3 L a L b 5 Android development
ES3 Lab 5 Android development This Lab Create a simple Android interface Use XML interface layouts Access the filesystem Play media files Info about Android development can be found at http://developer.android.com/index.html
More informationMobile Computing Practice # 2c Android Applications - Interface
Mobile Computing Practice # 2c Android Applications - Interface One more step in the restaurants application. 1. Design an alternative layout for showing up in landscape mode. Our current layout is not
More informationAndroid Application Development
Android Application Development Octav Chipara What is Android A free, open source mobile platform A Linux-based, multiprocess, multithreaded OS Android is not a device or a product It s not even limited
More informationSoftware Engineering Large Practical: Preferences, storage, and testing
Software Engineering Large Practical: Preferences, storage, and testing Stephen Gilmore (Stephen.Gilmore@ed.ac.uk) School of Informatics November 9, 2016 Contents A simple counter activity Preferences
More informationM.C.A. Semester V Subject: - Mobile Computing (650003) Week : 1
M.C.A. Semester V Subject: - Mobile Computing (650003) Week : 1 1) Explain underlying architecture of Android Platform. (Unit :- 1, Chapter :- 1) Suggested Answer:- Draw Figure: 1.8 from textbook given
More informationUsing Eclipse for Android Development
3 Using Eclipse for Android Development This chapter is an introduction to building a complete Android app. The chapter includes creating a new app project, exploring the components of an Android app,
More informationLecture 7: Data Persistence : shared preferences. Lecturer : Ali Kadhim Al-Bermani Mobile Fundamentals and Programming
University of Babylon College of Information Technology Department of Information Networks Mobile Fundamentals and Programming Lecture 7: Data Persistence : shared preferences Lecturer : Ali Kadhim Al-Bermani
More informationAndroid Programming Lecture 2 9/7/2011
Android Programming Lecture 2 9/7/2011 Creating a first app 1. Create a new Android project (a collection of source code and resources for the app) from the Eclipse file menu 2. Choose a project name (can
More informationDeveloping Android Applications
Developing Android Applications SEG2105 - Introduction to Software Engineering Fall 2016 Presented by: Felipe M. Modesto TA & PhD Candidate Faculty of Engineering Faculté de Génie uottawa.ca Additional
More informationMobile Computing Practice # 2a Android Applications - Interface
Mobile Computing Practice # 2a Android Applications - Interface 1. Create an Android Lunch Places List application that allows the user to take note of restaurant characteristics like its name, address
More informationAccelerating Information Technology Innovation
Accelerating Information Technology Innovation http://aiti.mit.edu India Summer 2012 Review Session Android and Web Working with Views Working with Views Create a new Android project. The app name should
More informationINTRODUCTION TO ANDROID
INTRODUCTION TO ANDROID 1 Niv Voskoboynik Ben-Gurion University Electrical and Computer Engineering Advanced computer lab 2015 2 Contents Introduction Prior learning Download and install Thread Android
More informationSolving an Android Threading Problem
Home Java News Brief Archive OCI Educational Services Solving an Android Threading Problem Introduction by Eric M. Burke, Principal Software Engineer Object Computing, Inc. (OCI) By now, you probably know
More informationMVC Apps Basic Widget Lifecycle Logging Debugging Dialogs
Overview MVC Apps Basic Widget Lifecycle Logging Debugging Dialogs Lecture: MVC Model View Controller What is an App? Android Activity Lifecycle Android Debugging Fixing Rotations & Landscape Layouts Localization
More informationMobile Application Development Lab [] Simple Android Application for Native Calculator. To develop a Simple Android Application for Native Calculator.
Simple Android Application for Native Calculator Aim: To develop a Simple Android Application for Native Calculator. Procedure: Creating a New project: Open Android Stdio and then click on File -> New
More informationIPN-ESCOM Application Development for Mobile Devices. Extraordinary. A Web service, invoking the SOAP protocol, in an Android application.
Learning Unit Exam Project IPN-ESCOM Application Development for Mobile Devices. Extraordinary. A Web service, invoking the SOAP protocol, in an Android application. The delivery of this project is essential
More informationMobila applikationer och trådlösa nät, HI1033, HT2012
Mobila applikationer och trådlösa nät, HI1033, HT2012 Today: - User Interface basics - View components - Event driven applications and callbacks - Menu and Context Menu - ListView and Adapters - Android
More informationCS 528 Mobile and Ubiquitous Computing Lecture 2a: Introduction to Android Programming. Emmanuel Agu
CS 528 Mobile and Ubiquitous Computing Lecture 2a: Introduction to Android Programming Emmanuel Agu Editting in Android Studio Recall: Editting Android Can edit apps in: Text View: edit XML directly Design
More informationAND-401 Android Certification. The exam is excluded, but we cover and support you in full if you want to sit for the international exam.
Android Programming This Android Training Course will help you build your first working application quick-quick. You ll learn hands-on how to structure your app, design interfaces, create a database, make
More informationIntroduction To Android
Introduction To Android Mobile Technologies Symbian OS ios BlackBerry OS Windows Android Introduction to Android Android is an operating system for mobile devices such as smart phones and tablet computers.
More informationUpon completion of the second part of the lab the students will have:
ETSN05, Fall 2017, Version 2.0 Software Development of Large Systems Lab 2 1. INTRODUCTION The goal of lab 2 is to introduce students to the basics of Android development and help them to create a starting
More informationWireless Vehicle Bus Adapter (WVA) Android Library Tutorial
Wireless Vehicle Bus Adapter (WVA) Android Library Tutorial Revision history 90001431-13 Revision Date Description A October 2014 Original release. B October 2017 Rebranded the document. Edited the document.
More informationAndroid development. Outline. Android Studio. Setting up Android Studio. 1. Set up Android Studio. Tiberiu Vilcu. 2.
Outline 1. Set up Android Studio Android development Tiberiu Vilcu Prepared for EECS 411 Sugih Jamin 15 September 2017 2. Create sample app 3. Add UI to see how the design interface works 4. Add some code
More informationINTRODUCTION COS MOBILE DEVELOPMENT WHAT IS ANDROID CORE OS. 6-Android Basics.key - February 21, Linux-based.
1 COS 470 - MOBILE DEVELOPMENT INTRODUCTION 2 WHAT IS ANDROID Linux-based Java/Kotlin Android Runtime (ART) System Apps SMS, Calendar, etc. Platform Architecture 3 CORE OS Linux (64 bit) Each app is a
More informationBCA 6. Question Bank
BCA 6 030010601 : Introduction to Mobile Application Development Question Bank Unit 1: Introduction to Android and Development tools Short questions 1. What kind of tool is used to simulate Android application?
More informationCS 370 Android Basics D R. M I C H A E L J. R E A L E F A L L
CS 370 Android Basics D R. M I C H A E L J. R E A L E F A L L 2 0 1 5 Activity Basics Manifest File AndroidManifest.xml Central configuration of Android application Defines: Name of application Icon for
More informationMODULE 2: GETTING STARTED WITH ANDROID PROGRAMMING
This document can be downloaded from www.chetanahegde.in with most recent updates. 1 MODULE 2: GETTING STARTED WITH ANDROID PROGRAMMING Syllabus: What is Android? Obtaining the required tools, Anatomy
More informationAndroid Application Development 101. Jason Chen Google I/O 2008
Android Application Development 101 Jason Chen Google I/O 2008 Goal Get you an idea of how to start developing Android applications Introduce major Android application concepts Provide pointers for where
More informationOrientation & Localization
Orientation & Localization Overview Lecture: Open Up Your My Pet App Handling Rotations Serializable Landscape Layouts Localization Alert Dialogs 1 Handling Rotations When the device is rotated, the device
More informationPENGEMBANGAN APLIKASI PERANGKAT BERGERAK (MOBILE)
PENGEMBANGAN APLIKASI PERANGKAT BERGERAK (MOBILE) Network Connection Web Service K Candra Brata andra.course@gmail.com Mobille App Lab 2015-2016 Network Connection http://developer.android.com/training/basics/network-ops/connecting.html
More informationAndroid Programming Lecture 9: Two New Views 9/30/2011
Android Programming Lecture 9: Two New Views 9/30/2011 ListView View Using ListViews is very much like using Spinners Build off an array of data Events on the list happen at a particular position ListView
More informationJava Training Center - Android Application Development
Java Training Center - Android Application Development Android Syllabus and Course Content (3 months, 2 hour Daily) Introduction to Android Android and it's feature Android releases and Versions Introduction
More information10/27/17. Network Connec1on. Outline. Connect to the Internet. Connect to the Internet. Perform Network Operations. Perform Network Operations
Connecting to the Internet Outline Network Connec1on CS443 Mobile Applica1ons Instructor: Bo Sheng Perform network operations Manage network usage Parsing data 1 2 Connect to the Internet Permissions in
More informationAnnouncements. Android: n-puzzle Walkthrough. Tommy MacWilliam. Dynamic GUIs. ListViews. Bitmaps. Gameplay. Saving State. Menus
Harvard University February 22, 2012 Announcements Lecture videos: https://www.cs76.net/lectures Section videos: https://www.cs76.net/sections videos: https://www.cs76.net/projects Today dynamic GUIs bitmaps
More informationUser Interface Development. CSE 5236: Mobile Application Development Instructor: Adam C. Champion Course Coordinator: Dr.
User Interface Development CSE 5236: Mobile Application Development Instructor: Adam C. Champion Course Coordinator: Dr. Rajiv Ramnath 1 Outline UI Support in Android Fragments 2 UI Support in the Android
More informationCOMP4521 EMBEDDED SYSTEMS SOFTWARE
COMP4521 EMBEDDED SYSTEMS SOFTWARE LAB 1: DEVELOPING SIMPLE APPLICATIONS FOR ANDROID INTRODUCTION Android is a mobile platform/os that uses a modified version of the Linux kernel. It was initially developed
More informationIntroduction To JAVA Programming Language
Introduction To JAVA Programming Language JAVA is a programming language which is used in Android App Development. It is class based and object oriented programming whose syntax is influenced by C++. The
More informationCS 4518 Mobile and Ubiquitous Computing Lecture 4: Data-Driven Views, Android Components & Android Activity Lifecycle Emmanuel Agu
CS 4518 Mobile and Ubiquitous Computing Lecture 4: Data-Driven Views, Android Components & Android Activity Lifecycle Emmanuel Agu Announcements Group formation: Projects 2, 3 and final project will be
More informationThe Internet. CS 2046 Mobile Application Development Fall Jeff Davidson CS 2046
The Internet CS 2046 Mobile Application Development Fall 2010 Announcements HW2 due Monday, 11/8, at 11:59pm If you want to know what it means to root your phone, or what this does, see Newsgroup HW1 grades
More informationChapter 3: Engage! Android User Input, Variables, and Operations
Chapter 3: Engage! Android User Input, Variables, and Operations Objectives In this chapter, you learn to: Use an Android theme Add a theme to the Android Manifest file Develop the user interface using
More informationUpcoming Assignments Quiz Friday? Lab 5 due today Alpha Version due Friday, February 26
Upcoming Assignments Quiz Friday? Lab 5 due today Alpha Version due Friday, February 26 Inject one subtle defect (fault seeding) To be reviewed by a few class members Usability study by CPE 484 students
More informationLECTURE NOTES OF APPLICATION ACTIVITIES
Department of Information Networks The University of Babylon LECTURE NOTES OF APPLICATION ACTIVITIES By College of Information Technology, University of Babylon, Iraq Samaher@inet.uobabylon.edu.iq The
More informationProgramming Android UI. J. Serrat Software Design December 2017
Programming Android UI J. Serrat Software Design December 2017 Preliminaries : Goals Introduce basic programming Android concepts Examine code for some simple examples Limited to those relevant for the
More informationFragments. Lecture 11
Fragments Lecture 11 Situational layouts Your app can use different layouts in different situations Different device type (tablet vs. phone vs. watch) Different screen size Different orientation (portrait
More informationDeveloped and taught by well-known Contact author and developer. At public for details venues or onsite at your location.
2011 Marty Hall Android Programming Basics Originals of Slides and Source Code for Examples: http://www.coreservlets.com/android-tutorial/ Customized Java EE Training: http://courses.coreservlets.com/
More information