Unit-1.3
Unit-1.3
Unit-1.3
2
Android Introduction
3
Android Introduction
5
Android Introduction
Features of Android
• It is open-source.
• Anyone can customize the Android Platform.
• There are a lot of mobile applications that can be chosen
by the consumer.
• It provides many interesting features like weather details,
opening screen, live RSS (Really Simple Syndication) feeds
etc.
• It provides support for messaging services(SMS and
MMS), web browser, storage (SQLite), connectivity (GSM,
CDMA, Blue Tooth, Wi-Fi etc.), media, handset layout etc.
6
Android Platform
• Android is based on Linux with a set of native
core C/C++ libraries. Android applications are
written in Java.
• However, they run on Android's own Java
Virtual Machine, called Dalvik Virtual Machine
(DVM) (instead of JDK's JVM) which is optimized
to operate on the small and mobile devices.
7
Android Platform
8
Development environment
• In May 2017, Google announced support for a new Kotlin
programming language.
• As you are familiar with Java, you probably should start
in Java (many of the examples out there are written in
Java), and then move into Kotlin. Kotlin will not be
discussed in this article.
• The mother site for Android is https://www.android.com.
For programmers and developers, visit
https://developer.android.com to download the SDK.
9
Installing "Android Studio IDE" and
"Android SDK"
• Installing Android software is probably the most
challenging part of this project.
11
Step 1: Install "Android Studio IDE"
.
• Reference: "Install Android Studio" @
https://developer.android.com/studio/install
12
Set-up Java Development Kit (JDK)
.
• You can download the latest version of Java JDK from Oracle's Java site −
Java SE Downloads. You will find instructions for installing JDK in
downloaded files, follow the given instructions to install and configure the
setup.
• Finally set PATH and JAVA_HOME environment variables to refer to the
directory that contains java and javac, typically java_install_dir/bin and
java_install_dir respectively.
• If you are running Windows and installed the JDK in C:\jdk1.8.0_102, you
would have to put the following line in your C:\autoexec.bat file.
• set PATH=C:\jdk1.8.0_102\bin;%PATH% set JAVA_HOME=C:\jdk1.8.0_102
Alternatively, you could also right-click on My Computer, select Properties,
then Advanced, then Environment Variables. Then, you would update the
PATH value and press the OK button.
13
Step 1: Install "Android Studio IDE"
.
• (For Windows)
• Check that environment variable JAVA_HOME is set to the JDK installation
directory via command "set JAVA_HOME".
• Check the system requirements for Android Studio/SDK @
https://developer.android.com/studio#Requirements e.g., For Windows
10, 8GB of RAM, 8GB of disk space, and 1280x800 minimum screen
resolution.
• Goto "Android Studio" under "Android Developers" @
https://developer.android.com/studio ⇒ Click "Download Android Studio"
(Android Studio Bumblebee 2021.x.x for Windows 64-bit (872MiB)) to
download the executable installer "android-studio-2021.x.x.xx-
windows.exe".
14
Step 1: Install "Android Studio IDE"
.
• Run the downloaded installer ⇒ You may watch a short video @
https://developer.android.com/studio/install.
– In "Choose Components", select "Android Studio" and "Android
Virtual Device" (space required: 2.7GB).
– In "Configuration Settings Install Location", accept the default "C:\
Program Files\Android\Android Studio".
– In "Choose Start Menu Folder", accept the default ⇒ Install.
– Launch Android Studio. Continue to Step 2.
• by default, the "Android Studio IDE" will be installed in "C:\Program Files\
Android\Android Studio", and the "Android SDK" in "c:\Users\username\
AppData\Local\Android\Sdk".
15
Step 1: Install "Android Studio IDE"
• (For macOS) .
• Check the system requirements @
https://developer.android.com/studio#Requirements e.g., macOS 10.14 or
higher, 8GB of RAM, 8GB of disk space, and 1280x800 minimum screen
resolution.
• Goto "Android Developer" under "Android Developers" @
https://developer.android.com/index.html ⇒ Click "Download Options" ⇒
For Intel processor, choose "Mac (64-bit) Android-studio-2021.x.x.xx-
mac.dmg (928MiB)"; for Apple M1 ARM processor, choose "Mac (64-bit,
ARM) Android-studio-2021.x.x.x-mac_arm.dmg (925MiB)".
• Launch the downloaded ".dmg" installation file ⇒ You may watch a short
video @ https://developer.android.com/studio/install.
• Drag and drop Android Studio into the "Applications" folder. Continue to
Step 2.
• The "Android SDK" will be installed in "~/Library/Android/sdk", where ~
denotes your home directory.
16
Step 1: Install "Android Studio IDE"
.
• Run the downloaded installer ⇒ You may watch a short video @
https://developer.android.com/studio/install.
– In "Choose Components", select "Android Studio" and "Android
Virtual Device" (space required: 2.7GB).
– In "Configuration Settings Install Location", accept the default "C:\
Program Files\Android\Android Studio".
– In "Choose Start Menu Folder", accept the default ⇒ Install.
– Launch Android Studio. Continue to Step 2.
• by default, the "Android Studio IDE" will be installed in "C:\Program Files\
Android\Android Studio", and the "Android SDK" in "c:\Users\username\
AppData\Local\Android\Sdk".
17
Step 2: Installing Android SDK
.
• This step takes a long time as you need to download about 3GB of zip
data, and expand to 5 GB of disk data, even for the minimum
configuration.
• Note: You can actually copy the SDK from another computer with the
same OS.
18
Step 2: Installing Android SDK
.
• (For Windows and macOS)
• Launch Android Studio ⇒ It will run the "setup" wizard for the first launch.
– Choose "do not import previous settings", and wait...
– In "Welcome", choose "next".
– In "Install Type", choose "Standard" (default).
– In "Select UI Theme", choose one that you like (or default).
– In "Verify Settings", take note of the SDK directory (by default @ c:\
Users\username\AppData\Local\Android\Sdk for Windows,
"~/Library/Android/sdk" for macOS):Setup Type: Standard SDK Folder:
C:\Users\xxxxxxxx\AppData\Local\Android\Sdk JDK Location: C:\
Program Files\Android\Android Studio\jre (Note: Gradle may be using
JAVA_HOME when invoked from command line. 1.74 MB
19
Step 2: Installing Android SDK
.
• Total Download Size: 1.75 GB
• SDK Components to Download: Android Emulator 329 MB
• Android SDK Build-Tools 32 54.1 MB
• Android SDK Build-Tools 32.1-rc1 52.1 MB
• Android SDK Platform 32 63 MB
• Android SDK Platform-Tools 11.9 MB
• Android SDK Tools 149 MB Intel x86
• Emulator Accelerator (HAXM installer) 500 KB SDK Patch Applier v4 1.74
MB
– In "License Agreement", Accept ALL items ⇒ Finish ⇒ Wait ⇒ Wait ⇒
Wait ⇒ Wait ⇒ Wait ⇒ Wait.
20
Step 2: Installing Android SDK
.
• (For Windows) Use "File Explorer" to check the SDK installed directory.
Take note that the "AppData" is a hidden directory. You need to choose
"View" ⇒ Uncheck "Hidden Items" to see this directory.
(For macOS) Use "Finder" to check the SDK installed directory.
• You can also use "Android Studio" to check the SDK packages installed by
selecting "More Actions" (or "Configure" in older versions, or "Tools") ⇒
"SDK Manager" ⇒ "Android SDK" (sidebar):
– Under "SDK Platforms" tab:
• Android API 32
– Under "SDK Tools" tab:
• Android SDK Build Tools 33-rc1
• Android Emulator
• Android SDK Platform-Tools (33.0.0)
• Intel x86 Emulator Accelerator (HAXM installer
21