Unit 1 Introduction To Mobile and Mobile Programming
Unit 1 Introduction To Mobile and Mobile Programming
i) Portable
A mobile device has to be portable, meaning that we can carry it without any special
considerations. We can take it to the gym, to the university, to work; we can carry it with us
everywhere, all the time.
ii) Personal
We’ve all heard it: “Don’t touch my phone!” A mobile device is absolutely personal. My
mobile is mine; it’s not property of the family, nor is it managed by the company who
manufactured it. I choose the ringtone, the visual theme, the games and applications
installed, and which calls I should accept. My wife has her own mobile device, and so do my
kids. This personal feature will be very important in our projects. You can browse a desktop
website from any computer—your familiar home PC, your computer at work, or even a
desktop at a hotel or Internet café—and numerous people may have access to those
machines. However, you will almost always browse a mobile website from the same device,
and you are likely to be the only person who uses that device.
iii) Companion
Your mobile device can be with you anytime! Even in the bathroom, you probably have your
mobile phone with you. You may forget to take lots of things with you from your home in
the morning, but you won’t forget your wallet, your keys, and your mobile device. The
opportunity to be with the user all the time, everywhere, is really amazing.
1
v) Connected device
A mobile device should be able to connect to the Internet when you need it to. This can be a
little difficult sometimes, so we will differentiate between fully connected devices that can
connect any time in a couple of seconds and limited connected devices that usually can
connect to the network but sometimes cannot.
A classic iPod (non-Touch) doesn’t have a network connection, so it’s out of our list too, like
the notebooks.6
i) Mobile Phones
Those devices which have call and SMS support can be categorized as mobile phones. We
still have mobile phones in some markets. They don’t have web browsers or connectivity,
and they don’t have any installation possibilities.
After some years, because of device recycling, such phones will probably not be on the
market anymore. The Nokia 1100 was the most widely distributed device in the world, with
over 200 million sold since its launch in 2003. In terms of features, it offers nothing but an
inbuilt flashlight. The problem is that we can’t create web content for it. Some companies
may continue to make very low-end entry devices in the future, but hopefully Nokia and
most other vendors will stop creating this kind of device. Even newer, cheaper mobile
devices now have inbuilt browser support.
This is because the mobile ecosystem (vendors, carriers, integrators, and developers) wants
to offer services to users, and a browser is the entry point. For example, through its OVI
Services Nokia offers OVI Mail, an email service for non-Internet users in emerging markets.
Thanks to this service, many, many people who have never before had access to email can
gain that access, with a mobile device costing very low amount. This widespread solution
meets a real need for many people in emerging markets, like some countries in Africa and
Latin America.
v) Smartphones
This is the most difficult category to define. Why aren’t some mid-end and high-end devices
considered “smart” enough to be in this category? The definition of smart evolves every
year. Even the simplest mobile device on the market today would have been considered
very smart 15 years ago.
A smartphone, as defined today, has a multitasking operating system, a full desktop
browser, Wireless LAN (WLAN, also known as Wi-Fi) and 3G connections, a music player, and
several of the following features:
• GPS (Global Positioning System) or A-GPS (Assisted Global Positioning System)
• Digital compass
• Video-capable camera
• TV out
• Bluetooth
• Touch support
• 3D video acceleration
• Accelerometer
3
or even a pair of glasses. The LG GD910 in Figure 1-1 is a watch with 3G support. It’s on the
market now, so it’s not sci-fi.
“OK,” you may be thinking, “but are we really going to create a website for a one-inch
screen?” Maybe not. But we can create small widgets to update information presented to
the users, and this falls under the category of mobile web work.
4
Following are the landmarks in mobile history:
1926: The first successful mobile telephony service was offered to first class
passengers on the Deutsche Reichsbahn on the route between Berlin and Hamburg.
1946: The first calls were made on a car radiotelephone in Chicago. Due to the small
number of radio frequencies available, the service quickly reached capacity.
1956: The first automated mobile phone system for private vehicles launched in
Sweden. The device to install in the car used vacuum tube technology with rotary
dial and weighed 40Kg.
1969: The Nordic Mobile Telephone (NMT) Group was established. It included
engineers representing Sweden, Denmark, Norway, and Finland. Its purpose was to
develop a mobile phone system that, unlike the systems being introduced in the US,
focused on accessibility.
1973: Dr Martin Cooper general manager at Motorola communications system
division made the first public mobile phone call on a device that weighed 1.1Kg.
1982: Engineers and administrators from eleven European countries gathered in
Stockholm to consider whether a Europe wide digital cellular phone system was
technically and politically possible. The group adopted the Nordic model of
cooperation and laid the foundation of an international standard.
1985: Comedian Ernie Wise made the first “public” mobile phone call in the UK from
outside the Dicken’s Pub in St Catherine’s dock to Vodafone’s HQ. He made the call
in full Dickensian coachman’s garb.
1987: The Technical specifications for the GSM standard are approved. Based on
digital technology, it focused on interoperability across national boundaries and
consequent different frequency bands, call quality and low costs.
1992: The world’s first ever SMS message was sent in the UK. Neil Papworth, aged 22
at the time was a developer for a telecom contractor tasked with developing a
messaging service for Vodafone. The text message read “Merry Christmas” and was
sent to Richard Jarvis, a director at Vodafone, who was enjoying his office Christmas
party.
1996/97: UK phone ownership stood at 16% of households. A decade later the figure
was 80%. The explosion in growth was in part driven the launch of the first pay as
you go, non-contract phone service, Vodafone Prepaid, in 1996.
1998: The first downloadable content sold to mobile phones was the ringtone,
launched by Finland's Radiolinja, laying the groundwork for an industry that would
eventually see the Crazy Frog ringtone rack up total earnings of half a billion dollars
and beat stadium-filling sob-rockers Coldplay to the number one spot in the UK
charts.
1999: Emoji’s were invented by Shigetaka Kurita in Japan. Unlike their all-text
predecessor’s emoticons, emoji’s are pictures.
2000: The all-conquering Nokia 3310 crash landed on shop shelves. Naturally it was
unscathed and went on to sell 126 million units. Over in Japan, the first commercially
available camera phones The Sharp J-SH04, launched in November 2000 in Japan.
The only snag? you could only use it in Japan. Europe wouldn’t get its first camera
phone until the arrival of the Nokia 6750 in 2002.
2003: The 3G standard started to be adopted worldwide, kicking off the age of
mobile internet and paving the way for the rise of smartphones. Nepal was one of
the first countries in southern Asia to launch 3G services. One of Nepal’s first
companies to offer the service, Ncell, also covered Mount Everest with 3G.
5
2007: The iPhone debuted. Solely available on O2 at launch in the UK and priced at a
then eye-watering $499.
2008: The first Android phone turned up, in the form of the T-Mobile G1. Now
dubbed the O.G of Android phones, it was a long way from the high-end Android
smartphones we use today. Not least because it retained a physical keyboard and a
BlackBerry-style trackball for navigation. This year also saw the advent of both
Apple’s App Store and Android Market, later renamed Google Play Store.
2009: O2 publicly announced that it had successfully demonstrated a 4G connection
using six LTE masts in Slough, UK. The technology, which was supplied by Huawei,
achieved a peak downlink rate of 150Mbps.
2010: Samsung launched its first Galaxy S smartphone. Usurping former Android
giants, HTC, the Samsung Galaxy S range is still the most popular Android brand.
2017: The Nokia 3310 had a revival, sporting a fresh version equipped with basic web
browsing, a colourful screen and even a camera. Despite this, it still retained our
favourite features from the original 3310, including the iconic design, super-long
battery life and even an updated version of Snake.
Apple
We are going to start with Apple, not because its devices are the best or because it has the
greatest market share, but because Apple has caused a revolution in the market. It changed
the way mobile devices are seen by users, and it is the reason why many developers (web or
not) have turned their attention to the mobile world.
Apple, a well-known desktop computer company, entered the mobile world with a
revolutionary device: the iPhone. Luckily for us, all of Apple’s devices are quite similar. They
6
have a multi touch screen, a 3.5ʺ screen size, WLAN connections, and Safari on iOS (formerly
Mobile Safari) as the browser.
Apple’s devices have a great feature: an operating system called iOS (formerly iPhone OS)
that is based on Mac OS X (a Unix-based desktop OS). Up to this writing, even the first
version of the iPhone can be upgraded to the latest operating system version. By default,
the iPhone and iPod Touch are charged using USB; when you charge your device, iTunes (the
Apple software for managing your device’s content and music) will detect automatically if an
OS update is available for your device, and you can install the update in minutes without any
technical skill needed. That is why today, for a mobile web developer, it’s more important to
know what OS version an Apple device has installed than which device it is. For those of us
whose aim is to create great web experiences for the iPhone, it doesn’t matter if the device
is an iPhone (the basic phone), an iPhone 3GS (S for speed, a device with more power and
speed), an iPhone 4 or an iPod Touch (like the iPhone without the phone). Even within each
device type, we have many generations.
Today, we can develop applications for iOS devices on only two platforms: using mobile web
techniques, and using the framework built using Objective-C or Swift.
Nokia
Nokia was the most popular brand and had the largest market share in mobile devices and
smartphones worldwide. Nokia has devices in all the mobile categories, from very low-end
devices to very high-end smartphones.
Nokia has the best support for developers, compared to all the other companies. Hundreds
of documents and a huge amount of sample code, ideas, and best practices for many
technologies, including technologies used for mobile web development are available on its
website for developers, Forum Nokia.
The bad news for developers is that hundreds of different Nokia devices are available today.
The good news is that they are very well organized by platform into different series, making
it easier for us to develop, test, and port our web applications to most of them.
BlackBerry
Research in Motion (RIM) is the Canadian manufacturer of the BlackBerry devices, mobile
devices focused on being “always connected” with push technologies that are primarily used
by corporate users who need to remain connected to intranets and corporate networks.
RIM calls all its devices “smartphones.”
RIM has few devices aimed at the mass market, so most of them have QWERTY keyboards
and aren’t designed for gaming. Many of them have proprietary input devices, like a scroll
wheel or a touchpad; some touch-enabled devices have also been launched in the last few
years. All BlackBerrys have the RIM OS, a proprietary operating system compatible with Java
ME with extensions, and, of course, a mobile browser. We can categorize the devices by
operating system version.
BlackBerry has become very popular in the corporate market because of its integration with
Exchange and other corporate servers. A BlackBerry user can browse the Internet via the
corporate Internet connection though a proxy, and many other manufacturers, such as
Nokia, LG, HTC, and Sony Ericsson, support the BlackBerry email client.
7
Samsung
Samsung has many devices on the market, most of which are divided into three different
series: native devices, Symbian devices, and Windows devices. At the end of 2009, Samsung
surprised the market with a new platform for the devices launching from 2010: Bada.
Samsung’s native devices are low- and mid-end mobile devices with a proprietary OS
including a browser and Java ME support, and typically a camera and a music player. Prior to
2010, the smartphones and high-end devices were divided into two categories by operating
system Symbian and Windows Mobile each having its own set of features.
The latest devices on the market have touch support, with a UI layer installed over the
operating system. For newer devices, there is one feature that is available on all the three
platforms: Samsung Widgets. These are small applications created using mobile web
technologies that can operate on all the operating systems Samsung uses.
Starting in 2010, Samsung had delivered mobile devices with Bada, Android, and Windows
Phone.
Sony Ericsson
Ericsson built many mobile phones in the 1990s, and in 2001 it merged with Sony and
created the Sony Ericsson company. Today, Sony Ericsson produces a range of low and mid-
end devices and a couple of smartphones. Sony Ericsson, like Samsung, has decided to offer
devices with different operating systems. It offers low- and mid-end devices using a
proprietary Sony Ericsson operating system, as well as Windows Mobile devices, Android
devices, and Symbian devices.
Before 2009, the Symbian devices used UIQ as the UI layer for the operating system. Since
2009, there are Symbian Foundation devices using the same UI layer as Nokia’s and
Samsung’s devices. So, in terms of developing web applications for them, they are very
similar. The proprietary OS devices support Java ME and Flash Lite development (and also
both at the same time, thanks to a project called Capuchin), and they are divided in series
according to the Java ME APIs they support.
So, today we have Sony Ericsson devices from Java Platform 1 (JP-1) to Java Platform 8 (JP-
8), with each category differing in terms of the API support and the screen resolution. All the
devices have a camera, a music player and, of course, a web browser built in. The Symbian
Foundation–based devices are touch-enabled.
Motorola
For many years, Motorola was a leading manufacturer of low- and mid-end devices.
Motorola’s devices were the first mobile devices on the market, and the company pioneered
the clamshell design with the classic Motorola StarTac. Motorola’s mobile devices have
traditionally used either a proprietary operating system (like the well-known Motorola v3),
Symbian UIQ, Windows Mobile, or a Linux-based operating system the company created for
its devices. On the proprietary OS–based devices, Java ME and the browser were the only
supported development platforms. The Linux-based OS supports Java ME, web, and native
development.
8
The Windows-based Motorola devices, like the Motorola Q, which has a QWERTY keyboard,
are intended for the corporate market. The company also has some touch devices on the
market, all with a built-in camera and music player, and some mobile devices for the two-
way radio market, like the Nextel network. These devices have a proprietary OS and the
model names usually start with an “i.”
There are no series divisions in Motorola, unlike in the Nokia and Sony Ericsson lines, so we
will need to use other information (such as the browser used in each device) to test and
make decisions about the devices.
LG Mobile
LG Mobile has many low to high-end devices on the market today. Some are based on a
proprietary OS with Java ME, Flash, and web support. Some them support web widgets
based on WebKit. Most of the new one’s are based on Android.
LG participated in the creation of the Symbian Foundation and has two Symbian devices
based on the S60 platform, but later on it decided to support Android, which we can see
many Android-based LG devices currently.
HTC
HTC has become very popular in the mobile market since it created the first and second
Android devices in the world and the first Google phone, the Nexus One. But HTC doesn’t
only create Android devices; it also produces a lot of Windows Mobile ones. Many HTC
devices have touch support, and a key feature is that HTC tries to emulate the same user
experience on all its devices. We can think of HTC devices as either Android devices or
Windows devices; that’s the only distinction that’s needed.
9
This simplicity is reflected in the HTC website for developers: it only contains kernel files for
Android devices and links to the Android and Windows Mobile generic websites.
Android
Android is an open source, Linux-based operating system created and maintained by a group
of software and hardware companies and operators called the Open Handset Alliance.
Google mainly maintains it, so it is sometimes known as the “Google Mobile Operating
System.” As with any open source software, any manufacturer could theoretically remove all
the Google- specific stuff from the operating system before installing it on their devices.
However, as of this writing no vendor has done this, which is why every Android device is
very “Google friendly.”
Android is a software stack including a Linux-core, multitasking operating system based on
the concept of a virtual machine that executes bytecode, similar to .NET or JVM (Java Virtual
Machine). Google chose Java as the main language to compile (not compatible with Java
ME) with Web 2.0 users in mind. Android includes a full HTML browser based on WebKit
and, in fact, is very similar to the iPhone Safari browser, and all Android devices to date ship
with Google Maps, Google Calendar, and an email client and provide connections to many
free Google web services. It’s not an obligation, but as of today every Android device is
touch- based, and many of them have a QWERTY physical keyboard, GPS, a digital compass,
and an accelerometer.
(Source: Wikipedia)
10
Windows Mobile
One of the older mobile operating systems on the market is Windows Mobile (formerly
Windows CE for Pocket PC and Smartphones). For many years, its market included the well-
known Pocket PCs as Personal Digital Assistants (PDAs) without phone features. The “mobile
revolution” pushed Microsoft to create a smartphone version of its mobile operating
system, now called Windows Mobile, which is available in two flavours: The Professional
(formerly Pocket PC) and Smartphone editions.
Windows Mobile has its own unique features, like Android, and as developers we can
consider it as a platform without regard to who the device manufacturer is. Windows
Mobile devices are produced by HP, Toshiba, Motorola, Sony Ericsson, Samsung and Palm.
Palm
USRobotics bought Palm Computing Inc. in 1995. At the time, it was the pioneer launching
PDA devices. USRobotics later merged with 3Com, and as 3Com was dedicated to network
cards and accessories, Palm Inc. was created as a subsidiary. Palm Inc. was very successful,
and other manufacturers (including IBM) created other devices licensing its Palm OS. In
1998, a couple of Palm’s directors left to create another company, HandSpring, which
releases the Treo devices to the market. Half PDA and half mobile phone, they can be
considered the first smartphones on the market.
A few years later, Palm decided to divide the company into a hardware manufacturer,
palmOne, and an operating system developer, PalmSource. This idea didn’t work out:
customers didn’t accept the palmOne trademark, so the company again acquired the Palm
trademark and the operating system became the Garnet OS. In the meantime, Palm
acquired HandSpring, so now we have Palm Treo devices.
In 2005, ACCESS (who also had other mobile technologies) acquired PalmSource and the
operating system. Suddenly, the new-old Palm company made a difficult decision: it started
to manufacture Treo devices with Windows Mobile, killing all hopes for the future of the
Garnet OS (formerly Palm OS).
The Treo series was the only type of Palm device that survived in the mobile world, and
BlackBerrys, the Nokia E Series, and other devices soon pushed Palm to the bottom of the
market. In response, Palm created another operating system for mobile devices, aimed at
being a web-oriented platform for iPhone-killer devices. webOS came to the market in 2009
with the first device, the Palm Pre. Other devices, such as the Palm Pixi, followed.
The company didn’t go so-well in the market, so in 2010, Palm was acquired by HP, who
promised evolution of webOS, so we should expect HP netbooks, tablets and more mobile
phones with this operating system in the following years.
Palm’s new webOS devices are touch and multitouch devices with a very smooth user
interface, excellent web support, and all the functions of a modern mobile device. The
operating system and all the device applications are web-based. That’s because any “native”
application developed for webOS is created using web technologies.
11
Symbian Foundation
Today there are many Symbian Foundation–based devices on the market (from Nokia, Sony
Ericsson, and Samsung), all with similar operating system features. The Symbian
Foundation’s OS allows us to develop applications using the native C++ framework, Java ME,
Adobe Flash, web applications, widgets using web technologies, Python, and Qt, a free C-
based framework owned by Nokia.
The open source OS is versioned as Symbian^1, Symbian^2, Symbian^3, etc. As with Android
and Windows Mobile devices, if we are talking about a Symbian device we know that it will
be very similar to all other Symbian devices, no matter which manufacturer created it.
There are several languages used for mobile programming. Languages like Java, Kotlin, C#,
Python etc. are popular for android platform and Objective-C, Swift etc. are popular
languages for iOS platform. Programmers can select any of the language of their choice for
writing mobile programs.
12
There are four major development approaches when building mobile applications:
Native Mobile Applications
Cross-Platform Native Mobile Applications
Hybrid Mobile Applications
Progressive Web Applications
Native Applications
Native mobile applications are written in the programming language and frameworks
provided by the platform owner and running directly on the operating system of the device
such as iOS and Android.
Cross-Platform Applications
Cross-platform native mobile applications can be written in variety of different programming
languages and frameworks, but they are compiled into a native application running directly
on the operating system of the device.
Hybrid-Web Applications
Hybrid mobile applications are built with standard web technologies - such as JavaScript,
CSS, and HTML5 - and they are bundled as app installation packages. Contrary to the native
apps, hybrid apps work on a 'web container' which provides a browser runtime and a bridge
for native device APIs via Apache Cordova.
13
The mobile front-end is the visual and interactive part of the application the user
experiences. It usually resides on the device, or there is at least an icon representing
the app that is visible on the home screen or is pinned in the application catlog of the
device. The application can be downloaded from the platform app store, side-loaded
directly onto the device, or can be reached through the device’s browser.
Regardless of what front-end platform or development methodology is being used,
delivering high-quality mobile applications that delight and retain users requires
reliable back-end services.
Given the critical importance of back-end services for the success of the mobile
application, the developers have several important architectural decisions that they
must consider. These decisions include which services should they build themselves
and which third party services should they leverage, and then should they run and
maintain their own services or should they take advantage of 3rd party services.
Exercise
14
the codebase more readable.
o Null Safety: Kotlin's type system is designed to eliminate null pointer
exceptions, a common source of runtime crashes in Java.
o Interoperability: Kotlin can be used alongside Java in the same project,
allowing gradual migration from Java to Kotlin.
o Coroutines: Kotlin's support for coroutines simplifies asynchronous
programming, making it easier to manage background tasks in Android apps.
3. Java
Platform: Android
Description: Java is one of the most widely used programming languages globally and
has been the primary language for Android development since the platform's
inception. While Kotlin has gained popularity, Java remains a dominant language for
Android apps.
Features:
o Platform Independence: Java's "write once, run anywhere" philosophy makes
it portable across different platforms.
o Rich Libraries and Frameworks: Java has a vast ecosystem of libraries and
frameworks, making development more efficient.
o Mature and Stable: Java has been around for decades, making it a mature and
stable choice for Android development.
o Large Community: Java has a large developer community, providing abundant
resources, tutorials, and libraries.
4. JavaScript
Platform: Cross-platform (via frameworks like React Native, Ionic)
Description: JavaScript is a versatile programming language primarily used for web
development but has gained popularity in mobile app development through
frameworks like React Native and Ionic. These frameworks allow developers to build
cross-platform apps using a single codebase.
Features:
o Cross-Platform Development: JavaScript enables the development of apps
that run on both iOS and Android with a single codebase.
o Large Ecosystem: JavaScript has a vast ecosystem, with numerous libraries,
tools, and frameworks available to accelerate development.
o Active Community: JavaScript has a large and active community, offering
extensive support and resources.
o Real-Time Updates: With tools like Hot Reloading in React Native, developers
can see changes in real-time without restarting the app.
5. Dart
Platform: Cross-platform (via Flutter)
Description: Dart is a programming language developed by Google, primarily used for
building mobile applications with the Flutter framework. Flutter allows developers to
create high-performance, natively compiled apps for iOS, Android, web, and desktop
from a single codebase.
Features:
o Hot Reload: Dart's Hot Reload feature allows developers to see changes in
real-time, speeding up the development process.
o Single Codebase: Dart allows developers to write a single codebase that
compiles to native code for multiple platforms.
15
o High Performance: Dart is designed for high performance, and apps built with
Flutter are known for their smooth animations and fast execution.
o Rich UI: Dart's rich set of customizable widgets in Flutter allows for the
creation of visually appealing and consistent UIs across platforms.
18