Mobile Device Development

Slides:



Advertisements
Similar presentations
Application Fundamentals Android Development. Announcements Posting in D2L Tutorials.
Advertisements

Android 101 Application Fundamentals January 29, 2010.
Android Life Cycle CS328 Dick Steflik. Life Cycle The steps that an application goes through from starting to finishing Slightly different than normal.
Basic, Basic, Basic Android. What are Packages? Page 346 in text Package statement goes before any import statements Indicates that the class declared.
Android Application Development with Java UPenn CS4HS 2011 Chris Murphy
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
INTERNATIONAL SUMMER ACADEMIC COURSE UNIVESITY OF NIS ISAC – Android programming.
Emerging Platform#4: Android Bina Ramamurthy.  Android is an Operating system.  Android is an emerging platform for mobile devices.  Initially developed.
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.
© Keren Kalif Intro to Android Development Written by Keren Kalif, Edited by Liron Blecher Contains slides from Google I/O presentation.
Android Programming By Mohsen Biglari Android Programming, Part1: Introduction 1 Part1: Introduction By Mohsen Biglari.
Intro to Android Development Ben Lafreniere. Getting up and running Don’t use the VM! ials/hello-world.html.
Copyright© Jeffrey Jongko, Ateneo de Manila University Android.
CS378 - Mobile Computing Intents.
CE Applied Communications Technology Android lecture 2 - Structures Android File structure Resources Drawables Layout Values R Class Manifest Running.
Android for Java Developers Denver Java Users Group Jan 11, Mike
Overview of Android Application Development
CS378 - Mobile Computing Intents. Allow us to use applications and components that are part of Android System – start activities – start services – deliver.
Configuring Android Development Environment Nilesh Singh.
First Venture into the Android World Chapter 1 Part 2.
Announcements Homework #2 will be posted after class due Thursday Feb 7, 1:30pm you may work with one other person No office hours tonight (sorry!) I will.
Google map v2.
Resources & Android Manifest Калин Кадиев Astea Solutions AD.
CMPE419 Mobile Application Development Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren
CMPE419 Mobile Application Development Asst.Prof.Dr.Ahmet Ünveren SPRING Computer Engineering Department Asst.Prof.Dr.Ahmet Ünveren
CHAPTER 1 part 1 Introduction. Chapter objectives: Understand Android Learn the differences between Java and Android Java Examine the Android project.
Introduction to Android Programming
Introduction to Android Chapter 1 1. Objectives Understand what Android is Learn the differences between Java and Android Java Examine the Android project.
Android Programming.
Workshop by T.Naveen sai kumar.
Lab7 – Appendix.
Google VR (gvr) CardBoard and DayDream With OpenGL
Reactive Android Development
Android Programming - Features
Mobile Applications (Android Programming)
Android Mobile Application Development
Lecture 3 Zablon Ochomo Android Layouts Lecture 3 Zablon Ochomo
Android Introduction Hello World
Lecture 2: Android Concepts
Android 01: Fundamentals
Android Application Development 1 6 May 2018
Reactive Android Development
Android Runtime – Dalvik VM
Mobile Computing With Android ACST 4550 Intro to Android, Part 1
Android Studio, Android System Basics and Git
Android Introduction Hello World.
XML Mihail L. Sichitiu.
Broadcast Receivers A Android Component where you can register for system or application events, receive and react to broadcast intent. Each broadcast.
Mobile Software Development for Android - I397
Android Introduction Camera.
Anatomy of an Android Application
CIS 470 Mobile App Development
CIS 470 Mobile App Development
CIS 470 Mobile App Development
Android Programming Lecture 5
Many thanks to Jun Bum Lim for his help with this tutorial.
CMPE419 Mobile Application Development
Chapter 1: Basics of Android, First App: HelloAndroid
Android Topics Android Activity Lifecycle and Experiment Toast
HNDIT2417 Mobile Application Development
CIS 470 Mobile App Development
Emerging Platform#3 Android & Programming an App
Lecture 2: Android Concepts
BLP 4216 MOBİL UYGULAMA GELİŞTİRME-2
CMPE419 Mobile Application Development
CMPE419 Mobile Application Development
Chapter 5 Your Second Activity.
Mobile Programming Broadcast Receivers.
Presentation transcript:

Mobile Device Development The Role of the Android Manifest File 1

Agenda Common Features App Permissions User Permissions Device Permissions 2

Common Features App name and package details Target and minimum SDK versions Permitted Activities Device features and services used by the app Permission to use devices and services Some manifest items are API specific 3

Manifest (Hello World) <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.barrydean.helloworld"> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest> 4

Additional Features Permissions to: Access to app features e.g. Address Book Access hardware e.g. camera Write to external storage Use media components – Audio and Video 5

<uses feature> Declares a single hardware or software feature that is used by the application. You must specify each feature in a separate <uses-feature> element. If your application requires multiple features, it would declare multiple <uses-feature> elements. An application that requires both Bluetooth and camera features in the device would declare these two elements: <uses-feature android:name="android.hardware.bluetooth" /> <uses-feature android:name="android.hardware.camera" /> 6

<uses permission> Requests a permission that the application must be granted in order for it to operate correctly. Permissions are granted by the user when the application is installed (on devices running Android 5.1 and lower) or while the app is running (on devices running Android 6.0 and higher). 7

SDK Versions // Gradle handles this information in Android Studio <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.barrydean.cameraone" android:versionCode="1" android:versionName="1.0"> <uses-sdk android:minSdkVersion="17" android:targetSdkVersion="19" /> // Gradle handles this information in Android Studio

Device Permissions <uses-feature android:name="android.hardware.Camera" /> <uses-feature android:name="android.hardware.Camera.autofocus" /> <uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.CAMERA" /> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name">

Activity <activity android:name="com.example.barrydean.cameraone.MainActivity" android:configChanges="orientation" android:label="@string/app_name" android:screenOrientation="portrait"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>

Summary Every application must have an AndroidManifest.xml file (with precisely that name) in its root directory. The manifest file provides essential information about the app to the Android system, which the system must have before it can run any of the app's code. It names the Java package for the application. The package name serves as a unique identifier for the application. The Target SDK version and Minimum SDK version for the app. It describes the components of the application e.g. the activities. It declares device features the application will access e.g. the camera It declares permissions the app will require to access such as hardware and write file access to external storage. 11