0% found this document useful (0 votes)
2 views34 pages

MAD Unit 1 CSD

This document outlines a course on Mobile Application Development focusing on Android, detailing its objectives, units of study, and required tools like Android Studio and the Android SDK. It covers topics such as user interface design, activities, data persistence, and messaging services. Additionally, it provides a step-by-step guide for installing Android Studio and creating Android Virtual Devices for testing applications.

Uploaded by

koppojutrinaini
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)
2 views34 pages

MAD Unit 1 CSD

This document outlines a course on Mobile Application Development focusing on Android, detailing its objectives, units of study, and required tools like Android Studio and the Android SDK. It covers topics such as user interface design, activities, data persistence, and messaging services. Additionally, it provides a step-by-step guide for installing Android Studio and creating Android Virtual Devices for testing applications.

Uploaded by

koppojutrinaini
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/ 34

MOBILE APPLICATION DEVELOPMENT

Professional Electives-III
Subject Code 21CDCDP605C IA Marks 30
Number of Lecture Hours/Week 3 Exam Marks 70
Total Number of Lecture Hours 48 Exam Hours 03
Credits – 03

Course Objectives:

The learning objectives of this course are:


1. Provide knowledge on tools required for Mobile Application Development using
Android.
2. Discuss android User Interface using Views.
3. Impart Android User Interface for pictures and menus.
4. Introduce knowledge on android databases.
Unit -1: Started with Android and Android Studio Hours

What Is Android, Required Tools, Launching First Android Application, 10

Exploring the IDE, Debugging Applications, and Publishing Applications.

Unit -2:Android User Interface

Understanding the Components of a Screen, Adapting to Display 10


Orientation, Managing Changes to Screen Orientation, Creating the User
Interface Programmatically, Basic Views, Picker Views, List Views

Unit – 3:Activities, Fragments, and Intents

Understanding Activities, Linking Activities Using Intents, Fragments, 10

Displaying Notifications.
Unit – 4:Data Persistence

Saving and Loading User Preferences, Persisting Data to Files, Creating and
10
Using Databases.
Unit – 5:Messaging and Location-Based Services

SMS Messaging, Sending Email, Displaying Maps, Getting Location Data,


08
Monitoring a Location.

Text(T) / Reference® Books:


T1 Beginning Android® Programming with Android Studio, J..F.. DiMarzio, John
Wiley & Sons, Inc. (Wrox)
T2 Professional Android 4 Application Development, Reto Meier, Wiley India, (Wrox)
R1 Beginning Android 4 Application Development, Wei-Meng Lee, Wiley India (Wrox)
R2 Android Programming: The Big Nerd Ranch Guide, Bill Phillips, Chris Stewart and
Kristin Marsicano, Big Nerd Ranch, LLC.
W1 https://developer.android.com/

W2 https://www.coursera.org/courses?query=mobile%20app%20development
Android Studio
The first and most important piece of software you need to download is Android Studio.
After you have downloaded and installed Android Studio, you can use the SDK Manager to
download and install multiple versions of the Android SDK. Having multiple versions of
the SDK available enables you to write programs that target different devices. For example,
you can write one version of an application that specifically targets Android Nougat, but
because that flavour of Android is on less than 1% of devices, with multiple versions of the
SDK you can also write a version of your app that uses older features and targets
Marshmallow or Lollipop users. You can use the Android Device Manager to set up device
emulators.
You can download Android Studio latest version from http://developer.android.com/studio

Figure: Android studio downloading


Android Studio is packaged in an executable. Run the install process to set up Android
Studio 2. After you’ve downloaded and run the setup executable, use the following steps to
go through the installation process:
1. Accept the terms and conditions shown in Figure and click on download link.

2. If you have an older version of Android Studio already installed on your computer, the
Android Studio Setup prompts you to automatically uninstall it. Even though the old
version of Android Studio will be uninstalled, the settings and configurations are retained.
You have an opportunity to reapply those settings and configurations to Android Studio
after the setup has completed. Figure shows the screen where you are prompted to uninstall
an old version of Android Studio.
Figure: Android studio download terms and conditions

Figure: Uninstall older version of Android studio.


3. Click Next on the Welcome to Android Studio Setup screen

Figure: Android studio setup screen.

4. Pick which components of Android Studio you want to install from the screen shown in
Figure. Android Studio is selected by default (and cannot be deselected), which makes
sense given that you are going through all of this trouble for the distinct purpose of
installing Android Studio. Android SDK and Android Virtual Device are also selected by
default. Click Next to accept the default choices and continue.

Figure: Android Studio choose components.


5. You are presented with the License Agreement, as shown in Figure. Click I Agree to
continue.

Figure: Android Studio License Agreement.

6. On the configuration settings screen, it is best to accept the default locations specified by
the setup process and click Next to continue. You see the Choose Start Menu Folder screen.
Click Install to kick off the Android Studio installation.

Figure: Choose Start Menu Folder Screen.


7. Installing Android Studio could take a few minutes, depending on the speed of your
computer. You are presented with a progress bar to help you track the state of the
installation. Android Studio is installed with a default SDK (Software Development Kit), in
this case Marshmallow. Later in the process you have the opportunity to install other
SDKs. The Android SDK allows you to develop and write applications geared for a
specific version of Android. In other words, applications written with the Marshmallow
SDK run on Android devices running Marshmallow, but they also possibly run on other
versions depending on which features of the SDK you used in the application.

8. When the install is complete, you will see a Completing Android Studio Setup screen.
Leave the Start Android Studio box checked and click Finish.

Figure: Android studio setup complete

9. Android Studio prompts you to either import settings from a previous version of Android
Studio or continue with new settings. If you uninstalled a previous version in the first step
of the installation process, Android Studio offers you a chance to recover the settings used
in that previous version and apply them to Android Studio.

Figure: Android studio import settings


10. Click Continue at the Welcome screen and choose Standard from the Install Type
selection screen shown in Figure. Click Next to continue.

Figure: Android studio install type

11. Click Finish on the Verify Settings screen, and Android Studio finalizes the setup
process. You know the process is complete when you are greeted with the Welcome to
Android Studio screen.

Figure: Android Studio Welcome Screen.


Android SDK
The most important piece of software you need to download is, of course, the Android
SDK. The Android SDK contains all of the packages and tools required to develop a
functional Android application. The SDKs are named after the version of Android OS to
which they correspond. By default, the Marshmallow SDK was installed with Android
Studio, which means you can develop applications that will run seamlessly on devices with
Android Marshmallow.
However, if you want to install a different Android SDK, you can do so using the SDK
Manager from the Android Studio welcome screen. From this screen, click the Configure
drop-down menu in the lower-right corner. The Configure selection menu opens. Choose
SDK Manager from this menu.
The SDK configuration screen, shown in Figure, shows that the Marshmallow SDK is
already installed. Android N is available to be installed.

Figure: Android SDK System Settings

Select Android Nougat, click Apply, and then click OK. However, before the SDK is
installed you must accept the licensing agreement as shown in Figure.
Figure: Android SDK License agreement.

Creating Android Virtual Devices (AVDs)


The next step is to create an Android Virtual Device (AVD) you can use for testing your
Android applications. An AVD is an emulator instance that enables you to model an actual
device. Each AVD consists of a hardware profile; a mapping to a system image; and
emulated storage, such as a secure digital (SD) card. One important thing to remember
about emulators is that they are not perfect. There are some applications, such as games
(which are GPU heavy) or applications that use sensors such as the GPS or accelerometer.
These types of applications cannot be simulated with the same speed or consistency within
an emulator as they can when running on an actual device. However, the emulator is good
for doing some generalized testing of your applications.
You can create as many AVDs as you want to test your applications with different
configurations. This testing is important to confirm the behaviour of your application when
it is run on different devices with varying capabilities.
Use the following steps to create an AVD. This example demonstrates creating an AVD
(put simply, an Android emulator) that emulates an Android device running Android N on
the Nexus 5x hardware specs.
1. Start Android Studio so that the Welcome screen is visible. Click Start a New
Android Studio Project. You see the Create New Project Wizard shown in Figure.

Figure: Android Studio Welcome screen.

2. Set up a HelloWorld project (that you will use in the final section of this chapter).
Type Chapter1Helloworld in the Application Name field.

3. You can keep the default values for the other fields on the New Project screen.
Click Next.

4. You should see the Targeted Android Devices screen. By default, the Create New
Project Wizard selects for you the Android SDK level that has the greatest activity
based on statis-tics gathered from Google Play. For now, accept the default, as
shown in Figure, and click Next.
Figure: Target Android Devices.

5. On the Add an Activity to Mobile screen, accept the default choice—Empty


Activity and click Next.

Figure: Add an Activity to mobile.


6. Accept all of the defaults on the Customize the Activity screen, as shown in Figure,
and click Finish. Figure shows the open Android Studio IDE.

Figure: Customize the activity.

Figure: Android Studio IDE


7. Launch the AVD Manager by selecting Tools ➪ Android ➪ AVD Manager or
using the AVD Manager button from the toolbar. Figure shows the Android Virtual
Device Manager Wizard, which is where you set up AVDs to be used when you
emulate your application in Android on your desktop.

Figure: Virtual Device selection.

8. Click the + Create Virtual Device button to create a new AVD. The Virtual Device
Configuration screen opens as shown in Figure.
9. Select the Nexus 5x hardware profile and click Next. Although none of the
emulators offers the same performance as its actual hardware counterpart, the
Nexus 5x should run well on most x86-based desktops, and it still offers some of
the mid- to high-end Android device specs.

10. For the system image, select and install the latest option, which at the time this book
was written is Android Nougat. Click the x86 Images tab (see Figure 1-25), select N
from the list of images, and then click Next.

Figure: System Image selection


11. In the Android Virtual Device (AVD) dialog, accept the defaults as shown in
Figure. Click the Finish button to begin building the AVD.
Figure: Android Virtual Device (AVD) Configuration.

You might also like