Mobile Applications (Android Programming)

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.
Mobile Application Development
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of Creating Eclipse plug-ins.
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
CS371m - Mobile Computing Audio.
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
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 9: Customize! Navigating with a Master/Detail.
Introducing the Sudoku Example
© Keren Kalif Intro to Android Development Written by Keren Kalif, Edited by Liron Blecher Contains slides from Google I/O presentation.
Favorite Twitter® Searches App Android How to Program © by Pearson Education, Inc. All Rights Reserved.
Chapter 2: Simplify! The Android User Interface
Copyright© Jeffrey Jongko, Ateneo de Manila University Android.
CS378 - Mobile Computing Intents.
Android for Java Developers Denver Java Users Group Jan 11, Mike
Chapter 2 The Android User Interface. Objectives  In this chapter, you learn to:  Develop a user interface using the TextView, ImageView, and Button.
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
COMP 365 Android Development.  Every android application has a manifest file called AndroidManifest.xml  Found in the Project folder  Contains critical.
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 2: Simplify! The Android User Interface.
© 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.
Creating an Example Android App in Android Studio Activity lifecycle & UI Resources.
Android Security Model that Provide a Base Operating System Presented: Hayder Abdulhameed.
First Venture into the Android World Chapter 1 Part 2.
 Installation of Android Development Environment  Creating the App with OpenGL ES API  Running the App on Emulator Android App Development.
TODAY Android Studio Installation Getting started Creating your 1 st App Beginning to understanding Intents.
The Ingredients of Android Applications. A simple application in a process In a classical programming environment, the OS would load the program code.
CS371m - Mobile Computing Intents 1. Allow us to use applications and components that are already part of Android System – start activities – start services.
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
Cosc 4735 Nougat API 24+ additions.
Chapter 2: Simplify! The Android User Interface
Mobile Applications (Android Programming)
Workshop by T.Naveen sai kumar.
Android Application -Architecture.
Reactive Android Development
Android Mobile Application Development
Mobile Applications (Android Programming)
Mobile Applications (Android Programming)
Android 01: Fundamentals
Mobile Applications (Android Programming)
Mobile Application Development BSCS-7 Lecture # 2
Chapter 2 Starting a Project
Architecture of Android
ANDROID AN OPEN HANDSET ALLIANCE PROJECT
Android Runtime – Dalvik VM
Mobile Applications (Android Programming)
Android Studio, Android System Basics and Git
Android.
Mobile Applications (Android Programming)
MAD.
Activities and Intents
Mobile Application Development Chapter 4 [Android Navigation and Interface Design] IT448-Fall 2017 IT448- Fall2017.
CMPE419 Mobile Application Development
Mobile Device Development
Anatomy of an Android Application
Android Programming Lecture 5
Android Developer Fundamentals V2 Lesson 1
Android Developer Fundamentals V2
Mobile Applications (Android Programming)
Activities and Intents
Android Platform, Android App Basic Components
Emerging Platform#3 Android & Programming an App
Mobile Programming Dr. Mohsin Ali Memon.
Introduction to Android
Android Development Tools
Mobile Programmming Dr. Mohsin Ali Memon.
Presentation transcript:

Mobile Applications (Android Programming) Semester II 2016 - 2017 Dr. Saman Mirza Abdullah

Class Objective The objective of this class is: What is Fragments? Organizing Activity components with Fragments. Intent : Activities communication and transition Manifest file content. Mobile Application - Ishik

Activity and Screen Until version 3.0 (API Level 11, relation between Activity class and Application screen was one-to-one. For each screen in your app, you defined an Activity to manage its user interface For complicated application, this concept doesn't work well. There were times when screen functionality needed to be componentized at a lower level than the Activity class. Therefore, Android 3.0 introduced a new concept called fragments. Mobile Application - Ishik

Fragments A fragment is a chunk of screen functionality or user interface with its own lifecycle that can exist within an activity and is represented by the Fragment class (android.app.Fragment) and several supporting classes. A Fragment class instance must exist within an Activity instance (and its lifecycle), but fragments need not be paired with the same Activity class each time they are instantiated. Mobile Application - Ishik

Fragments work flow activities How they make application more flexible? An example on MP3 music player application. (without fragments) Mobile Application - Ishik

Fragments work flow activities How they make application more flexible? An example on MP3 music player application. (with Fragments) Mobile Application - Ishik

Intents It is communication between two Activities. It is the management of Activities transition (A process of changing the state to another / from one activities to another). Activity states are necessary to be considered while a transition is applying. We need to understand the states of activies. Mobile Application - Ishik

Activity States and Intents Any activity class may has one of the following states: Mobile Application - Ishik

Activity States Example When an application start up with a Menu scree and then goes to the screen on one items of the menu that permanently discard the menu screen. User cannot go back to the start up screen. Methods used are: StratActivity() Finish() Screens can temporary discard main screen. onpause(). onResume(). Mobile Application - Ishik

Lunching New Activities There are different ways to lunch new Activities from main ones. The simplest one is using context object: Calling through the class name of an Activity. The object calls startActivity() method. It has only one parameter, Intent. The intent requests the lunch of target activity, which is named by MyDrawActivity as a class. The code used to transition between two Activities. It can be used for requesting data between Activities. Mobile Application - Ishik

Transitions and Intents Android applications are flexible for selecting an entry point. An Activity can be designated as an entry point. It should be mentioned in the AndroidMainfes.xml file. Other Activities could be chosen and lunched from main lunched Activity. Music playlist application is the main Activity lunched, and the playlist Activity could be pointed for lunching. Mobile Application - Ishik

Lunch Another Activity An Intent can be used to call / lunch an activity of other application. An application needs to call a customer, and needs to used the call number inside the contact number application. Uri, is Uniform Resource Identifier. Mobile Application - Ishik

Core Files and Directories Every Android application has a set of core files that are created and used to define the functionality of the application. The following files are created by default with a new Android application: AndroidManifest.xml—the central configuration file for the application. It defines your application’s capabilities and permissions as well as how it runs. Mobile Application - Ishik

Core Files and Directories Every Android application has a set of core files that are created and used to define the functionality of the application. The following files are created by default with a new Android application: AndroidManifest.xml—the central configuration file for the application. It defines your application’s capabilities and permissions as well as how it runs. Android application uses this special configuration file to set the properties of the android project. Mobile Application - Ishik

Core Files and Directories Android application uses this special configuration file to set the properties of the android project, such as Application name Application version Permissions to get other applications Permissions to open for other applications Components that composed the application Application’s identity Mobile Application - Ishik

Core Files and Directories Android Manifest.xml file The Android application manifest file is a specially formatted XML file. Should be exist within an Android application. It comes with the name AndroidManifest.xml. Should come at the top of the application. Mobile Application - Ishik

Core Files and Directories Android Manifest.xml file The file used by the Android system to Install and upgrade the application package. Display the application details. Specify application system requirements, including which Android SDKs are supported, what device configurations are required (for example, D-pad navigation), and which platform features the application relies upon (for example, multi-touch capabilities) Register application activities and when they should be launched. Manage application permission Specify Intent processes. Android project wizard creates AndroidManifest.xml file, while IDE Android is using. Mobile Application - Ishik

Editing Android Manifest.xml file The file is at the top level of Android application. Android IDE manifest file resource editor could be used to edit the project manifest file. The Android IDE manifest file resource editor organizes the manifest information into categories: The Manifest tab The Application tab The Permissions tab The Instrumentation tab The AndroidManifest.xml tab Mobile Application - Ishik

Manifest taps Mobile Application - Ishik

Manifest taps The Manifest tab contains package-wide settings, including the package name, version information, and supported Android SDK information. Can also set any hardware or feature requirements here. Mobile Application - Ishik

Application taps The Application tab contains application-wide settings, including The application label and icon, As well as information about the application components, such as activities, Other application components, including configuration for services, Intent filters, and Content providers. Mobile Application - Ishik

Permissions and Instrumentation taps The Permissions tab contains any permission rules required by your application. This tab can also be used to enforce custom permissions created for the application. The Instrumentation tab allows the developer to declare any instrumentation classes for monitoring the application. Mobile Application - Ishik

Editing Manifest Manually Mobile Application - Ishik

Editing Manifest Manually Mobile Application - Ishik

Summary of the file Here is a summary of what this file tells us about the SimpleMultimedia application: The application uses the package name com.introtoandroid.simplemultimedia. The application version name is 1.0. The application version code is 1. The application name and label are stored in the resource string called @string/ app_name within the /res/values/strings.xml resource file. Mobile Application - Ishik

Summary of the file The application is debuggable on an Android device. The application icon is the graphics file called ic_launcher (which could be a PNG, JPG, or GIF) stored within the /res/drawable-* directory (there are actually multiple versions for different pixel densities). The application has four activities (SimpleMultimediaActivity, AudioActivity, StillImageActivity, and VideoPlayActivity). SimpleMultimediaActivity is the primary entry point for the application because it handles the action android.intent.action.MAIN. This Activity shows in the application launcher, because its category is android.intent.category.LAUNCHER. Mobile Application - Ishik

Summary of the file The application requires the following permissions to run: the ability to write settings, the ability to record audio, the ability to set the wallpaper on the device, the ability to access the built-in camera, the ability to communicate over the Internet, and the ability to write to external storage. The application works from any API level from 10 to 18; in other words, Android SDK 2.3.3 is the lowest supported platform version, and the application was written to target Jelly Bean MR2 (for example, Android 4.3). Finally, the application requests to use the camera with the <uses-feature> tag Mobile Application - Ishik

Class End Mobile Application - Ishik