0% found this document useful (0 votes)
51 views38 pages

Mobile Application Development

Uploaded by

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

Mobile Application Development

Uploaded by

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

WORKSHOP ON

MOBILE APPLICATION DEVELOPMENT

BY
JA G R U T I PAT IL
SA C H IN VA ISH N AV
INTRODUCTION
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.
OPEN HANDSET ALLIANCE (OHA)

 The OHA is the group that is in charge of the Android smartphones

operating system. It was created by Google. The Open Handset


Alliance (OHA) is consortium of multiple companies like Samsung,
Sony, Intel and many more to provide services and deploy handsets
using android platform. The Open Handset Alliance (OHA) is an
association whose goal is to develop open standards for mobile
devices, promote innovation in mobile phones and provide a better
experience for consumers at a lower cost.
NEED OF ANDROID

 Zero/negligible development cost : The development tools are free, Google

charge a small fee $25, to distribute app.

 Open Source : Developers are free to contribute or extend the platform as

necessary for building mobile apps

 Multi-Platform Support : In market, there are a wide range of hardware devices

 Multi-Carrier Support : World wide a large number of telecom carriers are

supporting Android powered phones.

 Open Distribution Model : Google Play store has very few restrictions on the

content or functionality of an android app.


IMPORTANCE OF ANDROID
 Android dominates the global mobile market share, wielding significant influence.

 Its open-source nature fosters innovation and supports diverse hardware.

 The Google Play Store hosts millions of apps, fueling a vast ecosystem.

 Seamless integration with Google services enhances user experience and productivity.

 Android offers extensive customization options for users and developers alike.

 Affordable and accessible, Android connects people worldwide to the digital realm.

 Continuous development ensures Android stays competitive and secure.

 It serves as a platform for emerging technologies like AR, VR, AI, and IoT.
APPLICATIONS OF ANDROID

 Communication: email, messaging, video calls, and social media interaction.

 Entertainment: music, movies, TV shows, games, and e-books.

 Navigation: GPS-based mapping, navigation, traffic updates, and location-based

services.

 Healthcare: Health tracking, telemedicine, medication reminders, and mental wellness

tools.

 Finance: mobile banking, personal finance management, investment tracking, and

payment processing.

 Business: ERP, CRM, project management, remote work, and analytics.

 Utilities: file managers, system optimization, antivirus, battery optimization, and

customization tools.
FEATURES OF ANDROID

 Storage
 Multitasking  WiFi Direct
 Voice Based Features  Web Browser
 Multitouch  Open Source
 External Storage  Accessibility
 Video Calling  Media Support
 Handset Layout  Streaming Media Support
 Google cloud Messaging  Voice Based Features
TOOLS, AND SOFTWARE REQUIRED
Application can be performed on below operating systems.
 Microsoft windows
 Mac
 Linux Tools Required for Android Development:
 Android Studio (IDE),
 Android SDK,
 JAVA Development Kit (JDK),
 Git (version control) -Optional,
 Design tools (Adobe XD, Sketch, Figma) -
Optional,
 Testing tools (Android Emulator, Firebase
Test Lab).
ANDROID ARCHITECTURE
1.Linux Kernel: Core system operations: device drivers, power
management, memory management, resource access.
2.Native Libraries: Core C/C++ libraries and open-source
tools enhancing system-level functionalities.
3.Android Runtime: Core Java libraries and Dalvik Virtual
Machine (DVM) for executing Android applications
efficiently.
4.Android Framework: Comprehensive APIs for application
development, including UI management, telephony services,
and location handling.
5.Applications: Utilize framework and runtime to deliver
diverse functionalities like home, contacts, settings, games,
OS COMPARISON
WINDOWS ANDROID

It was developed and is owned by Microsoft Incorporation. It was developed and is owned by Google LLC.

It was launched in 1985. It was launched in 2008.

It is designed for PC of all companies. It is specifically designed for mobile devices.

Current stable version is Windows 10. Current stable version is Android 10.

Kernel type is Hybrid with modules here. Kernel type is Linux-based.

Preferred license is Proprietary and Source-available. Preferred license is Apache 2.0 and GNU GPLv2.

It charges for the original version. It is free of cost as it is inbuilt is smartphones.

It is the most used operating system in personal computers. It is the most used operating system overall.

It is for workstation, personal computers, media center, tablets and


Its target system type is smartphones and tablet computers.
embedded systems.
INSTALLATION OF JDK, ANDROID STUDIO & ANDROID SDK - I
Install JDK (Java Development Kit):
 Download the latest version of JDK from the official Oracle website
 Run the downloaded installer file (.exe) and follow the installation wizard instructions.
 During installation, make sure to note down the installation path of JDK. By default, it's installed in "C:\Program
Files\Java".

Install Android Studio:


 Download the latest version of Android Studio from the official website: Android Studio.
 Run the downloaded installer file (.exe) and follow the installation wizard instructions.
 Choose the components you want to install, including Android Virtual Device (AVD) and Android SDK.
 Select the installation location. By default, it's installed in "C:\Program Files\Android\Android Studio".
INSTALLATION OF JDK, ANDROID STUDIO & ANDROID SDK - II

Configure SDK in Android Studio:


 Launch Android Studio after installation. On the Welcome screen, click on "Configure" and then select "SDK
Manager".
 In the SDK Manager, go to the "SDK Platforms" tab and select the Android versions you want to develop for. Click
"Apply" to install selected packages.
 Switch to the "SDK Tools" tab and select additional tools like Android SDK Build-Tools, Android Emulator, and others.
Click "Apply" to install them.
 After installation, configure the SDK path by going to "File" > "Project Structure" > "SDK Location" and set the
"Android SDK Location" to the directory where Android SDK is installed (e.g., "C:\Users\YourUsername\AppData\
Local\Android\Sdk").
INSTALLATION OF JDK, ANDROID STUDIO & ANDROID SDK - III
Set up Environment Variables:
 Right-click on "This PC" or "My Computer" and select "Properties“ & Click on "Advanced system settings" panel.
 In the System Properties window, click on the "Environment Variables" button.
 Under "System variables", click on "New" and add a new variable named "JAVA_HOME" with the value set to the path
where JDK is installed (e.g., "C:\Program Files\Java\jdk-15.0.2").
 Find the "Path" variable in the "System variables" section, select it, and click on "Edit".
 Add the paths to "bin" directories of JDK and Android SDK (e.g., "%JAVA_HOME%\bin" and "C:\Users\
YourUsername\AppData\Local\Android\Sdk\platform-tools") separated by a semicolon (;). & Click "OK"
Verify Installation:
 Open Command Prompt and type the following commands to verify installations:
 java -version
 javac -version
AVD (ANDROID VIRTUAL DEVICE)

• AVD is an emulation device that runs on your computer and mimics the
functionality of a physical Android device.
• It allows developers to test their applications on various Android device
configurations, such as different screen sizes, resolutions, and Android
versions.
• AVDs are useful for testing apps without needing access to physical
Android devices, making development more accessible and efficient.
• When creating an AVD, developers can specify device specifications,
including screen size, RAM, storage, and Android API level.
• AVDs are commonly used for debugging, performance testing, and
ensuring compatibility across different Android devices.
EMULATOR

• The Android Emulator is a tool provided by the Android SDK that simulates the behavior of Android devices on
your computer.
• It allows developers to run and test their Android applications on their development machines without needing
physical devices.
• Emulator performance has improved over time, but it may still be slower than testing on a physical device,
especially for resource-intensive applications.
• Emulator supports various features such as multi-touch input, hardware acceleration, camera emulation, and GPS
simulation.
• Developers can create custom device configurations and use snapshots to save emulator states for faster startup
times.
• Emulator is an essential tool for Android developers, especially for testing apps across different Android versions
and device configurations.
ANDROID DEVELOPMENT TOOLS (ADT)

 Android Development Tools (ADT) is a plugin for the

Eclipse IDE that is designed to give you a powerful,


integrated environment in which to build Android
applications. ADT extends the capabilities of Eclipse to let
you quickly set up new Android projects, create an
application UI, add packages based on the Android
Framework API, debug your applications using the Android
SDK tools, and even export signed (or unsigned) .apk files in
order to distribute your application.
DVM (DALVIK VIRTUAL MACHINE)

• 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.
• Dalvik is a name of a town in Iceland. The Dalvik VM was written by
Dan Bornstein.
• 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
 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.
DVM (Dalvik Virtual Machine) JVM (Java Virtual Machine)

It is Register based which is designed to run on low memory. It is Stack based.

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

DVM has been designed so that a device can run multiple


Single instance of JVM is shared with multiple
instances of the VM efficiently. Applications are given their own
applications.
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.
CONTROL FLOW AND DIRECTORY STRUCTURE
FOLDERS FROM DIRECTORY STRUCTURE:
 app: The App folder contains three subfolders (manifests, java and res) that make up our application.
 They are divided so that it should be fairly easy to determine which resources go in which folder.
 Manifest: This is where we would put our manifest files. Most Android apps have single manifest file. But an app
may have several manifest files due to application versioning, or for supporting specific hardware.
 Java: This is the folder in our project where we will be storing all of the source code files written in Java
programming language.
 res: It contains folders that help us to separate and sort the resources of our application. Resources
 basically, mean all the needed files except the source code.
 drawable: The drawable folder contains graphics that can be drawn to the screen.
 layout: The layout folder contains XML files used for your layouts. These files are used to set up the layout for your
Activity and is used for basic alignment of your layouts, components, widgets, and similar
 resources that are used for the UI of your application.
 mipmap: The mipmap folder contains the launcher icon files for the app. A launcher icon is a graphic that
 represents your app to users.
 values: The values folder contains XML files that contain simple values, such as strings, integers, and colors.
 The values folder is used to keep track of the values we will be using in our application.
UI DESIGN
The “views” are the building blocks of a U.I design and composes of almost every basic
U.I element like TextViews, EditTexts, ImageViews etc. This ‘view’ however comes along with a few properties
bundled to them. Some of the important and are often used to build up a complete meaningful screen design.
 id
 width
 height
 margin
 padding
HELLO WORLD! PROGRAM
//activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayoutxmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
//MainActivity.java
android:layout_width="match_parent"
packagecom.example.helloword;
android:layout_height="match_parent"
import androidx.appcompat.app.AppCompatActivity;
tools:context=".MainActivity">
import android.os.Bundle;
<TextView android:layout_width="wrap_content"
public class MainActivityextends AppCompatActivity {
android:layout_height="wrap_content"
@Override
android:text="Hello World!"
protected void onCreate(Bundle savedInstanceState) {
app:layout_constraintBottom_toBottomOf="parent"
super.onCreate(savedInstanceState);
app:layout_constraintLeft_toLeftOf="parent"
setContentView(R.layout.activity_main);
app:layout_constraintRight_toRightOf="parent"
}
app:layout_constraintTop_toTopOf="parent" />
}
</androidx.constraintlayout.widget.ConstraintLayout>
FUNDAMENTALS OF UI DESIGN

Android introduces some new terminology for familiar programming metaphors


 Views- Views are the basic User Interface class for visual interface elements (commonly known as controls or
widgets). All User Interface controls, and the layout classes, are derived from Views.
 ViewGroups- View Groups are extensions of the View class that can contain multiple child Views. By extending
the ViewGroup class, you can create compound controls that are made up of interconnected child Views. The
ViewGroup class is also extended to provide the layout managers, such as LinearLayout, that help you compose
User Interfaces.
 Activities- Activities represent the window or screen being displayed to the user. Activities are the Android
equivalent of a Form. To display a User Interface, you assign a View or layout to an Activity. Android provides
several common UI controls, widgets, and layout managers
LAYOUT TYPES
A layout defines the visual structure for a user interface, such as the UI for an Android application. This folder
stores Layout files that are written in XML language.
 Linear Layout

• Vertical

• Horizontal
 Absolute Layout
 Frame Layout
 Table Layout
 Relative Layout
LINEAR LAYOUT
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"> <!-- Horizontal Orientation set -->
<Button android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button1"
android:id="@+id/button"
android:background="#358a32" />
<Button android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button2"
android:id="@+id/button2"
android:background="#0058b6" />
</LinearLayout>
ABSOLUTE LAYOUT
<?xml version="1.0" encoding="utf-8"?>
<AbsoluteLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#03A9F4"
tools:context=".MainActivity">
<Button android:id="@+id/b1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="15dp"
android:layout_y="25dp"
android:background="#FF9800"
android:text="Button"> </Button>
<Button android:id="@+id/b2“
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_x="13dp"
android:layout_y="152dp"
TEXTVIEW
 TextView displays text to the user and optionally allows them to edit it programmatically. TextView is a complete
text editor, however basic class is configured to not allow editing but we can edit it.

TextView code in XML:


<TextView android:id="@+id/simpleTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AbhiAndroid" />

TextView code in JAVA:


TextView textView = (TextView) findViewById(R.id.textView);
textView.setText("AbhiAndroid"); //set text for text view
EDITTEXT
 EditText is a standard entry widget in android apps. It is an overlay over TextView that configures itself to be
editable. EditText is a subclass of TextView with text editing operations. We often use EditText in our applications
in order to provide an input or text field, especially in forms. The most simple example of EditText is Login or
Sign-in form.

EditText code in XML:


<EditText android:id="@+id/simpleEditText"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:hint="Enter Your Name Here" />

EditText code in JAVA:


EditText editText = (EditText)findViewById(R.id.simpleEditText);
editText.setHint("Enter Your Name Here");//display the hint
AUTO COMPLETE TEXT VIEW
 An editable text view that shows completion suggestions automatically while the user is typing. The list of
suggestions is displayed in a drop down menu from which the user can choose an item to replace the content of
the edit box with

Program
BUTTON
In Android, Button represents a push button. A Push buttons can be clicked, or pressed by the user to perform an
action. There are different types of buttons used in android such as CompoundButton, ToggleButton, RadioButton.

Program - Button

Program - ImageButton

Program - ToggleButton
LISTVIEW, GRIDVIEW, IMAGEVIEW, SCROLLVIEW, AND TOAST

 Working with ListView for Displaying Lists:

ListView is used to display scrollable lists of data in Android applications, with support for custom adapters and item
layouts.
 GridView for Grid-based Layouts:

GridView organizes items in a grid layout, commonly used for displaying images or data in a tabular format.
 ImageView for Displaying Images:

ImageView is used to display images in Android applications, supporting various image formats and scaling options.
 ScrollView for Scrolling Content:

ScrollView enables vertical scrolling of content that exceeds the available screen space, allowing users to view all content
within a limited space.
 Introduction to Toast for Brief Messages:

Toast is a lightweight notification mechanism used to display brief messages or notifications to users, typically for
providing feedback or alerts in the application.
DATE TIME PICKER

 Introduction to Date Time Picker:

Date Time Picker is a UI component used in Android applications to allow users to select dates and times
conveniently.
 Usage and Benefits:

Enables users to input dates and times accurately.


Improves user experience by providing a standardized interface for selecting dates and times.
INTENT AND ITS TYPES

 Introduction to Intent:

Intent is a messaging object used to request an action from another app component or system.
 Types of Intents:

Explicit Intent: Specifies the target component by name.


Implicit Intent: Specifies the action to perform, allowing the system to choose the appropriate component.
CONTENT PROVIDER AND FRAGMENTS

 Content Provider:

Content Provider is a component that manages access to a structured set of data, typically stored in a SQLite database
or other data storage.
 Fragments:

Fragments are modular UI components representing a portion of the user interface or behavior within an activity.
SERVICES AND FEATURES

 Services:

Services are components that run in the background to perform long-running operations or handle network
transactions.
 Features of Services:

Background operation, independent execution, inter-process communication (IPC), foreground service, bound
service.
MULTIMEDIA FRAMEWORK AND PLAY AUDIO AND VIDEO

 Multimedia Framework:

Android Multimedia Framework provides APIs for playing audio and video, recording audio and video, and
manipulating multimedia content.
 Playing Audio and Video:

MediaPlayer class for playing audio and video files.


VideoView class for displaying video content in the UI.
AUDIO CAPTURE, CAMERA, BLUETOOTH, AND ANIMATIONS

 Audio Capture:

MediaRecorder class for capturing audio from the device microphone.


 Camera:

Camera API for capturing photos and videos using the device camera.
 Bluetooth:

BluetoothAdapter class for managing Bluetooth connectivity and communication.


 Animations:

Animation framework for creating visual effects and transitions in the UI.
SQLITE DATABASE CREATION AND CONNECTION

 SQLite Database:

SQLite is a lightweight relational database management system used for storing data in Android applications.
 Creation and Connection:

SQLiteOpenHelper class for managing database creation and version management.


SQLiteDatabase class for performing database operations such as insert, update, delete, and query.

You might also like