Creating an Example Android App in Android Studio Activity lifecycle & UI Resources.

Slides:



Advertisements
Similar presentations
Ando-it-yourself droid Praveen Kumar Pendyala. Outline Brief intro to the Droid developement Setting up the Life saviors - Development tools Hello Droid.
Advertisements

Application Fundamentals Android Development. Announcements Posting in D2L Tutorials.
Chapter 1: Voilà! Meet the Android
Programming Mobile Applications with Android
Joemarie Comeros Amparo Android Development Orientation for Starters.
Programming with Android: SDK install and initial setup Luca Bedogni Marco Di Felice Dipartimento di Informatica: Scienza e Ingegneria Università di Bologna.
All About Android Introduction to Android 1. Creating a New App “These aren’t the droids we’re looking for.” Obi-wan Kenobi 1. Bring up Eclipse. 2. Click.
1 Mobile Computing Mobile First (formerly Worklight) Copyright 2015 by Janson Industries.
Android: Hello World Frank Xu Gannon University. Steps Configuration ▫Android SDK ▫Android Development Tools (ADT)  Eclipse plug-in ▫Android SDK and.
Basic, Basic, Basic Android. What are Packages? Page 346 in text Package statement goes before any import statements Indicates that the class declared.
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
Android Development (Basics)
Software Development. Chapter 3 – Your first Windows 8 app.
Programming with App Inventor Computing Institute for K-12 Teachers Summer 2012 Workshop.
Android Programming. Outline Preparation Create new project Build and Run a project Debug a project Deploy on devices.
Android Application Development 2013 PClassic Chris Murphy 1.
The basics of the Online Portal
Better reference the original webpage :
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.
Chapter 3 Navigating a Project Goals & Objectives 1.Get familiar with the navigation of the project. How is everything structured? What settings can you.
Android 6: Testing and Running the App Kirk Scott 1.
Copyright ©: SAMSUNG & Samsung Hope for Youth. All rights reserved Tutorials Software: Building apps Suitable for: Advanced.
Google Maps Android API v2 吳俊興 國立高雄大學 資訊工程學系 CSF645 – Mobile Computing 行動計算
 Understanding an activity  Starting an activity  Passing information between activities  Understanding intents  Understanding the activity lifecycle.
CS5103 Software Engineering Lecture 08 Android Development II.
Chapter 1: Voilà! Meet the Android
1 Mobile Computing Set Up Copyright 2015 by Janson Industries.
Introduction to Android. Android as a system, is a java based operating system that runs on the Linux kernel. The system is very lightweight and full.
XP New Perspectives on Microsoft PowerPoint 2002 Tutorial 1 1 Microsoft PowerPoint 2002 Tutorial 1 – Creating a PowerPoint Presentation.
IE 411/511: Visual Programming for Industrial Applications
Mobile Application Development using Android Lecture 2.
Setting Up The Android SDK (Software Development Kit) A basic step by step guide leading to set up and your first Hello World App.
Eclipse Tutorial Barrett Summer Scholars 2011 Sustainable Engineering: Learning to Engineer Truly Green Products.
© 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.
INTRODUCTION TO ANDROID. Slide 2 Application Components An Android application is made of up one or more of the following components Activities We will.
0 eCPIC User Training: Resource Library These training materials are owned by the Federal Government. They can be used or modified only by FESCOM member.
Configuring Android Development Environment Nilesh Singh.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Introduction to Android (Part.
Android Hello World 1. Click on Start and type eclipse into the textbox 2.
First Venture into the Android World Chapter 1 Part 2.
ANDROID APPLICATION DEVELOPMENT. ANDROID DEVELOPMENT DEVELOPER.ANDROID.COM/INDEX.HTML THE OFFICIAL SITE FOR ANDROID DEVELOPERS. PROVIDES THE ANDROID SDK.
HTC Android Projector User Guide v Agenda Setup and Demo Environment Launch Projector Installer Launch Projector Application Q&A.
CHAPTER 1 Introduction. Chapter objectives: Understand what Android is Learn the differences between Java and Android Java Examine the Android project.
Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza.
Intoduction to Andriod studio Environment With a hello world program.
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
INTRODUCTION TO ANDROID. Slide 2 Introduction I take a top-down approach to describing an application’s anatomy.
Android apps development - Eclipse, Android SDK, and ADT plugin Introduction of.
Guide To Develop Mobile Apps With Titanium. Agenda Overview Installation of Platform SDKs Pros of Appcelerator Titanium Cons of Appcelerator Titanium.
CHAPTER 1 part 1 Introduction. Chapter objectives: Understand Android Learn the differences between Java and Android Java Examine the Android project.
COM594: Mobile Technology Practical – Week 1 Android and Android Studio.
Mobile Applications (Android Programming)
Android Mobile Application Development
Mobile Application Development BSCS-7 Lecture # 2
Obtaining the Required Tools
Chapter 2 Starting a Project
Android Studio, Android System Basics and Git
Using a template to create a document
Android.
MAD.
T_C_N_L_G_ E D I D I E O Y O H I E B J I R E A A W.
Anatomy of an Android Application
Android SDK & App Development
CS5103 Software Engineering
Phonegap Bridge Configuration file
CHAPTER 1 Introduction Chapter objectives: Understand what Android is
Timelapse with the Veho VMS-001 Microscope
Android Application Development
Presentation transcript:

Creating an Example Android App in Android Studio Activity lifecycle & UI Resources

The first step in the application development process is to create a new project within the Android Studio environment. Begin, therefore, by launching Android Studio so that the “Welcome to Android Studio” screen appears

Once this window appears, Android Studio is ready for a new project to be created. To create the new project, simply click on the Start a new Android Studio project option to display the first screen of the New Project wizard

Application Name :- the name of the mobile app from the end user perspective and is also the name that will be used when the completed application goes on sale in the Google Play store. Project Name:-The name of the project from the developers perceptive. It should be based on the reversed URL of your domain name followed by the name of the application. For example, if your domain is and the application has been named AndroidSample, then the package name might be specified as follows:com.mycompany.androidsample Package name:-the logical namespace used to uniquely identify an app from the Android platform’s perceptive.

AndroidStudioProjects The Project location setting will default to a location in the folder named AndroidStudioProjects located in your home directory and may be changed by clicking on the button to the right of the text field containing the current path setting. Click Next to proceed. API 18: Android 4.3 (jelly bean On the form factors screen, enable the Phone and Tablet option and set the minimum SDK setting to API 18: Android 4.3 (jelly bean). The reason for selecting an older SDK release is that this ensures that the finished application will be able to run on the widest possible range of Android devices. The higher the minimum SDK selection, the more the application will be restricted to newer Android devices.

This outlines the various SDK versions and API levels available for use and the percentage of Android devices in the marketplace on which the application will run if that SDK is used as the minimum level. A useful chart can be viewed by clicking on the Help me choose link. To help in the decision process, selecting an API level from the chart will display the features that are supported at that level.

Creating an Activity The next step is to define the type of initial activity that is to be created for the application. A range of different activity types is available when developing Android applications.

With the Blank Activity option selected, click Next. MainActivity On the final screen name the activity and title MainActivity.

Finally, click on Finish to initiate the project creation process.

Modifying the Example Application At this point, Android Studio has created a minimal example application project and opened the main project. Project tool window The newly created project and references to associated files are listed in the Project tool window located on the left hand side of the main project window. The Project tool window has a number of modes in which information can be displayed. By default, this panel will be in Android mode. This setting is controlled by the drop down menu at the top of the panel. If the panel is not currently in Android mode, click on this menu and switch to Android mode:

The example project created for us when we selected the option to create an activity consists of a user interface containing a label that will read “Hello World” when the application is executed.

The next step is to modify the user interface of our application so that it displays a larger text view object with a different message to the one provided for us by Android Studio. activity_main.xmlapp -> res -> layout in the project file hierarchy. The user interface design for our activity is stored in a file named activity_main.xml which, in turn, is located under app -> res -> layout in the project file hierarchy. Using the Project panel, locate this file as illustrated in Figure.

Once located, double click on the file to load it into the User Interface Designer tool which will appear in the center panel of the Android Studio main window:

src This contains the.java source files for your project. By default, it includes anMainActivity.java source file having an activity class that runs when your app is launched using the app icon. gen This contains the.R file, a compiler-generated file that references all the resources found in your project. You should not modify this file. bin This folder contains the Android package files.apk built by the ADT during the build process and everything else needed to run an Android application. res/drawable-hdpi This is a directory for drawable objects that are designed for high-density screens.

res/layout This is a directory for files that define your app's user interface. res/values This is a directory for other various XML files that contain a collection of resources, such as strings and colours definitions. AndroidManifest.xml This is the manifest file which describes the fundamental characteristics of the app and defines each of its components.