Minds-on: Android. Session 1

Similar documents
Android. Lesson 1. Introduction. Android Developer Fundamentals. Android Developer Fundamentals. to Android 1

Android App Development. Ahmad Tayeb

Mobile development initiation

Introduction to Android

Android System Architecture. Android Application Fundamentals. Applications in Android. Apps in the Android OS. Program Model 8/31/2015

ANDROID SYLLABUS. Advanced Android

Android App Development. Muhammad Sharjeel COMSATS Institute of Information Technology, Lahore

Introduction To Android

Android App Development

Introduction to Android

Android. Mobile operating system developed by Google A complete stack. Based on the Linux kernel Open source under the Apache 2 license

Introduction to Android development

SD Module- Android Programming

Pemrograman Mobile. Lesson 1. Introduction to Android. Create Your First Android App. Nizar Rabbi Radliya

Android App Development

Syllabus- Java + Android. Java Fundamentals

Mobile Programming Lecture 1. Getting Started

COSC 3P97 Mobile Computing

(Refer Slide Time: 0:48)

Minds-on: Android. Session 2

Android Programming in Bluetooth Cochlea Group

Course Syllabus. Course Title. Who should attend? Course Description. Android ( Level 1 )

ATC Android Application Development

Android Overview. Most of the material in this section comes from

Introduction to Android Android Smartphone Programming. Outline University of Freiburg. What is Android? Background University of Freiburg.

CS260 Intro to Java & Android 04.Android Intro

ANDROID TRAINING PROGRAM COURSE CONTENT

Praktikum Mobile und Verteilte Systeme. Android-Basics. Prof. Dr. Claudia Linnhoff-Popien André Ebert, Sebastian Feld

Android-Basics. Praktikum Mobile und Verteilte Systeme. Prof. Dr. Claudia Linnhoff-Popien André Ebert, Sebastian Feld

Android-Basics. Praktikum Mobile und Verteilte Systeme

CS 4518 Mobile and Ubiquitous Computing Lecture 2: Introduction to Android. Emmanuel Agu

Software Development & Education Center ANDROID. Application Development

OWASP German Chapter Stammtisch Initiative/Ruhrpott. Android App Pentest Workshop 101

Hello World. Lesson 1. Create your first Android. Android Developer Fundamentals. Android Developer Fundamentals

Java Training Center - Android Application Development

MARS AREA SCHOOL DISTRICT Curriculum TECHNOLOGY EDUCATION

Mobile and Wireless Systems Programming

Basic Android Setup for Machine Vision Fall 2015

1. Implementation of Inheritance with objects, methods. 2. Implementing Interface in a simple java class. 3. To create java class with polymorphism

ANDROID DEVELOPMENT. Course Details

Mobile OS. Symbian. BlackBerry. ios. Window mobile. Android

Manual Android Virtual Device Failed To Load Click Details

Android Application Development Course Code: AND-401 Version 7 Duration: 05 days

Android Studio for Windows

Mobile and Social Computing

Android Studio is google's official IDE(Integrated Development Environment) for Android Developers.

Developer s overview of the Android platform

Chapter 2 Setting Up for Development

Lecture 08. Android Permissions Demystified. Adrienne Porter Felt, Erika Chin, Steve Hanna, Dawn Song, David Wagner. Operating Systems Practical

Android Development Crash Course

Lab Android Development Environment

File Synchronization using API Google Drive on Android Operating System

Lab 3: Using Worklight Server and Environment Optimization Lab Exercise

Android Online Training

Android ATC Android Security Essentials Course Code: AND-402 version 5 Hands on Guide to Android Security Principles

Android. (XKE Mars 2009) Erwan Alliaume.

CS 528 Mobile and Ubiquitous Computing Lecture 1b: Introduction to Android. Emmanuel Agu

Mobile Computing LECTURE # 2

Mobile Application Development

IJRDTM Kailash ISBN No Vol.17 Issue

ORACLE UNIVERSITY AUTHORISED EDUCATION PARTNER (WDP)

COLLEGE OF ENGINEERING, NASHIK-4

Required Core Java for Android application development

Introduction to Xamarin Cross Platform Mobile App Development

Mobile Application Development

Programming with Android: System Architecture. Dipartimento di Scienze dell Informazione Università di Bologna

Android Essentials with Java

Android Ecosystem and. Revised v4presenter. What s New

Programming Concepts and Skills. Creating an Android Project

Homework 9: Stock Search Android App with Facebook Post A Mobile Phone Exercise

BCA 6. Question Bank

Android Application Development using Kotlin

PAPER ON ANDROID ESWAR COLLEGE OF ENGINEERING SUBMITTED BY:

A Customizable Travel Application- Travel-It

An Introduction to Android. Jason Chen Developer Advocate Google I/O 2008

Mobile and Ubiquitous Computing: Android Programming (part 1)

Choose OS and click on it

ANDROID APPLICATION PROGRAMMING

Questions and Answers. Q.1) Which of the following is the most ^aeuroeresource hungry ^aeuroepart of dealing with activities on android?

Android Apps. with Eclipse. Apress. Onur Cinar

ANDROID APPLICATION DEVELOPMENT PROSPECTUS ADAAD UNIVERSITY OF SKILLS

(Refer Slide Time: 1:12)

ITG Software Engineering

android application development CONTENTS 1.1 INTRODUCTION TO O ANDROID OPERATING SYSTEM... TURES Understanding the Android Software Stack...

INTRODUCTION COS MOBILE DEVELOPMENT WHAT IS ANDROID CORE OS. 6-Android Basics.key - February 21, Linux-based.

Introduction. Lecture 1. Operating Systems Practical. 5 October 2016

ANDROID NATIVE APP: INTRODUCTION TO ANDROID. Roberto Beraldi

Configuring the Android Manifest File

Android Application Development

SHWETANK KUMAR GUPTA Only For Education Purpose

Wirtschaftsinformatik Skiseminar ao. Prof. Dr. Rony G. Flatscher. Seminar paper presentation Dennis Robert Stöhr

IGEEKS TECHNOLOGIES. Software Training Division. Academic Live Projects For BE,ME,MCA,BCA and PHD Students

Android App Development Workshop

Applications. Marco Ronchetti Università degli Studi di Trento

Android Development Tools = Eclipse + ADT + SDK

Android Application Sandbox. Thomas Bläsing DAI-Labor TU Berlin

IEMS 5722 Mobile Network Programming and Distributed Server Architecture

Index. Alessandro Del Sole 2017 A. Del Sole, Beginning Visual Studio for Mac,

ANDROID. Curriculum LOCATION CONTACT US SCHEDULE. TurnToTech 40 Rector St. 10th Floor New York, NY

Programming with Android: System Architecture. Luca Bedogni. Dipartimento di Scienze dell Informazione Università di Bologna

Transcription:

Minds-on: Android Session 1 Paulo Baltarejo Sousa Instituto Superior de Engenharia do Porto 2016

Outline Mobile devices Android OS Android architecture Android Studio Practice 1 / 33

2 / 33 Mobile devices

Overview Mobile devices have outsold traditional desktop and laptop computers continuously for nearly four years at this point. The definition of work on a computer is changing and adapting to what devices people are buying 1. Shopping goes mobile. Mobile shopping spiked 60 percent this year (2015) 2. 1 www.zdnet.com/article/when-mobile-takes-over-pc-desktops-laptops/ 2 www.comscore.com/insights/videos/interview/shopping-goes-mobile-mobile-shopping-spiked-60-percent-this-year 3 / 33

Mobile users Numbers 3 How often do you check your phone? Smartphone users check their phones an average of 150 times a day 4 The average person does it 110 times a day (and up to every 6 seconds in the evening)... some users unlocking their devices up to 900 times over the course of a day 5 3 www.smartinsights.com/mobile-marketing/mobile-marketing-analytics/mobile-marketing-statistics/ 4 tech.firstpost.com/news-analysis/smartphone-users-check-their-phones-an-average-of-150-times-a-day-86984.html 5 www.dailymail.co.uk/sciencetech/article-2449632/how-check-phone-the-average-person-does-110-times-day-6- seconds-evening.html 4 / 33

Mobile Operating Systems Mobile Operating System (OS) market share (Dec. 2015) 6 6 www.netmarketshare.com/operating-system-market-share.aspx?qprid=8&qpcustomd=1 5 / 33

6 / 33 Android OS

Overview Android is a mobile OS: Based on the Linux kernel Developed by Google. Designed primarily for mobile devices, such as smartphones and tablets, but nowadays there are specific versions for: Televisions, Cars, and Wear (for wrist watches) Variants of Android are also used on notebooks, game consoles, digital cameras, and other electronics. 7 7 www.androidauthority.com/android-everywhere-10-types-of-devices-that-android-is-making-better-57012/ 7 / 33

Versions Android evolution 8 9 Android compatibility 10 8 cubettech.com/blog/android-1-0-to-android-m-the-story-of-mobile-evolution/ 9 www.android.com/history/#/marshmallow 10 source.android.com/compatibility/index.html 8 / 33

How to develop Android apps Android applications are primarily written in the Java programming language. During development the developer creates the Android specific configuration files and writes the app logic in the Java programming language. The Android tooling converts these app files, transparently to the user, into an Android app (an apk file). When developers trigger the deployment in their Integrated Development Environment (IDE), the whole Android app is compiled, packaged, deployed and started. 9 / 33

10 / 33 Android architecture

Architecture 11 / 33

Runtime Each Android app runs in its own security sandbox: Each process has its own virtual machine (VM), so an app s code runs in isolation from other apps. Every app runs in its own Linux process. Android starts the process when a app is launched, then shuts down the process when it is no longer needed or when the system must recover memory for other applications. Since Android 5.0 Lollipop system, the Dalvik VM has been officially replaced by a new runtime called ART (Android RunTime). 12 / 33

Framework (I) activities: An activity is the key execution component. You need at least one activity in an app that deals with the User Interface (UI). An activity is implemented as a subclass of Activity. fragments: Fragments are relatively new to Android but very important in programming the UI. They are mini-activities. A fragment is implemented as a subclass of Fragment. intents: An Intent is a messaging object you can use to request an action from another app component. Although intents facilitate communication between components in several ways, there are three fundamental use-cases: To start an activity To start a service To deliver a broadcast 13 / 33

Framework (II) services: Typically services are long running programs that do not need to interact with the UI. A service is implemented as a subclass of Service. content providers: Apps could share data. Content providers manage access to a structured set of data. A content provider is implemented as a subclass of ContentProvider. broadcast receivers: A Broadcast receiver allows you to register for system or application events. All registered receivers for an event are notified by the Android runtime once this event happens. A broadcast receiver is implemented as a subclass of BroadcastReceiver and each broadcast is delivered as an Intent object. 14 / 33

App programming model Model-View-Controller (MVC) Actually, Android does not enforce MVC, this is considered a best practice for development. 15 / 33

16 / 33 Android Studio

Overview Android Studio 11 is the official IDE for Android apps development. It includes everything required for developing Android apps: Android SDK Tools Android Platform-tools Android platform versions Android system images (for the emulator) It is based on IntelliJ IDEA and offers 12 Flexible Gradle-based build system Build variants and multiple apk file generation Code templates to help you build common app features... 11 developer.android.com/sdk/index.html 12 developer.android.com/tools/studio/index.html 17 / 33

Setting up the development environment Get the Android Studio from https://developer.android.com/sdk/index.html Setting Up Java Install Android Studio SDK Manager Get SDK tools Get the support library for additional APIs Get Google Play services for even more APIs Install the packages Creating an AVD All this information can be found at: ~pbsousa/android/s1_1.pdf www.dei.isep.ipp.pt/ 18 / 33

IDE - General view 19 / 33

IDE - Code editor 20 / 33

IDE - Logcat 21 / 33

IDE - Toolbar and Project view Toolbar Project view modes 22 / 33

MVC Models: Shared Preferences SQLite Databases Network Connection Internal and External Storage Syncing to the Cloud Views XML files Controllers Java files 23 / 33

Class R All resource IDs are defined in your project s R class, which the aapt tool automatically generates. R class contains resource IDs for all the resources in your res/ directory. For each type of resource, there is an R subclass (for example, R.layout for all layout resources), and for each resource of that type, there is a static integer (for example, R.layout.activity main). This integer is the resource ID that you can use to retrieve your resource. 24 / 33

Android Manifest XML Every application must have a manifest.xml file in its root directory. The manifest file presents essential information about app to the Android system: Java package name for the application: the package name serves as a unique identifier for the application. The components of the application: the activities, services, broadcast receivers, and content providers. Permissions the application. 25 / 33

26 / 33 Practice

First App How to create an Android Studio project Running on emulator Running on a real Device All this information can be found at: ~pbsousa/android/s1_2.pdf www.dei.isep.ipp.pt/ 27 / 33

Building a Simple User Interface Android App (I) Linear Layout 28 / 33

Building a Simple User Interface Android App (II) Supporting Different Languages 29 / 33

Building a Simple User Interface Android App (III) Supporting Different Screens All this information can be found at: ~pbsousa/android/s1_3.pdf www.dei.isep.ipp.pt/ 30 / 33

List view based app (I) List View 31 / 33

List view based app (II) Option menu 32 / 33

List view based app (III) Context menu All this information can be found at: ~pbsousa/android/s1_4.pdf www.dei.isep.ipp.pt/ 33 / 33