Nothing Special   »   [go: up one dir, main page]

Mobile Application Development

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Lecture - 1 (Introduction to

Mobile
Applications)
Mobile Operating Systems
Mobile Operating Systems: A mobile operating system, also called a mobile OS,
is an operating system that is specifically designed to run on devices such as:

Mobile phones

Smartphones

PDAs

Tablet computers

Other
handheld devices.

Types of Mobile Applications


Types of Mobile Applications:

Native Applications:

Hybrid Applications

Progressive Web Applications (PWAs)

Native Applications
These are applications developed to be used on a particular platform or operating
system such as Android, iOS, etc.

Native apps are usually written in languages that the platform accepts.

Some languages used to develop native applications:

Lecture - 1 (Introduction to Mobile Applications) 1


Swift or Objective C for iOS applications

Java, Kotlin for Android applications

C# or VB.NET for Windows applications

Pros vs Cons
Pros:

Fast and responsive because they are built for that specific platform

Best performance

Interactive, intuitive, and run much smoother in terms of user input and output

Cons:

Much more expensive to develop compared to cross-platform and web


applications

Require more time to develop as one application has to be written in different


languages for different platforms

Higher cost of maintenance and pushing out updates, due to multiple source
code bases.

Hybrid Applications
These are applications developed to be used across multiple platforms.

This type of application is developed in one language and later deployed to multiple
platforms (iOS, Android,… etc.).

Hybrid mobile applications possess elements both from native apps and web apps.

Web apps are websites that act like apps but are not installed on a device and are
accessed on
the internet via a browser.

Both use a combination of technologies like HTML, CSS, and JavaScript.

Hybrid apps are deployed in a native container that uses a mobile WebView object.

This native container enables them to do things like access hardware capabilities
(camera,

Lecture - 1 (Introduction to Mobile Applications) 2


contacts, accelerometer) of the mobile device.

Pros vs Cons
Pros:

Adaptable to multiple platforms, as the same code can be reused for Android,
iOS, and
Windows.

Unified and less expensive development, as the app only has to be developed
once using one code base.

Faster development time when compared to native apps as only one


development process is involved.

Cons:

Slower app performance when compared to Native Apps, because the hybrid
framework acts as a bridge to communicate with the phone’s native features.

Apps with heavy animations and sound effects aren’t as seamless as their
native counterparts.

Progressive Web Applications (PWAs)


A Progressive Web App (PWA) is a web app that uses modern web capabilities to
deliver an app-like experience to users without requiring them to install an app from
the AppStore/PlayStore.

However, unlike web apps, PWAs are installable on a device (mobile or desktop) by
a web URL which can always be pinned or saved on your phone’s home screen (in
the form of an icon).

PWAs are usually built using HTML, CSS, and JavaScript too but unlike web apps,
it is not browser-
dependent. It provides a seamless user experience similar to a native application
and can use most native device features like push notifications.

A PWA has the following characteristics:

Reliable: Loads instantly.

Lecture - 1 (Introduction to Mobile Applications) 3


Fast: Response quickly to user interactions

Engaging: Feels like a natural app.

Ease of access: Via links

Automatic update: Unlike native apps, the updates happen in real

A PWA essentially gives the big reach of the web, as well as the engaging features
of the native apps.

Working Mechanism
It has two components,

The manifest file – For the icons, background, styling

The service worker –It allows the PWA to store cache, update, and connect to
the server when it is online.

PWAs are based on HTML5, so it is supported by only those devices which is


supported by HTML5.

The service workers of HTML5 (which is JavaScript file) stores the entire website in
your device’s cache.

Therefore loading for the 1st time maybe slow but it is very fast from that time
onward. Because of the Cache the PWAs can be used offline.

As the device connects with the Internet, the HTML5 service workers check if any
update is required and automatically updates the PWAs cache stored in your phone
without having to go the PlayStore.

Pros vs Cons
Pros:

Contains features of both web and native app

No installation required and no app updates.

Works offline and performs well on low-quality networks.

Build one app for all platforms — iOS, Android, etc. as long as it can run on a
browser

Lecture - 1 (Introduction to Mobile Applications) 4


Cons:

Initially, users have to visit the website before they can add the app on their
phone screen.

Not supported by browsers like Safari and Firefox.

Only works in devices which is supported by HTML5

PWAs can not communicate with other native applications installed on your
phone.

Lecture - 1 (Introduction to Mobile Applications) 5


Lecture -2 (ANDROID Version
History
APIs & SDK Version)
Version History
The version history of the Android mobile operating system began with the public
release of the Android beta on November 5, 2007.

The first commercial version, Android 1.0, was released on September 23, 2008.

Android is continually developed by Google and the Open Handset Alliance, and it
has seen a number of updates to its base operating system since its initial release.

Code Names
Android code names are confectionery-themed and have been in alphabetical order
since 2009's Android 1.5 (Cupcake). The most recent version of Android is Android
11 (R), which was released in September 2020.

From Oreo (26-27) it supported security fixes

What is API Level?


API Level is an integer value that uniquely identifies the framework API revision
offered by a version of the Android platform. These API levels are also known as
SDK versions.

The Android platform provides a framework API that applications can use to interact
with the underlying Android system. The framework API consists of:

A core set of packages and classes

A set of XML elements and attributes for declaring a manifest file

A set of XML elements and attributes for declaring and accessing resources

Lecture -2 (ANDROID Version History APIs & SDK Version) 1


A set of Intents

A set of permissions that applications can request, as well as permission


enforcements included in the system

Application Forward Compatibility


Each successive version of the Android platform can include updates to the Android
application framework API that it delivers. These updates are also known as OTA
(Over the Air) updates.

Updates to the framework API are designed so that the new API remains
compatible with earlier
versions of the API.

Most changes in the API are additive and introduce new or replacement
functionality.

As parts of the API are upgraded, the older replaced parts are deprecated but are
not removed, so that existing applications can still use them.

Hence, all other API parts from earlier revisions are carried forward without
modification.

An application running on API level 30 for instance can run on higher-level APIs if
an OTA update takes place.

Application Backward Compatibility


Android applications are not necessarily backward compatible with versions of the
Android platform older than the version against which they were compiled/tested.

Each new version of the Android platform can include new framework APIs, such as
those that give applications access to new platform capabilities/features.

Earlier versions of the platform do not include the new APIs, applications that use
the new APIs are unable to run on those platforms.

An application running on API level 30 may have some features which are absent in
API level 15. Thus this application can’t be run on platforms with API level 15 or
below.

Lecture -2 (ANDROID Version History APIs & SDK Version) 2


Min, Target & Max SDK Version
Applications can use a manifest element provided by the framework API <uses-
sdk> to describe the minimum and maximum API Levels under which they are able
to run, as well as the preferred API Level that they are designed to support. The
element offers three key attributes:

Minimum SDK Version — Specifies the minimum API Level on which the
application is able to run. The default value is "1".

Target SDK Version — Specifies the API Level on which the application is
designed to run.

Maximum SDK Version — Specifies the maximum API Level on which the
application is able to run. (Not used nowadays)

Selecting SDK version/API Level


You should declare your minSDK, targetSDK but not maxSDK.

The minSDK can be determined through some key factors.

The lowest possible version of the platform that your application can support.

If you build an application that uses APIs or system features introduced in the latest
platform version, you should set the minSDK to the API Level of the latest platform
version.

The targetSDK should be set to the highest possible version of the platform in order
to get access of all the new features.

The application should be tested/compiled against every API level from the minSDK
to the targetSDK. But it is set to be compiled/tested against targetSDK by default.

minSDK (lowest possible) <= targetSDK(latest SDK) <= compileSDK(latest SDK)

Lecture -2 (ANDROID Version History APIs & SDK Version) 3


Lecture - 3 (Android Overview)
What is android?
A software stack for mobile devices that includes

A free, open-source mobile OS

An open-source development platform for creating apps (Android Studio)

Google owns Android

Android was developed using the core code of open-source Linux

Uses Linux to provide core system services

Security

Memory management

Process management

Power management

Hardware drivers

Android Platform Architecture

Lecture - 3 (Android Overview) 1


Android Features
Application framework enabling reuse and replacement of components

Integrated browser based on the open-source WebKit engine

Optimized graphics powered by a custom 2D graphics library; 3D graphics based


on the OpenGL ES 1.0 specification (hardware acceleration optional)

SQLite for structured data storage

Lecture - 3 (Android Overview) 2


Media support for common audio, video, and still image formats (MPEG4, H.264,
MP3, AAC, AMR, JPG, PNG, GIF)

GSM Telephony (hardware dependent)

Bluetooth, EDGE, 3G, and WiFi (hardware dependent)

Camera, GPS, compass, and accelerometer (hardware dependent)

Rich development environment including a device emulator, tools for debugging,


memory and performance profiling, and a plugin for the Eclipse IDE

Android History
2003 - Blackberry smartphone released

2005 - Google acquires startup Android Inc. to start the Android platform

2007 - June iPhone released

2009 -

SDK 1.5 (Cupcake) after Alpha and Beta

New soft keyboard with “autocomplete” feature

SDK 1.6 (Donut)

Support Wide VGA

SDK 2.0/2.0.1/2.1 (Eclair)

Revamped UI, browser

2010 -

Nexus One released to the public

SDK 2.2 (Froyo)

Flash support, tethering

SDK 2.3 (Gingerbread)

UI update, system-wide copy-paste

Lecture - 3 (Android Overview) 3


Android vs iPhone

Lecture - 3 (Android Overview) 4


Why Android
Powerful and open SDK

No licensing fees

Thriving developer community

Low barrier to entry

The huge potential market of users

Lecture - 3 (Android Overview) 5

You might also like