0% found this document useful (0 votes)
82 views

Introduction To Android

The document provides an overview of Android operating systems and mobile app development. It discusses what a mobile OS is, introduces Android and its history and versions. It also covers topics like the Android software stack, requirements for Android development and how to install Android Studio.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
82 views

Introduction To Android

The document provides an overview of Android operating systems and mobile app development. It discusses what a mobile OS is, introduces Android and its history and versions. It also covers topics like the Android software stack, requirements for Android development and how to install Android Studio.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 47

Android

Mobile Operating Systems

• A mobile OS is an operating system for smartphones,


tablets, PDAs, or other mobile devices.
• Mobile OSs combine features of a personal computer OS
with other features useful for mobile or handheld use;
usually including, and most of the following considered
essential in modern mobile systems;
– touchscreen, cellular, Bluetooth, Wi-Fi, GPS mobile
navigation, camera, video camera, speech recognition,
voice recorder, music player, etc.
Introduction to Mobile Apps Development?

❑ Mobile Apps Developments is very good demand in Market.


❑ Nowadays every domain clients whether its banking or Healthcare, Insurance
– wants their application to be mobile enabled.
❑ Mobile Apps Development is a process by which application software is
developed for a Small Low power hand held devices such as Smart Phones,
tablets, PDA etc.
❑ How we can get this applications?
▪ We can get the applications in three ways
❖ By default some applications are pre installed in mobile
❖ We can download the applications from Google play or iTunes
❖ We develop our own Applications
Mobile Operating Systems

▪ Some Current software platforms


• Android (based on the Linux Kernel) is from Google Inc.
• Fire OS is an operating system launched by Amazon based on
Google's AOSP.
• iOS (previously known as iPhone OS) is from Apple Inc.
• Windows Phone (Soon to be Windows 10 Mobile) is from Microsoft.
• BlackBerry 10 (based on the QNX OS) is from BlackBerry.
• Firefox OS is from Mozilla.
Why Android OS is better than iPhone OS ?
Android OS iPhone OS
▪ We can set any app as a default ▪ It is impossible on iPhone. Have
on Android to click manually
▪ Android just drag and drop for ▪ iPhone syncing only with iTunes
syncing by using USB cable on
computer ▪ Apple charges for the App
developers $100
▪ While Google charges for
Android developers only $5 ▪ While the iPhone only has
html5 support
▪ Android OS have Flash support
▪ The email system on the iPhone
▪ On Android, on which you are is horrible !
notified of an email as soon as it
arrives
History of Android

▪ It was originally developed by a startup of the same name Android


Inc. founded in Palo Alto, California ,united states in October 2003 by
Andy Rubin and his team
▪ Google purchased the initial developer of the software , android
incorporated in 2005.
▪ Google started the community is called OHA Open Hand set alliance
in the year 2007
▪ In 2009 First major version of android was released in the market.
What is Android?

❑ Android is a mobile operating system that is based on a modified


version of Linux.
❑ It is a open source software platform and operating system for mobile
devices
▪ Developed by Google and later the Open Handset Alliance (OHA)
❑ Allows writing managed code in the Java language
❑ Android has its own virtual machine i.e. DVM(Dalvik Virtual
Machine),
▪ which is used for executing the android application.
Open Handset Alliance

❑ The open handset alliance(OHA) is a business alliance of firm to


develop open standard for mobile devices.
❑ Devoted to advancing open standards for mobile devices
❑ Develop technologies that will significantly lower the cost of
developing and distributing mobile devices and services.
Platform - The Android Software Stack
Versions of an Android
▪ Android 1.0 23 September 2008
▪ Android 1.1 9 February 2009
▪ Android 1.5 (Cupcake) 30 April 2009
▪ Android 1.6 (Donut) 15 September 2009
▪ Android 2.0 (Éclair) 26 October 2009
▪ Android 2.2 (Froyo) 20 May 2010
▪ Android 2.3 (Gingerbread) 6 December 2010
▪ Android 3.0 (Honeycomb) 10 May 2011
▪ Android 4.0 (Ice cream sandwich) 19 October 2011
▪ Android 4.1 (Jelly Bean) 13 July 2012
History of Android
▪ The code names of android ranges from A to L currently, such as Aestro,
Blender, Cupcake, Donut, Eclair, Froyo, Gingerbread, Honeycomb, Ice Cream
Sandwitch, Jelly Bean, KitKat and Lollipop.
Requirements for Android
▪ OS
• Android application development on either of the following operating
systems:
– Microsoft Windows.
– Mac OS X 10.5.8 or later version with Intel chip.
– Linux including GNU C Library 2.7 or later.
▪ Tools
• All the required tools to develop Android applications are freely available
and can be downloaded from the Web. Following is the list of software's
you will need before you start your Android application programming.
1. Java JDK5 or later version
2. Android Studio / Android SDK and Eclipse IDE for Java Developers (optional) and
Android Development Tools (ADT) Eclipse Plug-in (optional)
Requirements for Android
▪ Download Android Studio
• From http://developer.android.com/sdk/installing/index.html
▪ System Requirements for Windows
• Microsoft® Windows® 8/7/Vista (32 or 64-bit)
• 2 GB RAM minimum, 4 GB RAM recommended
• 400 MB hard disk space
• At least 1 GB for Android SDK, emulator system images, and caches
• 1280 x 800 minimum screen resolution
• Java Development Kit (JDK) 7
• Optional for accelerated emulator: Intel® processor with support for Intel® VT-x, Intel® EM64T
(Intel® 64), and Execute Disable (XD) Bit functionality
Installation
▪ Java
1. Visit
http://www.oracle.com/technetwork/java/javase/downloads/index.ht
ml
2. Install it. Android Studio
3. Visit http://developer.android.com/sdk/index.html
4. click the button Download Android Studio.
5. Accept terms, and click Download.
6. Run executable file of setup.
Installation
3. Follow the setup wizard to install Android Studio and any necessary
SDK tools.
4. On some Windows systems, the launcher script does not find where
Java is installed. If you encounter this problem, you need to set an
environment variable indicating the correct location.
5. Select Start menu > Computer > System Properties > Advanced
System Properties. Then open Advanced tab > Environment
Variables and add a new system variable JAVA_HOME that points to
your JDK folder, for example C:\Program Files\Java\jdk1.7.0_45
Android Emulator
▪ The Android SDK includes a mobile device emulator — a virtual mobile device that
runs on your computer. The emulator lets you develop and test Android applications
without using a physical device.
▪ Limitations
• No support for placing or receiving actual phone calls. You can simulate phone calls
(placed and received) through the emulator console, however.
• No support for USB connections
• No support for device-attached headphones
• No support for determining network connected state
• No support for determining SD card insert/eject
• No support for Bluetooth
Android Studio
Getting Up To Speed With Java

▪ You can do it in one week (~2 hours a day):


– https://www.tutorialspoint.com/java/
– http://www.learnjavaonline.org/
– Head First Java (book)

▪ Learn just what is required:


– Basics: classes, methods, data types, loops & conditionals, file I/O, exceptions
– Parallelism: multi-threading, asynchronous function calls
– Do NOT waste time on advanced OOP concepts, design patterns, etc.

▪ Hate Java?
– Try Kotlin or both Java & Kotlin
Android ‘OS’ Overview
▪ Operating System based on Linux
▪ Code compilation workflow:

javac
.class files
dx
classes.dex aapt
.jar files .apk file
resource files
▪ Android Runtime (ART):
dex2oat Machine code
classes.dex
(ELF shared object)

https://github.com/dogriffiths/HeadFirstAndroid/wiki/How-Android-Apps-are-Built-and-Run
Android Environment Setup

What we need?
- Java compiler and
libraries Install Oracle Java 11 JDK
(download link)

- Android SDK (Android


Java libs, dx, aapt, etc.)
Install Android Studio
(download link)
- IDE and build system
Android Studio

▪ Official IDE for Android based on IntelliJ IDEA

▪ Uses Gradle – a flexible build system


– Gradle build scripts automate the process of making apk
– Simplifies dependency management and thus life ☺

▪ Bundles together all that is needed:


– Java IDE
– Android SDK
– Android Virtual Device emulator
Introducing Android Studio

▪ Installing the Java Development Kit


(JDK) on Windows
– http://www.oracle.com/technetwork/j
ava/javase/downloads/index.html
Introducing Android Studio

▪ Downloading the JDK on


Windows
Introducing Android Studio

▪ Executing the JDK Wizard on


Windows
– C:\Java
Introducing Android Studio
Introducing Android Studio

▪ Configuring Environmental
Variables on Windows
Introducing Android Studio

▪ Configuring Environmental Variables on Windows


Introducing Android Studio

▪ Configuring System variable on Windows


Introducing Android Studio

▪ Edit the PATH environmental variable on Windows


▪ Place your cursor at the end of the Variable Value field and type the following:
;%JAVA_HOME%\bin

▪ In the command-line window, issue the following command and press Enter:
java –version
Introducing Android Studio

▪ Installing Android Studio


https://developer.android.com/studio/index.html
Introducing Android Studio

▪ Once the download is complete, execute the file you just downloaded.
Introducing Android Studio

▪ Select locations for Android Studio and the SDK


Introducing Android Studio

▪ Completing the Android Studio setup


Creating Your First Project: HelloWorld

▪ Welcome to Android Studio

▪ Click the Start a New Android Project option.


Creating Your First Project: HelloWorld

▪ Configure your new project

firstname.ulster.ac.uk
Creating Your First Project: HelloWorld

▪ Select the form factors your app will run on


Creating Your First Project: HelloWorld

▪ Choose options for your new file

Activity Name: MainActivity


Layout Name: activity_main
Title: MainActivity
Menu Resource Name: menu_main
Creating Your First Project: HelloWorld

▪ Using Android Virtual Device (AVD) Manager

The Android Virtual Device Manager allows you to create Android Virtual
Devices (AVDs), which you can then run to emulate a device on your
computer.
Creating Your First Project: HelloWorld

▪ Select the Galaxy Nexus hardware


Creating Your First Project: HelloWorld

▪ Select the x86_64 system image


Creating Your First Project: HelloWorld

▪ Running HelloWorld on an AVD

▪ Choosing a device and launching the emulator


Creating Your First Project: HelloWorld

▪ Emulator
Creating Your First Project: HelloWorld

▪ Running HelloWorld on an Android Device


• Connect the mobile phone via USB cable
• Click the Android Device Monitor button
Creating Your First Project: HelloWorld

▪ Running HelloWorld on an Android Device


• Now click the green Run button
References (1)
1. C. Horstmann, Big Java Late Objects, Wiley, 2012. Online: http://proquest.safaribooksonline.
com.proxy.lib.ohio–state.edu/book/–/9781118087886

2. J. Bloch, Effective Java, 2nd ed., Addison–Wesley, 2008. Online: http://proquest.


safaribooksonline.com.proxy.lib.ohio–state.edu/book/programming/java/9780137150021

3. S.B. Zakhour, S. Kannan, and R. Gallardo, The Java® Tutorial: A Short Course on the Basics, 5th ed., Addison–Wesley, 2013.
Online: http://proquest.safaribooksonline.com.proxy.lib.
ohio–state.edu/book/programming/java/9780132761987

4. C. Collins, M. Galpin, and M. Kaeppler, Android in Practice, Manning, 2011. Online:


http://proquest.safaribooksonline.com.proxy.lib.ohio–state.edu/book/programming/android/9781935182924

5. M.L. Sichitiu, 2011, http://www.ece.ncsu.edu/wireless/MadeInWALAN/AndroidTutorial/PPTs/


javaReview.ppt

6. Oracle, http://docs.oracle.com/javase/1.5.0/docs/api/index.html

7. Wikipedia, https://en.wikipedia.org/wiki/Vehicle_Identification_Number

8. Nielsen Co., “Smartphone Milestone: Half of Mobile Subscribers Ages 55+ Own Smartphones”, 22 Apr. 2014,
http://www.nielsen.com/us/en/insights/news/2014/
smartphone-milestone-half-of-americans-ages-55-own-smartphones.html

9. Android Open Source Project, http://www.android.com

46
References (2)

10. http://bcs.wiley.com/he-bcs/Books?action=index&itemId=1118087887&bcsId=7006

11. B. Goetz, T. Peierls, J. Bloch, J. Bowbeer, D. Holmes, and D. Lea, Java Concurrency in Practice, Addison-
Wesley, 2006, online at http://proquest.safaribooksonline.com/book/programming/java/0321349601

12. https://developer.android.com/guide/components/activities.html

13. https://developer.android.com/guide/topics/ui/declaring-layout.html#CommonLayouts

14. https://cloud.genymotion.com/page/doc/#collapse4

15. http://blog.zeezonline.com/2013/11/install-google-play-on-genymotion-2-0/

47

You might also like