[go: up one dir, main page]

0% found this document useful (0 votes)
1K views35 pages

Mobile Application Development Chapter 1 & 2

This document provides an overview of mobile application development and the Android platform. It discusses mobile operating systems, current software platforms like Android and iOS, the history and categories of Android applications, the Java JDK and JVM, the Android SDK, Android development tools, Android virtual devices, emulators, the Dalvik virtual machine, and installing Java, Android Studio, and additional SDK packages.

Uploaded by

abhijit.logavi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views35 pages

Mobile Application Development Chapter 1 & 2

This document provides an overview of mobile application development and the Android platform. It discusses mobile operating systems, current software platforms like Android and iOS, the history and categories of Android applications, the Java JDK and JVM, the Android SDK, Android development tools, Android virtual devices, emulators, the Dalvik virtual machine, and installing Java, Android Studio, and additional SDK packages.

Uploaded by

abhijit.logavi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

Mobile Application Development

Unit- 1 & 2

Computer Department
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.
Some Current software platforms
• Android (based on the Linux Kernel) is from Google Inc.
• CyanogenMod and Cyanogen OS are based on the open source Android Open Source
Project(AOSP).
• 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.
Introduction to Android
History of Android
• The code names of android ranges from A to L currently, such as Aestro, Blender, etc…

Categories of Android applications


Java JDK
• The Java Development Kit (JDK) is a software development environment used for developing Java applications
and applets.
• It includes the Java Runtime Environment (JRE), an interpreter/loader (java), a compiler (javac), an archiver
(jar), a documentation generator (javadoc) and other tools needed in Java development.
JVM
• JVM (Java Virtual Machine) is a specification that provides runtime environment in which java bytecode can be
executed.
• JVMs are available for many hardware and software platforms. JVM is a part of Java Run Environment (JRE).
• The JVM performs following operation:
• Loads code
• Verifies code
• Executes code
• Provides runtime environment
JRE
The Java Runtime Environment (JRE) is a set of software tools for development of Java applications. It combines
the Java Virtual Machine (JVM), platform core classes and supporting libraries.
Android SDK
The Android SDK (software development kit) is a set of development tools used to develop applications
for Android platform. The Android SDK includes the following:
• Required libraries
• Debugger
• An emulator
• Relevant documentation for the Android application program interfaces (APIs)
• Sample source code
• Tutorials for the Android OS
Android Development Tools (ADT)
The android developer tools let you create interactive and powerful application for android platform.
1. Android Studio
Developed by Google, Android Studio is an all-rounder integrated development environment. Android
has Gradle-base support that has features like visual layout editor, intelligent code editor, real-time
profilers and APK analyzer.
2. Visual Studio – Xamarin
Xamarin was launched in 2011 which is the best free IDE for delivering an enterprise-quality,
cross-platform approach. Xamarin supplies add-ins to Microsoft Visual Studio that allows developers to
build Android, iOS, and Windows apps within the IDE
3. IntelliJ IDEA
Using this IDE, you can do in-depth coding, quick navigation, and error analysis. It supports mobile app
development with the help of Java, Scala, Kotlin, Groovy.
4. Eclipse IDE
It is one of the most popular IDES of Android apps. The open-source software is free to use. Released
under the Eclipse Public License, it holds a large community having plenty of plugins and
configurations. Highly customizable offers full support for Java programming language and XML.
Android Virtual Devices (AVDs)
An Android Virtual Device (AVD) is a configuration that defines the characteristics of an Android
phone, tablet, Wear OS, Android TV, or Automotive OS device that you want to simulate in
the Android Emulator.
The AVD Manager is an interface you can launch from Android Studio that helps you create and
manage AVDs.

To open the AVD Manager, do one of the following:


Select Tools > AVD Manager.

Click AVD Manager in the toolbar.


Create a new AVD
1. Open the AVD Manager by clicking Tools > AVD Manager.
Create a new AVD
2. Click Create Virtual Device, at the bottom of the AVD Manager dialog. The Select Hardware page
appears.
Create a new AVD
3. Select a hardware profile, and then click Next. If you don't see the hardware profile you want, you
can create or import a hardware profile. The System Image page appears.
Create a new AVD
4. Select the system image for a particular API level, and then click Next. The Verify
Configuration page appears.
Create a new AVD
5. Change AVD properties as needed, and then click Finish.
Now you get a new AVD ready for launching your apps on it.
Emulators
• The Android Emulator simulates Android devices on your computer so that you can test your application on a
variety of devices and Android API levels without needing to have each physical device.
• The emulator provides almost all of the capabilities of a real Android device. You can simulate incoming
phone calls and text messages, specify the location of the device, simulate different network speeds,
simulate rotation and other hardware sensors, access the Google Play Store, and much more.
• The emulator comes with predefined configurations for various Android phone, tablet, Wear OS, and Android
TV devices.
• In short, An Android emulator is an Android Virtual Device (AVD) that represents a specific Android device.
You can use an Android emulator as a target platform to run and test your Android applications on your PC.
Using Android emulators is optional.

To start the emulator:


1. Open the AVD Manager.
2. Double-click an AVD, or click Run

The Android Emulator loads.


Dalvik Virtual Machine (DVM)
• The Dalvik Virtual Machine (DVM) is an android virtual machine optimized for mobile devices. It
optimizes the virtual machine for memory, battery life and performance.
• The Dex compiler converts the class files into the .dex file that run on the Dalvik VM. Multiple class
files are converted into one dex file.

Fig.: The compiling and packaging process from the source file
Dalvik Virtual Machine (DVM)
• The javac tool compiles the java source file into the class file.
• The dx tool takes all the class files of your application and generates a single .dex file. It is a
platform-specific tool.
• The Android Assets Packaging Tool (aapt) handles the packaging process.
Difference between JVM and DVM
DVM (Dalvik Virtual Machine) JVM (Java Virtual Machine)
It is Register based which is designed to run on low
It is Stack based.
memory.

DVM uses its own byte code and runs “.Dex” file.
JVM uses java byte code and runs “.class” file
From Android 2.2 SDK Dalvik has got a Just in
having JIT (Just In Time).
Time compiler

DVM has been designed so that a device can run


Single instance of JVM is shared with multiple
multiple instances of the VM efficiently. Applications
applications.
are given their own instance.

DVM supports Android operating system only. JVM supports multiple operating systems.

For DVM very few Re-tools are available. For JVM many Re-tools are available.

There is constant pool for every application. It has constant pool for every class.

Here the executable is APK. Here the executable is JAR.


Installation
Java
1. Visit http://www.oracle.com/technetwork/java/javase/downloads/index.html
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.
7. Follow the setup wizard to install Android Studio and any necessary SDK tools.
8. 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.
9. 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
Installation
0. The individual tools and other SDK packages are saved outside the Android Studio application
directory. If you need to access the tools directly, use a terminal to navigate to the location where they
are installed. For example:
1. \Users\<user>\sdk\
2. Android Studio is now ready and loaded with the Android developer tools, but there are still a couple
packages you should add to make your Android SDK complete.
Run
1. Run Android Studio as Administrator.
2. Before you create new project, click Configure from splash screen. Click SDK Manager.
3. Don’t select all. In bottom, in Extra section, select Intel x86 Emulator Accelerator.
4. Click Install button.
Installation
launched android-studio-ide-181.5056338-windows.exe to start the installation process. The installer responded by
presenting the Android Studio Setup dialog box shown in Figure 1.

1. Set up Android Studio


Clicking Next will take you to the following panel, which provides the option to decline installing an Android Virtual
Device (AVD).
Installation
chose to keep the default settings.

After clicking Next, the Configuration Settings panel will be shown,


Installation
where you will be asked to choose where to install Android Studio.
Installation
clicking Next will open Choose Start Menu Folder panel.

keep the default setting and click Install


Installation
The following Installing panel will appear:

When installation finished, the Installation Complete panel appeared.


Installation
When installation finished, the Installation Complete panel appeared.
Installation
After clicking Next, the installer presented the Completing Android Studio Setup panel.

To complete the installation, leave Start Android Studio box checked and click Finish.
Running Android Studio
The first time Android Studio runs, it presents a Complete Installation dialog box that offers the option of
importing settings from a previous installation.

choose not to import settings (the default selection) and click OK, the following splash screen will appear:
Running Android Studio

You will observe the following Finding Available SDK Components message box.
Running Android Studio
Android Studio will present the following Android Studio Setup Wizard dialog box:
Running Android Studio
Click Next, and the wizard will invite you to select an installation type. Keep the default standard setting.
Running Android Studio
Then you can choose a user interface theme.
Running Android Studio
You can choose whichever you want and click Next. Android Studio will next provide the opportunity to
verify settings.
Running Android Studio
click Finish and Android Studio will begin the process of downloading SDK components.
Running Android Studio
It can take several minutes for this part of the setup to finish.
Running Android Studio
Finally, click Finish to complete the wizard. The Welcome to Android Studio dialog box appear.

This dialog box is used to start up a new Android Studio project, work with an existing project, and more. It can be
accessed by selecting Android Studio from the Windows Start menu, or the equivalent on another platform.
Thank You

You might also like