android development session
DESCRIPTION
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 ?TRANSCRIPT
![Page 1: Android development session](https://reader036.vdocuments.net/reader036/viewer/2022083003/5598cfa71a28ab99338b47fb/html5/thumbnails/1.jpg)
Android
Development
Session 1
![Page 2: Android development session](https://reader036.vdocuments.net/reader036/viewer/2022083003/5598cfa71a28ab99338b47fb/html5/thumbnails/2.jpg)
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 ?
![Page 3: Android development session](https://reader036.vdocuments.net/reader036/viewer/2022083003/5598cfa71a28ab99338b47fb/html5/thumbnails/3.jpg)
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
![Page 4: Android development session](https://reader036.vdocuments.net/reader036/viewer/2022083003/5598cfa71a28ab99338b47fb/html5/thumbnails/4.jpg)
Tools
ADT Bundle
Code will be in JAVA
![Page 5: Android development session](https://reader036.vdocuments.net/reader036/viewer/2022083003/5598cfa71a28ab99338b47fb/html5/thumbnails/5.jpg)
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.
![Page 6: Android development session](https://reader036.vdocuments.net/reader036/viewer/2022083003/5598cfa71a28ab99338b47fb/html5/thumbnails/6.jpg)
Hello World
Creating a New Project1. 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.
![Page 7: Android development session](https://reader036.vdocuments.net/reader036/viewer/2022083003/5598cfa71a28ab99338b47fb/html5/thumbnails/7.jpg)
Hello World
app name that appears to users
name of your project directory and the name visible in Eclipse.
namespace for your app
![Page 8: Android development session](https://reader036.vdocuments.net/reader036/viewer/2022083003/5598cfa71a28ab99338b47fb/html5/thumbnails/8.jpg)
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
![Page 9: Android development session](https://reader036.vdocuments.net/reader036/viewer/2022083003/5598cfa71a28ab99338b47fb/html5/thumbnails/9.jpg)
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
![Page 10: Android development session](https://reader036.vdocuments.net/reader036/viewer/2022083003/5598cfa71a28ab99338b47fb/html5/thumbnails/10.jpg)
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
![Page 11: Android development session](https://reader036.vdocuments.net/reader036/viewer/2022083003/5598cfa71a28ab99338b47fb/html5/thumbnails/11.jpg)
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
![Page 12: Android development session](https://reader036.vdocuments.net/reader036/viewer/2022083003/5598cfa71a28ab99338b47fb/html5/thumbnails/12.jpg)
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
![Page 13: Android development session](https://reader036.vdocuments.net/reader036/viewer/2022083003/5598cfa71a28ab99338b47fb/html5/thumbnails/13.jpg)
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.
![Page 14: Android development session](https://reader036.vdocuments.net/reader036/viewer/2022083003/5598cfa71a28ab99338b47fb/html5/thumbnails/14.jpg)
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.
![Page 15: Android development session](https://reader036.vdocuments.net/reader036/viewer/2022083003/5598cfa71a28ab99338b47fb/html5/thumbnails/15.jpg)
When you need to select your Emulator
device (mobile, tablet) manually
Go to Run Run Configurations Target tab
Always prompt to pick device.
Note
![Page 16: Android development session](https://reader036.vdocuments.net/reader036/viewer/2022083003/5598cfa71a28ab99338b47fb/html5/thumbnails/16.jpg)
References
http://en.wikipedia.org/wiki/Android_(opera
ting_system)
http://en.wikipedia.org/wiki/Google_Glass
http://en.wikipedia.org/wiki/Google_TV
http://developer.android.com/training/inde
x.html
Samsung GALAXY S4
http://en.wikipedia.org/wiki/Graphics_displa
y_resolution
http://developer.android.com/distribute/go
ogleplay/publish/register.html
![Page 17: Android development session](https://reader036.vdocuments.net/reader036/viewer/2022083003/5598cfa71a28ab99338b47fb/html5/thumbnails/17.jpg)
Questions