It is an introduction session for Android Development.
Agenda:-
- What is Android ?
- What tools will be used in development ?
- Installation and configuration
- First App “Hello World Example” and Run it
- What files exists in Android project ?
- How to install App in real phone or tablet ?
- How to publish App in Google Play ?
2. Agenda
What is Android ?
What tools will be used in development ?
Installation and configuration
First App “Hello World Example” and Run it
What files exists in Android project ?
How to install App in real phone or tablet ?
How to publish App in Google Play ?
3. What is Android ?
An open-source software platform
Used primarily to power mobile phones
The open and customizable nature of
Android allows it to be used on other
electronics
Laptops, Tablets
Smart TVs (Google TV)
Cameras (Galaxy Camera)
Smart Glasses (Google Glass)
Android@Home
5. Installation
Install JRE
Unpack the ZIP file (named adt-bundle-
<os_platform>.zip) and save it to an
appropriate location, such as a
"Development" directory in your home
directory.
Open the adt-bundle-
<os_platform>/eclipse/ directory and
launch eclipse.
a set of programming tools for
developing Java applications.
6. Hello World
Creating a New Project
1. In Eclipse, choose File→New→Android Application Project
If Android Project is not an option under File→New, choose Other and look
for Android Project in there.
2. Type „HelloWorld‟ as a project name
A project name should be one word. (“CamelCase” naming convention is
preferred)
3. Next, you need to choose the build target.
The build target tells the build tools which version of the Android
platform you are building for.
4. You need to fill out your project properties next.
“The application name “: is the plain English name of your application.
“The package name”: for example „android.section‟
5. Specify An activity that is going to be represented by a Java class.
Its name should adhere to Java class naming conventions: start with
an upper-case letter and use CamelCase to separate words.
So, type „HelloWorld‟ for your activity name or leave it as
„HelloWorldActivity‟.
6. Finally, click on the Finish button, and Eclipse will create your project.
7. Hello World
app name that
appears to users
name of your
project directory
and the name
visible in Eclipse.
namespace for your
app
8. Run - Hello World
First, We will create new Android Virtual Machine
(AVD)
In Eclipse, Window AVD Manager New
Specify Name then target (2.1)
Finally, Create AVD
Then right click on the project run as
Android Application
9. src
Contains the .java source files for your project
Android Project Files
gen
Contains the R.java file, a compiler-generated file
that references all the resources found in your
project. You should not modify this file
assets
Contains all the raw data used by your application,
such as HTML, text files, databases … etc
10. bin
Contains output directory of the build. This is where
you can find the final .apk file and other compiled
resources
Android Project Files
libs
Contains project libraries
res
Contains all the resources used in your application
11. res/drawable
Contains bitmap files (PNG, JPEG, or GIF)
Android Project Files
res/layout
Contains definition for the user interface (UI) of your
application
res/menu
Contains XML files that define application menus
12. res/values
Contains XML files that contain a collection of
resources, such as string and color definitions
Android Project Files
res/values/strings
Contains all the strings in our program
AndroidManifest.xml
The control file that describes the nature of the
application
What permissions are requested, and external libs
needed
What API Levels are supported or required
13. Install App
Copy the APK file to your Android’s memory
card and insert the card into your phone.
Download and install the Apps Installer
application from the Android Market
Once installed, the Apps Installer will display
the APK files on the memory card.
Click and install your APK files.
14. Publish App
Visit the Google Play Developer Console at
https://play.google.com/apps/publish/.
Enter basic information about your developer identity
— developer name, email address, and so on. You
can modify this information later.
Read and accept the Developer Distribution
Agreement that applies to your country or region.
Note that apps and store listings that you publish on
Google Play must comply with the Developer
Program Policies and US export law
Pay a $25 USD registration fee using Google Wallet. If
you don't have a Google Wallet account, you can
quickly set one up during the process.
15. When you need to select your Emulator
device (mobile, tablet) manually
Go to Run Run Configurations Target tab
Always prompt to pick device.
Note