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

Mobile Application & Development Unit-1

Uploaded by

Professor
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
99 views

Mobile Application & Development Unit-1

Uploaded by

Professor
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

Mobile Application & Development Unit 1- Android OS design &

features

Unit-1

 Android OS Design and Features :-

---------------------------------------------------------------------------------------------------------------

Contents:

Android OS design and Features: Android development framework, SDK features,


Installing and running applications on Android Studio, Creating AVDs, Types of Android
applications, Best practices in Android programming, Android tools, Building your First
Android application.

---------------------------------------------------------------------------------------------------------------

Introduction to android:

 Android is an open source operating system based on Linux with a Java


programming interface for mobile devices such as Smartphone (Touch Screen
Devices who supports Android OS) as well for Tablets too.
 The operating system has developed a lot in last 15 years starting from black and
white phones to recent smart phones or mini computers. One of the most widely
used mobile OS these days is android.
 The android is a powerful operating system and it supports large number of
applications in Smartphones.

What is Android?
Android is a stack of software for mobile devices that are an Operating System,
Middleware and Key Applications.

Android Operating System:

Operating System

Middleware

Key Applications

Figure 1.1: Android Operating System

GFGC Boy’s College, Kolar 1 By: Divakar M.S


Mobile Application & Development Unit 1- Android OS design &
features

 Android is a Linux-based operating system which is designed for touchscreen mobile


devices like smartphones and tablet computers.
 It is an open source technology that allows the software to be freely modified and
distributed by device manufacturers, wireless carriers and developers.
 Android was unveiled during 2007 along with the founding of the Open Handset
Alliance.

Different OS run on different types of hardware and are designed for


different types of applications. For example, iOS is designed for iPhones and
iPad tablets, while Mac desktops and laptops use macOS.
Microsoft Windows :
Initial versions of Windows worked with MS-DOS, providing a modern
graphical interface on top of DOS's traditional text-based commands. The
Windows Start menu helps users find programs and files on their devices.
APPLE IOS
Apple's iOS is one of the most popular smartphone operating systems,
second only to Android. It runs on Apple hardware, including iPhones, iPad
tablets and iPod Touch media players.
GOOGLE'S ANDROID OS
Android is the most popular operating system in the world judging by the
number of devices installed. Users can download custom versions of the operating
system.
APPLE MAC OS
Apple's macOS, successor to the popular OS X operating system, runs on Apple
laptops and desktops. Mac OS is known for its user-friendly features, which include Siri and
Face Time.
LINUX OPERATING SYSTEM
Linux can be run on a wide variety of hardware and is available free of charge over
the internet.

ANDROID DEVELOPMENT FRAMEWORK: Android Architecture

Android architecture or Android software stack is categorized into five parts:


1. Linux kernel
2. Native libraries (middleware)
3. Android Runtime
4. Application Framework
5. Applications

GFGC Boy’s College, Kolar 2 By: Divakar M.S


Mobile Application & Development Unit 1- Android OS design &
features

Android is structured in the form of a software stack comprising


applications, an operating system, run-time environment, middleware,
services and libraries. Each layer of the stack, and the corresponding
elements within each layer, are tightly integrated and carefully tuned to
provide the optimal application development and execution environment
for mobile devices.

1) Linux kernel
It is the heart of android architecture that exists at the root of android architecture.
Linux kernel is responsible for device drivers, power management, memory management,
device management and resource access.

2) Native Libraries
Running on the top of the kernel, the Android framework was developed with various
features. It consists of various C/C++ core libraries with numerous of open source tools.
Some of these are:
1. The Android runtime:
The Android runtime consist of core libraries of Java and ART(the Android
RunTime). Older versions of Android (4.x and earlier) had Dalvik runtime.

2. Open GL(graphics library):


This cross-language, cross-platform application program interface (API) is used to
produce 2D and 3D computer graphics.

3. WebKit:
This open source web browser engine provides all the functionality to display web
content and to simplify page loading.
GFGC Boy’s College, Kolar 3 By: Divakar M.S
Mobile Application & Development Unit 1- Android OS design &
features

4. Media frameworks:
These libraries allow you to play and record audio and video.

5. Secure Socket Layer (SSL):


These libraries are there for Internet security.

3) Android Runtime

In android runtime, there are core libraries and DVM (Dalvik Virtual Machine) which is
responsible to run android application. DVM is like JVM but it is optimized for mobile
devices. It consumes less memory and provides fast performance.

4) Android Framework

On the top of Native libraries and android runtime, there is android framework. Android
framework includes Android API's such as UI (User Interface), telephony, resources,
locations, Content Providers (data) and package managers. It provides a lot of classes and
interfaces for android application development.

1. Activity Manager:
It manages the activity lifecycle and the activity stack.

2. Telephony Manager:
It provides access to telephony services as related subscriber information, such as
phone numbers.

3. View System:
It builds the user interface by handling the views and layouts.

4. Location manager:
It finds the device’s geographic location.

5. Applications

On the top of android framework, there are applications. All applications such as home,
contact, settings, games, browsers are using android framework that uses android
runtime and libraries. Android runtime and native libraries are using linux kernal.

Features of Android SDK:


There are numerous features of android. Some of them are listed below:
Feature Description
Connectivity Android supports multiple connectivity technologies including
GSM/EDGE, IDEN, CDMA, EV-DO, UMTS, Bluetooth, Wi-Fi, LTE, NFC and
WiMAX

GFGC Boy’s College, Kolar 4 By: Divakar M.S


Mobile Application & Development Unit 1- Android OS design
& features

SQLite, a lightweight relational database, is used for data storage purposes


Storage

Android supports various type of audio/video/still media formats like:


Media
H.263, H.264, MPEG-4 SP, AMR, AMR-WB, AAC, HE-AAC, AAC 5.1, MP3,
support
MIDI, Ogg Vorbis, WAV, JPEG, PNG, GIF, BMP and WebP
The web browser available in Android is based on the open-source Blink
Web
(previously WebKit) layout engine, coupled with Chrome's V8 JavaScript
browser
engine supporting HTML5 and CSS3
SMS and MMS are available forms of messaging, it also include threaded
Messaging
text messaging and Android Cloud To Device Messaging (C2DM) and now
support the enhanced version of C2DM, Android Google Cloud Messaging
(GCM) is also a part of Android Push Messaging services
Multitasking of applications, with unique handling of memory allocation,
Multi-
is available, using this user can jump from one task to another and at the
tasking
same time various application can run simultaneously
Widgets are re-sizable, so users can expand them to show more content or
Resizable
shrink them to save space
widgets
Android has native support for multi-touch which was initially made
Multi-touch
available in handsets such as the HTC Hero
A technology that lets apps discover and pair directly, over a high-
Wi-Fi
bandwidth peer-to-peer connection.
Android supports capturing a screenshot by pressing the power and
Screen
home-screen buttons at the same time. This features supports after
capture
Android 4.0
A popular NFC-based technology that lets users instantly share, just by
Android
Beam touching two NFC-enabled phones together
Multi- Android supports multiple languages, also supports single direction and
Language bi-directional text

GFGC Boy’s College, Kolar 5 By: Divakar M.S


Mobile Application & Development Unit 1- Android OS design
& features

Installing and running applications on Android Studio


Step 1) Download Android Studio
You can download Android Studio from this link or go
to developer.android.com homepage and search for downloads. Choose appropriate
platform either for windows, mac or linux. Following are the pre requirements for
windows operating system.
Pre-requirements
 Microsoft windows 7/8/10 (32 or 64 bits)
 Minimum 3GB RAM (recommended 8GB)
 2GB disk space
 1280 x 800 minimum screen resolution size
 Intel processor for accelerated emulator
 Android SDK

Note: If you don’t have Android SDK, you can download with Android studio. Go to the
end of download’s page and find android-studio-bundle-162.4069837-windows.exe it
includes SDK also.

Step 2) Run .exe file


Now the next step is to launch .exe file you just download. Following screen will appear

Step 1: Run .exe file


Click next and select Android SDK checked if you don’t have it already. Better is to leave
the default settings. Make sure Android virtual device is also checked.

GFGC Boy’s College, Kolar 6 By: Divakar M.S


Mobile Application & Development Unit 1- Android OS design
& features

Step 2: Choose components Next step is to accept license and


agreement. Click on I Agree

Step 3: Accept license


Next step is to set location of installation. Please make sure your disk has minimum
required space before clicking on Next. For Android Studio installation location must

GFGC Boy’s College, Kolar 7 By: Divakar M.S


Mobile Application & Development Unit 1- Android OS design
& features

have at least 500MB free space. For Android SDK installation, selected location must
have at least 3.25GB free space.

Step 4: Install location


Next step is to choose the start menu folder, where you want to create shortcut. If you
don’t want to create a shortcut just mark Do not create shortcut.

Step 5: Choose start menu folder

GFGC Boy’s College, Kolar 8 By: Divakar M.S


Mobile Application & Development Unit 1- Android OS design
& features

And hit Install button.


It will start installation. Once it’s done following window will appear.

Step 6: Finish
This informs you installation has completed. Click Finish. Make sure Start Android
Studio is checked. Following splash screen of Android Studio will appear.

Step 7: Android Studio Splash Screen

GFGC Boy’s College, Kolar 9 By: Divakar M.S


Mobile Application & Development Unit 1- Android OS design
& features

Step 3) Configure Android Studio

When you run it for the first time it will ask for Android Studio settings.

Step 8: Import settings


If you don’t have any previous settings click on the second option (I don’t have a
previous version of Studio or I don’t want to import my settings).

Select a theme and click next.

Step 9: Select theme

At the very first run it needs to download some necessary components, wait till it
completes.
GFGC Boy’s College, Kolar 10 By: Divakar M.S
Mobile Application & Development Unit 1- Android OS design
& features

Step 10: Download components


And it’s all done.

Step 11: Done


Click on Finish and start building your Android apps.

GFGC Boy’s College, Kolar 11 By: Divakar M.S


Mobile Application & Development Unit 1- Android OS design
& features

Introduction to Android Studio User Interface


Android Studio is an Integrated Development Environment (IDE). You have seen
download and installation in this tutorial. Let’s learn some basics of Android Studio. Here
is the a screenshot of a running Android studio.

Android Studio screen


Red mark shows

1: Tool bar- It is collection of many tools like cut, copy, paste, run debug and others.
2: Navigation bar- It helps you to navigate through the recent open files of your
project.
3: Project hierarchy- It is the hierarchy of your project’s folders.
4: Component Tree- It shows component used in an activity in the form of a tree
structure.
5: Properties window- It shows properties of selected item on the screen.
6: Layout editor- It shows graphical layout, how your app will look like.
7: Palette window- Palette window shows component, layouts, and widgets available
in Android Studio.

GFGC Boy’s College, Kolar 12 By: Divakar M.S


Mobile Application & Development Unit 1- Android OS design
& features

Create an Android project

This lesson shows you how to create a new Android project with Android Studio, and it
describes some of the files in the project.

To create your new Android project, follow these steps:

1. Install the latest version of Android Studio.

2. In the Welcome to Android Studio window, click Start a new Android Studio
project.

Figure 1. Android Studio welcome screen


If you have a project already opened, select File > New > New Project.
3. In the Choose your project window, select Empty Activity and click Next.
4. In the Configure your project window, complete the following:
 Enter "My First App" in the Name field.
 Enter "com.example.myfirstapp" in the Package name field.
 If you'd like to place the project in a different folder, change its Save location.
 Select either Java or Kotlin from the Language drop-down menu.
 Select the checkbox next to Use androidx.* artifacts.
 Leave the other options as they are.
5. Click Finish.

After some processing time, the Android Studio main window appears.

GFGC Boy’s College, Kolar 13 By: Divakar M.S


Mobile Application & Development Unit 1- Android OS design
& features

Figure 2. Android Studio main window

Now take a moment to review the most important files.

First, be sure the Project window is open (select View > Tool Windows > Project) and
the Android view is selected from the drop-down list at the top of that window. You can
then see the following files:
app > java > com.example.myfirstapp > MainActivity

This is the main activity. It's the entry point for your app. When you build and
run your app, the system launches an instance of this Activity and loads its
layout.

app > res > layout > activity_main.xml

This XML file defines the layout for the activity's user interface (UI). It contains
a TextView element with the text "Hello, World!"

app > manifests > AndroidManifest.xml

The manifest file describes the fundamental characteristics of the app and
defines each of its components.

Gradle Scripts > build.gradle

There are two files with this name: one for the project, "Project: My First App,"
and one for the app module, "Module: app." Each module has its
own build.gradle file, but this project currently has just one module. Use each
module's build.file to control how the Gradle plugin builds your app. For more
information about this file, see Configure your build.

GFGC Boy’s College, Kolar 14 By: Divakar M.S


Mobile Application & Development Unit 1- Android OS design
& features

Run your app

In the previous section, you created an Android app that displays "Hello, World!" You
can now run the app on a real device or an emulator.

Run on a real device

Set up your device as follows:

1. Connect your device to your development machine with a USB cable. If you developed
on Windows, you might need to install the appropriate USB driver for your device.
2. Perform the following steps to enable USB debugging in the Developer
options window:
a. Open the Settings app.
b. If your device uses Android v8.0 or higher, select System. Otherwise, proceed to the
next step.
c. Scroll to the bottom and select About phone.
d. Scroll to the bottom and tap Build number seven times.
e. Return to the previous screen, scroll to the bottom, and tap Developer options.
f. In the Developer options window, scroll down to find and enable USB debugging.

Run the app on your device as follows:

1. In Android Studio, select your app from the run/debug configurations drop-down menu
in the toolbar.
2. In the toolbar, select the device that you want to run your app on from the target device
drop-down menu.

Figure 1. Target device drop-down menu

GFGC Boy’s College, Kolar 15 By: Divakar M.S


Mobile Application & Development Unit 1- Android OS design
& features

1. Click Run .
Android Studio installs your app on your connected device and starts it. You now see
"Hello, World!" displayed in the app on your device.

To begin to develop your app, continue to the next lesson.

Run on an emulator

Run the app on an emulator as follows:

1. In Android Studio, create an Android Virtual Device (AVD) that the emulator can use to
install and run your app.
2. In the toolbar, select your app from the run/debug configurations drop-down menu.
3. From the target device drop-down menu, select the AVD that you want to run your app
on.

Figure 2. Target device drop-down menu

4. Click Run .
Android Studio installs the app on the AVD and starts the emulator. You now see
"Hello, World!" displayed in the app.

GFGC Boy’s College, Kolar 16 By: Divakar M.S


Mobile Application & Development Unit 1- Android OS design
& features

 Creating AVD’s

In android development, we need an android device to run the application. So,


developers of Android Studio provide an option to install android virtual device to run it. In
this article, we will learn how to install Android Virtual Device (AVD).
Follow the below steps to install Android Virtual Device.

Step 1: Go to Tools > AVD Manager.

Click on AVD Manager.

GFGC Boy’s College, Kolar 17 By: Divakar M.S


Mobile Application & Development Unit 1- Android OS design
& features

Step 2: Now click on Create Virtual Device.

Step 3: A pop-up window will be there and here we select the category Phone because we are
creating android app for mobile and select the model of mobile phone we want to install.

GFGC Boy’s College, Kolar 18 By: Divakar M.S


Mobile Application & Development Unit 1- Android OS design
& features

Step 4: Here we select the android version to download like Q, Pie, Oreo etc and
click Next button.

Step 5: Click the finish button to complete the installation

GFGC Boy’s College, Kolar 19 By: Divakar M.S


Mobile Application & Development Unit 1- Android OS design
& features

Step 6: Now we can select the virtual device we want to run as emulator can click on
the run icon

Step 7: Finally our virtual device is ready to run our android app.

GFGC Boy’s College, Kolar 20 By: Divakar M.S


Mobile Application & Development Unit 1- Android OS design
& features

 Types of Android Applicatoin:-

Android is an open-source operating system, based on the Linux kernel and used in
mobile devices like smartphones, tablets, etc. Further, it was developed for smartwatches
and Android TV. Each of them has a specialized interface. Android has been one of the best-
selling OS for smartphones. Android OS was developed by Android Inc. which Google bought
in 2005. In this article, we will discuss android application types and categories as well as
their advantages and disadvantages. Firstly let’s see the types of applications, there are
mainly 3 types of Android Applications.
Types of Android Applications

1. Native Apps
Native apps are built for particular operating systems, which are mostly Android and IOS.
Also, there are more OS for mobile applications: Blackberry and Windows. This is available for
download on Google Play Store and for IOS Apple App Store. Native apps are generally built to
make the most of all the features and tools of the phones such as contacts, cameras, sensors, etc.
Native apps ensure high performance and stylish user experience as the developers use the
native device UI to build apps. WhatsApp, Spotify, Pokemon GO, etc. are examples of Natives
apps. Android apps are built using Java, Kotlin, and Flutter, for the frontend, it uses
the XML scripting language. And IOS apps built using Swift, Flutter/ Dart, and C#.

Advantages:
 Native apps are designed for the particular operating system and it gives the best user
experience.
 Native apps are built with separate gestures it gives a good experience to users and it is very
useful for all users.

Disadvantages:
 Native apps are costly in comparison to others because they want separate maintenance.
 Requires a separate codebase to add new features.

2. Web Apps
Web applications are built only the run on browsers. They are mainly the integrations
of HTML, CSS, and Javascript. It runs on Chrome, Firefox, and other browsers. The
responsiveness and functionality of the web apps could easily be confused with a native app
since both the Native and web apps have almost the same features and responsive nature. And
one of the major differences between the two is that native mobile apps can function both in the
offline mode without an active internet connection and the online mode, whereas the web apps
require an active internet connection for them to work. Gmail, Canva, and Google Docs are the
best examples of web apps.

GFGC Boy’s College, Kolar 21 By: Divakar M.S


Mobile Application & Development Unit 1- Android OS design
& features

Advantages:
 Easy to build
 Web apps are used less storage than other applications.
 Web Apps are preinstalled on all devices.
 Web applications are easily accessible in any type of application.

Disadvantages:
 Local resources are not available in web apps.
 Depends on internet networks/ connections.

3. Hybrid Apps
Hybrid applications are also called Cross Platform Applications. Hybrid applications are
runs on multiple platforms like Android and IOS. Also, these are made from the integration of
web and native applications. Because hybrid apps use a single codebase, they can be deployed
across devices. For example, when we build the android application, we can also launch it on
IOS. As a cross-platform development option, developers have more freedom when designing
their applications as they do not need to stick to specific design guidelines from either apple or
google. Instagram, Uber, and Crypto change are examples of Hybrid apps. For Hybrid application
development, we use Flutter/Dart, React Native, etc.

Advantages:
 Users can use it on more than one platform.
 It is integrated with browsers.
 Maintained by many versions.
 Shareable code makes it cheaper than a native app.
Disadvantages:
 Slower compared to native apps.
 There might be some user interface issues.
 In hybrid apps have limitations in using all the Hardware and Operating Systems features.
Now let’s see about some categories of Android applications.

Categories of Android Applications

1. E-Commerce Apps: E-commerce apps are an example of a B2B model. It helps to people to
sell and borrow different items and it saves time and money. In e-commerce applications,
we can do trading of commercial goods on online marketplaces. To buy specific items and
goods, you simply need to make electronic transactions like UPI, Phonepe, etc. through your
smartphone or computer. Flipkart, Amazon, OLX, and, Quiker are examples of e-commerce
applications.
2. Educational Apps: Educational apps are too much used to improve knowledge and peoples
get productivity. Apps for education can make people more interactive, more engaged, and
perform better. Keeping teaching methods good is integral to getting students engaged in
their studies and learning apps are a fantastic way of achieving this. For example, Google
Classroom, SoloLearn, edX, Duolingo, etc.
GFGC Boy’s College, Kolar 22 By: Divakar M.S
Mobile Application & Development Unit 1- Android OS design
& features

3. Social Media Apps: Social media apps give the opportunity to the peoples connect and
communicate together. These apps are mainly used for sharing purposes and making fun.
Many peoples use social media applications for influence, marketing/ business,
entrepreneurship, etc. Instagram, Facebook, WhatsApp, YouTube, LinkedIn, etc. are
examples of social media applications.
4. Productivity Apps: Productivity apps typically organize and complete complex tasks for
you, anything from sending an email to figuring out a tip. The easy-to-use Google Drive app
gives users access to all of the files saved to the cloud-based storage service across multiple
devices. Productivity applications arise in many different forms and they often take a
different approach to improving your workflow. For example, Hive, Todoist, Google Docs,
etc.
5. Entertainment Apps: Entertainment apps are widely used apps worldwide. It contains OTT
platforms and novels and other content. These platforms entertain people and give them
much more knowledge about different things. Everyone is watching OTT platforms and
those are trending these days, and their development is also in demand all over the world.
Hotstar, Netflix, and Amazon prime video are the best examples of this entertainments
applications.

 Best practices in Android programming

1. Choose Suitable Development Method

Not all apps are built with the same approach. You have to brainstorm, plan and pick an
appropriate method before starting the development process. Before proceeding you will have
to make a prior move that your further app will be a Native, Hybrid, or Web-based app. There
are pros and cons of each of these development methods, having proper research will help you
better.

2. Maintain High Code Quality

We all know that Coding is an Art. And once an individual starts coding correctly he/she starts
loving the flavor. Moreover how creatively you code, shows how better developer you are. Your
Quality Of Code Always Matters. Because writing long code is never a smart step, it not only
increases the chances of having more bugs and consumes a lot of time, and creates lots of
complexity. Here are few points listed you can adopt for superior code quality.

GFGC Boy’s College, Kolar 23 By: Divakar M.S


Mobile Application & Development Unit 1- Android OS design
& features

 To give the finest look to your code you can initially study the code of an expert, analyze
their approach and try to modify that.
 Provide the purposes of every function you use.

3. Always keep a consistent coding style and accurate Architecture

1. Use descriptive names.


2. Always keep your code simple and sober, remove unnecessary lines and keep your work
short and descriptive.

4. Learn How To Use Android Documentation

Android itself is a very vast concept, and it’s very much impractical to imagine that you are a
master in all the concepts and techniques. And when it comes to programming or building
application nothing can help you out other than the stack’s documentation. Learning how to
use/read and understand the Android Documentation is important this will help you to build
lots of applications with a variety of features.

5. User Input

Your project work seems more friendly if it’s highly interacted with the users and it seems more
helpful as well. While coding, every text field is planned for a different job. We take input in
some text fields as numbers or as alphabets. It is counted as better practice if only the number
pad is open if we ask the user for numeric value.

6. Avoid Deep Level in Layouts

Having deep hierarchical code views actually makes the UI slower to manage the layout. Deep
hierarchies can mostly be avoided by using the correct view group. It’s a recommendation to
use a single-level hierarchy.

7. Keep Design In Mind

The duties of Developers are different that from Designers. For the maximum part, builders tend
to be great with technical concepts, whilst designers have recognition for being greater creative.
But with that said, you can’t have your blinders on while you’re growing an app. You want to
apprehend how the layout additives are going to create so that you can code the app
accordingly. To get designers and developers operating collectively and effectively, your whole
group desires to be on the identical page. You can use mood boards and lots of other tools to
have a thought and maintain the tracking of the design elements organized. This will make your
improvement manner plenty less difficult and decrease the possibilities of getting to make
masses of modifications overdue in the sport on the way to accommodate the designers. For the
ones of you that recognize a way to expand and layout, you should still sort out your design
elements in these early stages.

GFGC Boy’s College, Kolar 24 By: Divakar M.S


Mobile Application & Development Unit 1- Android OS design
& features

8. Speeding up Android Gradle Builds

 Always keep your Gradle updated and use the latest Gradle plugin for android.
 Enable Offline mode, Gradle Daemon, and Parallel build of your project. to use Gradle
offline see the setting done below.
 Use specific dependency versions instead of Dynamics versions.
 Add below flags in gradle.properties

9. Go for a selective layout and Re-using layouts with <include/> tag

Be it a website or an app the way of picking a layout before developing your project. But
before we choose any layout we need to understand that how the UI of the project is created. So
when we talk about layouts as we know there are ConstraintLayout, LinearLayout,
RelativeLayout, FrameLayout, CoordinatorLayout, and out of all these layouts, you just need to
do performance analysis for some of them before getting started with it. If you have some part
of your XML getting reused and you want to Avoid replication of code in different layouts. Just
add <include/> by extracting them in a separate layout.

10. Using Android Debug Bridge (ADB) for your project

So, ADB is basically a tool that is not only used for reverse engineering but also by a lot of
android-tech enthusiasts but very few numbers its total potentials or use it at the fullest and is
mostly overlooked. ADB- a command-line tool or we can say a client-server program that lets
you communicate with android operating systems. Though developers are not using the
features of this tool daily or as quotidian, you can ease your lots of developing experiences. It
has lots of features like it can add or remove files/data from your android devices and also
address lots hidden of data with just a few clicks on your computer. Developers use these tools
for testing and making changes in android OS devices. If a user forgets his mobile password, we
can use ADB to delete the password file from the android directory, reboot it and the device is
unlocked.

GFGC Boy’s College, Kolar 25 By: Divakar M.S


Mobile Application & Development Unit 1- Android OS design
& features

11. Handling the Configuration changes of your project/app


Handling the configuration of the android app is one of the hectic tasks for android
developers. Basically what happens in configuration change is the android usually destroys
your application’s existing Activities and Fragments and recreates them. Proper handling of the
Orientationgives a rich-user experience and makes the app work smooth too. Now you want to
listen for simple screen orientation changes programmatically and have your application react
to them, you can use the OrientationEventListener class to do this within your Activity. Let’s see
its implementation in Activity. Just instantiate an OrientationEventListener and provide its
implementation.

12. Provide Top-most Security

No matter what sort of application the developer intended to make but security should
definitely be prioritized by the developer, from facts security clouds are one of the most
neglected because it’s not only a large concept but many seem to be imperfect with it. Your apps
will have tons of data and the sensitive information of your company as well as the users on
your app. Depending on the app you develop may have payment information crucial
information like home address, phone number, and many more things of a user-provided the.
Users will hesitate to provide you with information if your app isn’t secure. If security gets
breached, it could be so damaging to your brand that it will be tough to recover.

 Tools Of Android Application

The android developer tools let you create interactive and powerful application for
android platform. The tools can be generally categorized into two types.

 Platform tools
 SDK tools

Platform tools

 The platform tools are customized to support the features of the latest android
platform.
 The platform tools are typically updated every time you install a new SDK
platform. Each update of the platform tools is backward compatible with older
platforms.
 Some of the platform tools are listd below −
 Android Debug bridge (ADB)
 Android Interface definition language (AIDL)
 aapt, dexdump and dex etc.

GFGC Boy’s College, Kolar 26 By: Divakar M.S


Mobile Application & Development Unit 1- Android OS design
& features

SDK tools

SDK tools are generally platform independent and are required no matter whichandroid
platform you are working on. When you install the Android SDK into your system, these
tools get automatically installed. The list of SDK tools has been givenbelow –

Sr. Tool & description


No

1 android
This tool lets you manage AVDs, projects, and the installed components of the SDK
2 Ddms
This tool lets you debug Android applications
3 Draw 9-Patch
This tool allows you to easily create a NinePatch graphic using a WYSIWYG editor
4 emulator
This tools let you test your applications without using a physical device
5 mksdcard
Helps you create a disk image (external sdcard storage) that you can use with the
emulator
6 proguard
Shrinks, optimizes, and obfuscates your code by removing unused code
7 sqlite3
Lets you access the SQLite data files created and used by Android applications
8 traceview
Provides a graphical viewer for execution logs saved by your application
9 Adb
Android Debug Bridge (adb) is a versatile command line tool that lets you
communicate with an emulator instance or connected Android-powered device.

Three important tools are android, ddms and sqlite3.


1. Android
Android is a development tool that lets you perform these tasks:
 Manage Android Virtual Devices (AVD)
 Create and update Android projects
 Update your sdk with new platform add-ons and documentation

GFGC Boy’s College, Kolar 27 By: Divakar M.S
Mobile Application & Development Unit 1- Android OS design
& features

2. DDMS
DDMS stands for Dalvik debug monitor server that provides many services on the device.
The service could include message formation, call spoofing, capturing screenshot,
exploring internal threads and file systems etc.
Running DDMS
From Android studio click on Tools>Android>Android device Monitor.

How it works
 In android, each application runs in its own process and each process run in the
virtual machine. Each VM exposes a unique port, that a debugger can attach to.

 When DDMS starts, it connects to adb. When a device is connected, a VM


monitoring service is created between adb and DDMS, which notifies DDMS when
a VM on the device is started or terminated.

3. Sqlite3
 Sqlite3 is a command line program which is used to manage the SQLite databases
created by Android applications. The tool also allows us to executethe SQL
statements on the fly.

 There are two ways through which you can use SQLite, either from remote shell
or you can use locally.


 Building your First Android application.
Note:- Create an Android project (Refer page no 13 to 16 for more information)

 Define Your App's Purpose


Every successful app begins with a clear purpose. Begin by recognizing the issue
your app will solve or the value it’ll give to users. Conduct intensive market research to
understand your target audience, their needs, and existing apps within the same category.
This information will assist you in refining your idea and identifying special features that
set your app apart.
Consider creating user personas to speak to your target audience. These fictional
characters embody the characteristics and preferences of your potential users. You can
tailor your app’s features and plan to meet their needs by understanding their objectives,
challenges, and priorities.
Besides, think about the monetization technique for your app. Will it be free with
in-app purchases, offer a membership model, or show advertisements? Understanding the
revenue potential and business model early on will impact your improvement decisions.

GFGC Boy’s College, Kolar 28 By: Divakar M.S


Mobile Application & Development Unit 1- Android OS design
& features

 Choose Your Development Path


Android app development offers different choices, including native development with
Java or Kotlin or cross-platform systems like React Native or Flutter. Each approach has its
advantages and considerations.
Native development with Java or Kotlin gives full access to Android-specific APIs and
libraries, empowering you to construct exceedingly performant and optimized apps. It
permits deep integration with the Android platform and access to a vast community and
resources.
On the other hand, cross-platform systems like React Native and Flutter give the
advantage of writing code once and deploying it across numerous platforms. They offer faster
development cycles and can be an incredible choice if you have restricted resources or need
to target both Android and iOS platforms simultaneously.
Assess your objectives, skillset, and project requirements to decide your first app’s
most suitable development path. Consider components such as performance requirements,
time imperatives, team collaboration, and the accessibility of third-party libraries and tools.

 Set Up Your Development Environment


It would be best if you prepared your development environment before beginning. Get
Android Studio set up, as it is the recommended IDE for creating Android apps. You may test
your app on various devices and Android versions with the help of Android Studio’s
emulators, compiler, debugger, and editor.
Learn your way around Android Studio’s interface and functions. Check out the XML
editor, the code editor, and the Project view. Discover the IDE’s code auto-completion, linting,
debugging features, and how to navigate the Android documentation.

 Learn the Basics of Java/Katlyn


If you choose native improvement, understanding the basics of Java or Kotlin is essential.
These languages serve as the foundation for Android app advancement. Learn the syntax and
fundamental concepts of Java or Kotlin to get started. Acquaint yourself with variables, data
types, control flow statements, functions, and standards for object-oriented programming
(OOP). Acquire an understanding of fundamental concepts, including classes, objects,
inheritance, polymorphism, and encapsulation.
To extend your understanding, investigate advanced topics like error handling,
multithreading, data persistence, and networking. Understanding Java or Kotlin will empower
you to write clean, efficient, and maintainable code for your Android app.
Utilize online tutorials, interactive coding exercises, and example tasks to hone your
programming abilities. Join developer communities and forums where you can ask queries,
share your progress, and gain knowledge from seasoned developers.

GFGC Boy’s College, Kolar 29 By: Divakar M.S


Mobile Application & Development Unit 1- Android OS design
& features

 Design User Interface (UI) and User Experience (UX)


A visually appealing and user-friendly UI/UX is pivotal for app success. Start by
comprehending the UI/UX design principles and Google’s Android design guidelines. These
guidelines will assist you in developing an app that meets user expectations and provides a
consistent experience across multiple devices.
Learn the essentials of designing layouts utilizing XML or the Android Layout Editor
within Android Studio. Understand the concept of views and view groups and how to position
and style them using XML properties or programmatically.
Consider user interactions and navigation within your app. Design intuitive and
responsive interfaces that permit users to accomplish tasks efficiently. To improve user
engagement and fulfillment, implement appropriate feedback mechanisms, such as
animations and visual prompts.
Pay attention to accessibility guidelines to guarantee that your app is usable by people
with disabilities. Consider text style sizes, color contrast, and alternative text for images to
make your app accessible to a more vast audience.

 Implement App Functionality


Once you have a strong understanding of the basics, it’s time to execute the
functionality in your app. Start by breaking down your app’s features into smaller modules or
components. This secluded approach permits way better organization, reusability, and
codebase maintainability.
Learn about activities, which serve as the entry points for user interactions, and how
to manage the flow between different activities. Utilize intents to explore between screens and
share information between components. Ace the utilization of parts to make adaptable and
reusable UI components within your app.
Incorporate APIs and libraries to upgrade your app’s capabilities. Explore features
such as data storage utilizing SQLite databases or higher-level abstractions like Room,
network communication using libraries like Retrofit or Volley, interactive media handling,
camera access, or location services. Utilize the Android framework’s built-in components for
features like notifications, background processing, and permissions management.
Consider implementing third-party libraries or open-source projects to use existing
solutions for standard functionalities. However, be careful of the libraries’ maintenance status,
community support, and compatibility with your chosen development path.

 Test and Debug Your App


Thorough testing and debugging are essential to guarantee your app functions as
anticipated. Android Studio gives a range of tools and frameworks to help you in this process.
Begin by writing unit tests to verify the behavior of individual components in confinement.
Utilize the JUnit testing system with Android-specific frameworks like Espresso for UI testing
and Mockito for mocking dependencies. Automate your tests to guarantee consistent results
and ease the regression testing method as your app evolves.

GFGC Boy’s College, Kolar 30 By: Divakar M.S


Mobile Application & Development Unit 1- Android OS design
& features

Integrate your app’s various components and test their interactions. Test the
usefulness and dependability of your app by simulating diverse user interactions, edge
circumstances, and real-world scenarios. With the help of Android Studio’s emulators and
testing tools, you can test your app on various screen sizes, virtual devices, and Android
versions.

 Publish Your App


You can now release your app to the public. Ensure your app complies with all of
Google Play’s policies before releasing it to the public. Make an icon that stands out and
reflects your app’s identity and goals. Create enticing pictures and a video preview of your
program highlighting its best features. Create an alluring app description emphasizing your
app’s distinctive features and benefits.
Adhere to the Google Play Store’s submission guidelines and ensure your app complies
with all applicable laws, ratings, and age restrictions. Get ready for the review procedure,
which may require some dialogue with Google’s audit team. Be patient and responsive to
criticism or queries to advance the publication timeline.

GFGC Boy’s College, Kolar 31 By: Divakar M.S

You might also like