CS323 Android Topics Network Basics for an Android App

Slides:



Advertisements
Similar presentations
1. XP 2 * The Web is a collection of files that reside on computers, called Web servers. * Web servers are connected to each other through the Internet.
Advertisements

XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
® Microsoft Office 2010 Browser and Basics.
4.01 How Web Pages Work.
Skills: none Concepts: data and program files, IP packet, packet header, packet body, IP address, host name This work is licensed under a Creative Commons.
XP Browser and Basics1. XP Browser and Basics2 Learn about Web browser software and Web pages The Web is a collection of files that reside.
IT skills: IT concepts: Web client (browser), Web server, network connection, URL, mobile client, peer-to- peer application This work is licensed under.
Topics in this presentation: The Web and how it works Difference between Web pages and web sites Web browsers and Web servers HTML purpose and structure.
Browsing the World Wide Web. Spring 2002Computer Networks Applications Browsing Service Allows one to conveniently obtain and display information that.
Browser and Basics Tutorial 1. Learn about Web browser software and Web pages The Web is a collection of files that reside on computers, called.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
Web Client/Server Communication A290/A590, Fall /09/2014.
2013Dr. Ali Rodan 1 Handout 1 Fundamentals of the Internet.
1 Computer Communication & Networks Lecture 28 Application Layer: HTTP & WWW p Waleed Ejaz
ASHIMA KALRA IMPORTANT TERMS.  WWW WWW  URL URL  HTTP PROTOCOL HTTP PROTOCOL  PROXIES PROXIES.
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
Chapter 1: Introduction to Web Applications. This chapter gives an overview of the Internet, and where the World Wide Web fits in. It then outlines the.
Web Page Design I Basic Computer Terms “How the Internet & the World Wide Web (www) Works”
Introduction to Internet terms. Topics to Study What is Internet HTTP URL SMS MMS Wi-Fi Video Conferencing Social Webisites.
HOW WEB SERVER WORKS? By- PUSHPENDU MONDAL RAJAT CHAUHAN RAHUL YADAV RANJIT MEENA RAHUL TYAGI.
Murach’s ASP.NET 4.0/VB, C1© 2006, Mike Murach & Associates, Inc.Slide 1.
CS378 - Mobile Computing Intents. Allow us to use applications and components that are part of Android System – start activities – start services – deliver.
ITEC 1001 Tutorial 1 Browser and Basics. Web browser software & Web pages The Web is a collection of files that reside on computers, called Web.
The Inter-network is a big network of networks.. The five-layer networking model for the internet.
Internet Protocol B Bhupendra Ratha, Lecturer School of Library and Information Science Devi Ahilya University, Indore
The Web and Web Services Jim Graham NR 621 Spring 2009.
Jsp (Java Server Page) Is a server side program.
Server - Client Communication Getting data from server.
Murach's HTML5 and CSS3, C1© 2012, Mike Murach & Associates, Inc. Slide 1.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
CSCI-235 Micro-Computers in Science The Internet and World Wide Web.
COSC 2328 – Web Programming.  PHP is a server scripting language  It’s widely-used and free  It’s an alternative to Microsoft’s ASP and Ruby  PHP.
USING ANDROID WITH THE INTERNET. Slide 2 Lecture Summary Getting network permissions Working with the HTTP protocol Sending HTTP requests Getting results.
Internet and World Wide Web Introduction to the Internet.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
4.01 How Web Pages Work.
Distributed OS.
4.01 How Web Pages Work.
4.01 How Web Pages Work.
Introduction to the WWW
CISC103 Web Development Basics: Web site:
Authentication & .htaccess
Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
E-commerce | WWW World Wide Web - Concepts
E-commerce | WWW World Wide Web - Concepts
CASE STUDY -HTML,URLs,HTTP
Some bits on how it works
Some Common Terms The Internet is a network of computers spanning the globe. It is also called the World Wide Web. World Wide Web It is a collection of.
Tutorial (4): HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
IS333D: MULTI-TIER APPLICATION DEVELOPMENT
Essentials of Web Pages
Computer Communication & Networks
Web Site Development.
Navigating The World Wide Web
Client side & Server side scripting
Application layer Lecture 7.
ACT102 Introduction to web design
Web Design & Development
CS134 Web Design & Development
ACT102 Introduction to web design
Hyper Text Transfer Protocol
HyperText Transfer Protocol
Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Introduction to World Wide Web
4.01 How Web Pages Work.
Computer Networks Protocols
4.01 How Web Pages Work.
* Web Servers/Clients * The HTTP Protocol
Presentation transcript:

CS323 Android Topics Network Basics for an Android App HTTP Requests and Responses Android Networking Tasks Access Permissions Build a simple App to test concepts

Android Networking - Concept Data is requested that is hosted on a web server. How does it get from the web server to your application? This involves a couple of things: Android access permissions HTTP requests Background thread, to make the network process efficient.

Basics of Android Networking A networked Android App consists of a client, a web server, and a network. A server holds data files that we wish to access. The Android device is a client. Server data is accessed through an HTTP request. A client requests data through the HTTP request and the server response with a return of the data.

HTTP Request and Response Tasks To access data located on a server, an app must build a request for the data and send it to the server. An HyperText Transfer Protocol (HTTP) request is built. The requested file or data is specified. When the server receives the HTTP request, it retrieves the requested file and returns it as part of the HTTP response.

Host/domain/authority HTTP request example: Query: Often times, an http data request will include the URL and a data query. Host/domain/authority http://example.com/animal/tarsier?diet=carnivore&active=night Protocol/scheme Resource path

Networking Steps for Android Step 1: Using a background thread, create and send a HTTP request to the server. Include all necessary request information. NOTE: An http request is sent specifically to a URL. Step 2: Once the server replies, receive the response and parse it into something an Android app will understand. Step 3: Using the main thread, update the UI to show the results from the HTTP request.

User Permissions Question and Answers

User Permissions Question: Does an Android app automatically have access to the Internet?

User Permissions Answer: By default, an Android app does NOT have access to the Internet.

User Permissions Question: What happens if you do not provide appropriate permissions?

User Permissions Answer: If a necessary system permission is not granted, the app may not operate correctly.

User Permissions Question: Where do you declare app permissions?

User Permissions Answer: App permissions are declared in the Android Manifest file.

User Permission Examples: A permission is defined by an app with a  permission element. Example 1: "android.permission.CAMERA"  Example 2: "android.permission.READ_CONTACTS” Example 3: "android.permission.INTERNET" Example 4: "android.permission.ACCESS_NETWORK_STATE"

Network Permissions The manifest must include the following permissions: <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

Explore Useful Permissions

Build the App from Lab 8 Exercise 1 Build the App from Lab 8 Exercise 1. Click the button to retrieve an image from a server and display it in an ImageView.