KEMBAR78
Android Life Cycle | PDF | Android (Operating System) | Google Play
0% found this document useful (0 votes)
62 views81 pages

Android Life Cycle

This document is a course chapter on writing Android applications, focusing on the activity lifecycle and user interface components. It covers the various states of an activity, including methods like onCreate, onStart, onResume, onPause, onStop, onRestart, and onDestroy, as well as the use of XML for UI design. Additionally, it discusses components like TextView, CheckBox, and OnClickListener, providing examples of their implementation in Java.

Uploaded by

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

Android Life Cycle

This document is a course chapter on writing Android applications, focusing on the activity lifecycle and user interface components. It covers the various states of an activity, including methods like onCreate, onStart, onResume, onPause, onStop, onRestart, and onDestroy, as well as the use of XML for UI design. Additionally, it discusses components like TextView, CheckBox, and OnClickListener, providing examples of their implementation in Java.

Uploaded by

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

Sol Plaatje University

Department of Computer Science and Information Technology

COURSE NAME: Electives I & Mobile App Development


COURSE CODE: NITE62110 & NMAD62110
CHAPTER 3: Writing your Android Application

Compiled by: Mrs. K.E Mamabolo

YEAR 2024
Activity Lifecycle
After completing this chapter, you should be able to:

• Install the Android sample applications


• Add and create Android projects from within the Android
IDE
• Verify that your application development is set up
correctly
• Write and debug your first Android application software
emulator and on Android device.
Activity Lifecycle
• Activity is a screen that a user interact with, one of the
building blocks of Android OS.

• Each Activity has different states known as Activity Lifecycle


such as created, started, resumed, paused, stopped or
destroyed.

• This means that an Activity is a class pre-written in Java


Programming.
Description of Activity Lifecycle
• onCreate() – invoked when creating an activity

• onStart() – an activity becomes visible to the user, its


invoked after it’s design either by restart method after
onStop().

• onResume() – invoked when the activity is visible to the user


and the user is able to interact with it

• onPause() – invoked when the content of the activity is not


visible because previous activity is resume by the user
Description of Activity Lifecycle
continued…
• onStop() – invoked when the activity is not visible to user
because some other activity takes place of it

• onRestart() – called when the activity comes back to the


foreground from the background

• onDestroy – called when the activity is not in background


List of Activity Lifecycle Methods or
States: Activity Created: onCreate():
• All life cycle methods are not required to override, however, they
can be overridden according to requests.

Activity Created: onCreate(Bundle savedInstanceState):

• onCreate() method is called when activity gets memory in the OS.

• To use create state we need to override onCreate(Bundle


savedInstanceState) method.

• Bundle is a data repository object that can store any kind of


primitive data and this object will be null until some data isn’t saved
in that.
List of Activity Lifecycle Methods or
States: Activity Created: onCreate():
• When an Activity is first called or launched then onCreate(Bundle
savedInstanceState) method is responsible to create the activity.

• When ever orientation(i.e. from horizontal to vertical or vertical to


horizontal) of activity gets changed or when an Activity gets
forcefully terminated by any Operating System then
savedInstanceState i.e. object of Bundle Class will save the state of
an Activity.

• onCreate() is not required for apps. But the reason it is used in app
is because that method is the best place to put initialization code.
List of Activity Lifecycle Methods or
States: Activity Created: onCreate():
• The initialization code can be placed in onStart() or
onResume() and when the app load first, it will work the same
as in onCreate().
List of Activity Lifecycle Methods or
States: Activity Started: onStart():
• onStart() method is called just after it’s creation. In other case
Activity can also be started by calling restart method i.e after
activity stop.

• So this means onStart() gets called by Android OS when user


switch between applications.

• For example, if a user was using Application A and then a


notification comes and user clicked on notification and moved
to Application B, in this case Application A will be paused.
List of Activity Lifecycle Methods or
States: Activity Started: onStart():
• When the activity is launched, first, the onCreate() method is
called then the onStart() and then onResume().

• If the activity is in onPause() condition i.e., not visible to


user, and then the user again launch the activity then the
onStart() method will be called.
List of Activity Lifecycle Methods or
States: Activity Started: onResume():
• Activity resumed is that situation when it is actually visible to
user means the data displayed in the activity is visible to user.
In lifecycle it always gets called after activity start and in most
use case after activity paused (onPause).
List of Activity Lifecycle Methods or
States: Activity Started: onPause():
• Activity is called paused when it’s content is not visible to
user, in most case onPause() method called by Android OS
when user press Home button (Center Button on Device) to
make hide.

• Activity also gets paused before stop called in case user press
the back navigation button. The activity will go in paused state
for these reasons also if a notification or some other dialog is
overlaying any part (top or bottom) of the activity (screen).
List of Activity Lifecycle Methods or
States: Activity Started: onPause():
• Similarly, if the other screen or dialog is transparent then user
can see the screen but cannot interact with it. For example, if
a call or notification comes in, the user will get the
opportunity to take the call or ignore it.

• When Activity is in background then onPause() method will


execute

• Activity is not visible to user and goes in background when


onPause() method is executed
List of Activity Lifecycle Methods or
States: Activity Started: onStop():
• Activity is called stopped when it’s not visible to user. Any
activity gets stopped in case some other activity takes place of
it.

• For example, if a user was on screen 1 and click on some


button and moves to screen 2. In this case Activity displaying
content for screen 1 will be stopped.

• Every activity gets stopped before destroy in case of when


user press back navigation button.
List of Activity Lifecycle Methods or
States: Activity Started: onStop():
• So Activity will be in stopped state when hidden or replaced
by other activities that have been launched or switched by
user. In this case application will not present anything useful
to the user directly as it’s going to stop.
List of Activity Lifecycle Methods or
States: Activity Started: onRestart():
• Activity is called in restart state after stop state. So activity’s
onRestart() function gets called when user comes on screen or
resume the activity which was stopped.

• In other words, when Operating System starts the activity for


the first time onRestart() never gets called. It gets called only
in case when activity is resumes after stopped state.
List of Activity Lifecycle Methods or
States: Activity Started: onDestroy():
• Any activity is known as in destroyed state when it’s not in
background. There can different cases at what time activity
get destroyed.

• First is if user pressed the back navigation button then activity


will be destroyed after completing the lifecycle of pause and
stop.

• In case if user press the home button and app moves to


background. User is not using it no more and it’s being shown
in recent apps list.
List of Activity Lifecycle Methods or
States: Activity Started: onDestroy():
• So in this case if system required resources need to use
somewhere else then OS can destroy the Activity.

• After the Activity is destroyed if user again click the app icon,
in this case activity will be recreated and follow the same
lifecycle again.
Fragment Lifecycle
• In Android, Fragment is a part of an activity which enable
more modular activity design. It will not be wrong if we say a
fragment is a kind of sub-activity. It represents a behavior or a
portion of user interface in an Activity. We can combine
multiple Fragments in single Activity to build a multi pane UI
and reuse a Fragment in multiple Activities. A fragment must
always be embedded in an activity and the fragment’s life-
cycle is directly affected by the host activity’s life-cycle.
List of Activity Lifecycle Methods or
States: Activity Started: onStart():
• When activity launch, first onCreate() method call then
onStart() and then onResume().

• If the activity is in onPause() condition i.e. not visible to user.


And if user again launch the activity then onStart() method
will be called
XML in Android: Basics of User Interface
• Here in above Diagram ViewGroup (Linear Layout) contains one ViewGroup (i.e. Relative
Layout)and two View(Button and TextView).

• Further two more View (i.e. 2 EditText ) are nested inside Relative Layout ViewGroup. It
is important to note that one layout can be nested in another layout.
XML in Android: Basics of User Interface
The below code snippet will explain the above image in better way. Paste it in
activity_main.xml:

<?xml version="1.0" encoding="utf-8"?>


<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">

<Button
android:id="@+id/buton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button"/>
XML in Android: Basics of User Interface
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="sample Text"
android:layout_marginTop="15dp"
android:textSize="30dp"/>

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
XML in Android: Basics of User Interface
<EditText
android:id="@+id/editTextName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="First Name"
/>
<EditText
android:id="@+id/editTextLastName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:hint="Last Name"/>
</RelativeLayout>
</LinearLayout>
Application Signing for Trust Relationships
• Every Android application screen has some components like button, Text
or images.

• These are contained inside the ViewGroup. Layouts are the best examples
for ViewGroups.

• The different types of layout in android are Linear Layout, Relative Layout,
Absolute Layout, Table Layout and Frame Layout.

Android TextView
• In Android, 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.

• View is the parent class of TextView. Being a subclass of view the text
view component can be used in your app’s GUI inside a ViewGroup, or
as the content view of an activity.

• We can create a TextView instance by declaring it inside a layout(XML


file) or by instantiating it programmatically(Java Class).
Android TextView
TextView code in Java:

TextView textView = (TextView) findViewById(R.id.textView);


textView.setText("AbhiAndroid"); //set text for text view

Attributes of TextView: The attributes that helps us to configure a TextView in your xml file.
id: id is an attribute used to uniquely identify a text view. An example is given in the above code
findViewById(R.id.textView);
text: setting the text in a textview programmatically means in java class.

TextView textView = (TextView)findViewById(R.id.textView);


textView.setText("AbhiAndroid"); //set text for text view
Android TextView
Textcolour: textColor attribute is used to set the text colour of a text view
TextView textView = (TextView)findViewById(R.id.textView);
textView.setText("AbhiAndroid"); //set text for text view
textSize: textSize attribute is used to set the size of text of a text view.
Attributes of TextView: The attributes that helps us to configure a TextView in your xml file.
id: id is an attribute used to uniquely identify a text view. An example is given in the above code
findViewById(R.id.textView);
text: setting the text in a textview programmatically means in java class.

TextView textView = (TextView)findViewById(R.id.textView);


textView.setText("AbhiAndroid"); //set text for text view
Android CheckBox
• In Android, Checkbox is a type of two state button either unchecked
or checked in Android. Or you can say it is a type of on/off switch
that can be toggled by the users. You should use checkbox when
presenting a group of selectable options to users that are not
mutually exclusive. CompoundButton is the parent class of
Checkbox class.
• In android there is a lot of usage of check box. For example, to take
survey in Android app we can list few options and allow user to
choose using CheckBox. The user will simply checked these
checkboxes rather than type their own option in EditText.
Android CheckBox
• Important Note: You can check the current state of a check box
programmatically by using isChecked() method. This method returns a
Boolean value either true or false, if a check box is checked then it returns
true otherwise it returns false. Below is an example code in which we
checked the current state of a check box.
Java code:
//initiate a check box CheckBox:
simpleCheckBox = (CheckBox) findViewById(R.id.simpleCheckBox);
//check current state of a check box (true or false)
Boolean checkBoxState = simpleCheckBox.isChecked();
Android CheckBox
• checked: checked is an attribute of check box used to set the current state of a
check box. The value should be true or false where true shows the checked
state and false shows unchecked state of a check box. The default value of
checked attribute is false. We can also set the current state programmatically.
Below is an example code in which we set true value for checked attribute that
sets the current state to checked
/*Add in Oncreate() function after setContentView()*/
// initiate a check box
CheckBox simpleCheckBox = (CheckBox) findViewById(R.id.simpleCheckBox);
// set the current state of a check box
simpleCheckBox.setChecked(true);
Android CheckBox
• text: text attribute is used to set the text in a check box. Setting text in
CheckBox

In Java class:

/*Add in Oncreate() funtion after setContentView()*/

// initiate check box

CheckBox simpleCheckBox = (CheckBox) findViewById(R.id.simpleCheckBox);


// displayed text of the check box

simpleCheckBox.setText("Text Attribute Of Check Box");


Android CheckBox
• textColor: textColor attribute is used to set the text colour of a check box.

/*Add in Oncreate() funtion after setContentView()*/

//initiate the checkbox

CheckBox simpleCheckBox = (CheckBox) findViewById(R.id.simpleCheckBox);


//red color for displayed text

simpleCheckBox.setTextColor(Color.RED);
Android CheckBox
• textSize: textSize attribute is used to set the size of text of a check box.

/*Add in Oncreate() funtion after setContentView()*/

CheckBox simpleCheckBox = (CheckBox) findViewById(R.id.simpleCheckBox);


//set 20sp displayed text size

simpleCheckBox.setTextSize(20);
Android CheckBox
• background: background attribute is used to set the background of a
check box.

/*Add in Oncreate() funtion after setContentView()*/

CheckBox simpleCheckBox = (CheckBox) findViewById(R.id.simpleCheckBox);


// set background in CheckBox
simpleCheckBox.setBackgroundColor(Color.BLACK);
Android OnClickListener
• OnClickListener is the interface you need to implement and can be set to a
view in java code.

• OnClickListener is what waits for someone to actually click, onclick


determines what happens when someone clicks.

• An OnClickListener enable you to separate the action/behavior of the click


event from the View that triggers the event.

• Since OnClickListener is an interface, the class that implements it has


flexibilities in determining the instance variables and methods that it
needs in order to handle the event.
Android On/Off Switch
• In Android, Switch is a two-state toggle switch widget that can select between
two options. It is used to display checked and unchecked state of a button
providing slider control to user.
• Switch is a subclass of CompoundButton. It is basically an off/on button which
indicate the current state of Switch. It is commonly used in selecting on/off in
Sound, Bluetooth, WiFi etc.
• As compared to ToggleButton Switch provides user slider control. The user can
simply tap on a switch to change its current state.
• Important Note: We can check the current state of a Switch programmatically
by using isChecked() method. This method returns a Boolean value means
true or false. If a Switch is checked then it returns true otherwise it returns
false.
Android On/Off Switch
• Below is an example code in which we checked the current state of a Switch.
// initiate a Switch
Switch simpleSwitch = (Switch) findViewById(R.id.simpleSwitch);
// check current state of a Switch (true or false).
Boolean switchState = simpleSwitch.isChecked();
• Checked attribute: checked attribute of Switch is used to set the current state
of a Switch.
– The value can be either true or false where true shows the checked state and false
shows unchecked state of a Switch.
– The default value of checked attribute is false. We can also set the current state
programmatically.
• Below we set “true” value for checked attribute that sets the current state to
checked.
Android On/Off Switch
Below we set the current state of Switch in java class.
/*Add in Oncreate() funtion after setContentView()*/
// initiate a Switch
Switch simpleSwitch = (Switch) findViewById(R.id.simpleSwitch);
//set the current state of a Switch
simpleSwitch.setChecked(true);
In the below code we set text of Switch via java class.
/*Add in Oncreate() funtion after setContentView()*/
// initiate Switch
Switch simpleSwitch = (Switch) findViewById(R.id.simpleSwitch);
//displayed text of the Switch
simpleSwitch.setText("switch");
Android On/Off Switch
Below we set the textOn and textOff of a Switch in java class.
/*Add in Oncreate() funtion after setContentView()*/
Switch simpleSwitch = (Switch) findViewById(R.id.simpleSwitch);
// initiate Switch displayed text of the Switch whenever it is in checked or on state
simpleSwitch.setTextOn("On");
simpleSwitch.setTextOff("Off");
Below is the example code in which we set the text colour of a Switch programmatically.
/*Add in Oncreate() funtion after setContentView()*/
Switch simpleSwitch = (Switch) findViewById(R.id.simpleSwitch);
// initiate Switch
simpleSwitch.setTextColor(Color.GREEN);
//green colour for displayed text of Switch
History of Mobile Software Development
continued…
• These early phones did little more than make and receive calls, and if you
were lucky, there was a simple contracts application that wasn’t impossible to
use.
• The first generation mobile phones were designed and developed by the
handset manufacturers. Competition was fierce and trade secrets were closely
guarded.
• Manufacturers did not want to expose the internal workings of their handsets,
so they usually developed the phone software in-house.
• As a developer, if you were not part of this inner circle, you had no
opportunity to write applications for the phones
History of Mobile Software Development
continued…
• It was during this period that the first “time-waster” games began to appear and Nokia
was famous fro putting the 1970s video game Snake on some of its earliest
monochrome phones.
• Other manufacturers followed suit, adding games such as Pong, Tetris, and Tic-Tac-Toe
• These early devices were flawed, but they did something important they changed the
way people thought about communication
• As mobile prices dropped, batteries improved, and reception areas grew, more and
more people began carrying these handy devices.
• Customers began pushing for more features and more games.
• However, there was a problem, the handset manufacturers did not have the motivation
or the resources to build every application users wanted
History of Mobile Software Development
continued…
• They needed some way to provide a portal for entertainment and information
services without allowing access to the handset.
• What better way to provide these services than the Internet?

Wireless Application Protocol (WAP)


• As it turned out, allowing direct phone access to the Internet did not scale well
for mobile.
• During this time, professional websites were full colour and chock full of text,
images and other sorts of media.
• These sites relied on JavaScript, Flash and other technologies to enhance the
user experience, and they often designed with a target resolution of 800 x 600
pixels and higher
History of Mobile Software Development
continued…
Wireless Application Protocol (WAP)
• When the first clamshell phone, the Motorola StarTAC was released in
1996, it merely had an LCD ten-digit segmented display.

• Meanwhile, Nokia released one of the first slider phones, the 8110, fondly
referred to as “The Matrix Phone” because the phone was heavily used in
films

• The 8110 could display four lines of text with 13 characters per line. See
figure 1.3 in page 15.
History of Mobile Software Development
continued…
Wireless Application Protocol (WAP)
• With their postage stamp size low resolution screens and limited storage
and processing power, these phones could not handle the data-intensive
operations required by traditional Web browsers
• The bandwidth requirements for data transmission were also costly to the
user
• The Wireless Application Protocol (WAP) standard merged to address
these concerns. Simply put, WAP was a stripped down version of
Hypertext Transfer Protocol (HTTP), which is the backbone protocol of the
WWW
History of Mobile Software Development
continued…
• Unlike traditional Web browsers, WAP browsers were designed to run
within the memory and bandwidth constraints of the phone
• Third-party WAP sites served up pages written in a markup language
called Wireless Markup Language (WML).
• These pages were then displayed on the phone’s WAP browser. Users
navigated as they would on the Web, but the pages were much simpler
in design
• The WAP solution was great for handset manufacturers. The pressure was
off, they could write one WAP browser to ship with the handset and rely
on developers to come up with the content users wanted.
History of Mobile Software Development
continued…
• The WAP solution was great for mobile operators. They could provide a
custom WAP portal, directing their subscribers to the content they wanted
to provide and collect in the data charges associated with browsing which
were often high

• For the first time, developers had a chance to develop content for phone
users, and some did so with limited success.

• Few gained any traction in the customer market because the content was
limited value and the end user experience left much to be desired
History of Mobile Software Development
continued…
• Most of the early WAP sites were extensions of popular branded websites
such as CNN.com and ESPN.com which were looking for new ways to extend
their readership
• Suddenly, phone users could access the news, stock market quotes and sports
scores on their phones
• Commercialising WAP applications was difficult and there was no built-in
billing mechanism
• Some of the most popular commercial WAP applications that emerged during
this time were simple wallpaper and ringtone catalogues that enabled users to
personalise their phones for the first time
History of Mobile Software Development
continued…
• For example, a user browsed a WAP site and requested a specific item. He
filled out a simple order form with his phone number and his handset
model. It was up to the content provider to deliver an image or audio file
compatible with the given phone
• Payment and verification were handled through various premium priced
delivery mechanisms such as Short Message Services (SMS), Enhanced
Messaging Service (EMS), Multimedia Messaging Service (MMS) and
WAP Push.
• WAP browsers in the early days were slow and frustrating. Typing long
URLs with the numeric keypad was time-consuming
History of Mobile Software Development
continued…
• WAP pages were often difficult to navigate, most sites were written one
time for all phones and did not account for individual phone
specifications.
• It did not matter if the end user’s phone had a big screen or a postage
stamp-size monochrome screen; the developer could not tailor the user’s
experience
• The result was a mediocre and not very compelling experience for
everyone involved.
• Content providers often did not bother with a WAP site and instead just
advertised SMS short codes on TV and in magazines.
History of Mobile Software Development
continued…
• In this case, the user sent a premium SMS message with a request for a
specific wallpaper or ringtone. And the content provider sent it back.
• Mobile operators generally liked these delivery mechanisms because they
received a large portion of each messaging fee.
• WAP fell short of commercial expectations. In some markets such as Japan, it
flourished whereas in others like Unites States, it failed to take off.
• Handset screens were too small for surfing; reading a sentence fragment at a
time, and then waiting seconds for the next fragment to download, ruined the
user experience, especially because every second of downloading was often
charged to the user.
History of Mobile Software Development
continued…
• As a result, critics began to call WAP “Wait to Pay”.
• Finally, the mobile operators who provided the WAP portal (the default
home page loaded when you started your WAP browser) often restricted
which WAP sites were accessible.
• The portal enabled the operator to restrict the number of sites users could
browse and to funnel subscribers to the operator’s preferred content
providers and exclude competing sites.
• This kind of walled garden approach further discouraged third-party
developers, who already faced difficulties in monetarising applications,
from writing applications
History of Mobile Software Development
continued…
Proprietary Mobile Platforms
• Writing robust applications with WAP, such as graphics-intensive video
games, was nearly impossible. The 18-to-25 year old sweet-spot
demographic, the kid with the disposable income most likely to
personalise their phones with wallpaper and ringtones; looked at their
portable gaming systems and asked for a device that was both a phone
and a gaming device or a phone and a music player.
• They argued that is devices such as Ninten-do’s Game Boy could provide
hours of entertainment with only five buttons, why not just add phone
capabilities?
History of Mobile Software Development
continued…
Proprietary Mobile Platforms
• Others looked at their digital cameras, Palms, BlackBerries, iPods, even their
laptops and asked the same question; the market seem to be teetering on the
edge of device convergence.
• Memory was getting cheaper, batteries were getting better, and PDAs and
other embedded devices were beginning to run compact versions of common
operating systems such as Linux and Windows.
• The traditional desktop application developer was suddenly a player in the
embedded device market, especially with smartphone technologies such as
Windows Mobile, which they found familiar.
History of Mobile Software Development
continued…
Proprietary Mobile Platforms
• Handset manufacturers realised that if they wanted to continue to sell
traditional handset, they needed to change their protectionist policies
pertaining to handset design and expose their internal frameworks to some
extent.
• A variety of proprietary platforms emerged for traditional handsets. Some
smartphone devices ran Palm OS (later known as WebOS) and IRM BlackBerry
OS.
• Sun Microsystems took its popular Java platform and J2ME emerged (now
known as Java Micro Edition [Java MEJ]
History of Mobile Software Development
continued…
Proprietary Mobile Platforms
• Chipset maker Qualcomm developed and licensed its Binary Runtime Environment for
Wireless (BREW)
• Other platforms, such as Symbian OS, were developed by handset manufacturers such
as Sony Ericsson, Motorola, and Samsung. The Apple iPhone OS (OS X iPhone) joined
the ranks in 2008.
• Many of these platforms operate associated developer programs. These programs keep
developer communities small, vetted, and under contractual agreements on what they
can and cannot do. These programs are often required, and developers even pay to
participate.
• Each platform has benefits and drawbacks and developers love to debate about which
platform is “the best.”
History of Mobile Software Development
continued…
Proprietary Mobile Platforms
• The truth is that no one platform has emerged victorious. Some platforms are best suited for
commercialising games and making millions if your company has brand backing.
• Other platforms are more open and suitable for the hobbyist or vertical market applications
• No mobile platform is best suited for all possible applications. As a result, the mobile phone
market has become increasingly fragmented, with all platforms parts of the pie.
• For manufacturers and mobile operators, handset product lines quickly became complicated.
Platform market penetration varies greatly by region and user demographic.
• Instead of choosing just one platform, manufacturers and operators have been forced to sell
phones for all different platforms to compete in the market.
• For example, BlackBerry 10 phones provide a runtime support Android applications
History of Mobile Software Development
continued…
Proprietary Mobile Platforms
• The mobile developer community has become as fragmented as the market. It
is nearly impossible to keep track of all the changes. Developer specialty
niches have formed. The platform development requirements vary greatly.

• Mobile software developers work with distinctly different programming


environments, different tools, and different programming languages. Porting
among the platforms is often costly and not straightforward.

• Furthermore, application testing services, signing and certification programs,


carrier relationship management service, and application marketplaces have
become complex spin-off businesses of their own.
History of Mobile Software Development
continued…
Proprietary Mobile Platforms
• It’s a nightmare for the ACME Company that wants a mobile application.
Should it develop an application for BlackBerry? iPhone? Windows Phone?
Everyone has a different kind of phone. ACME is forced to choose one or
worse, all of the platforms.

• Some platforms allow for free applications, whereas others do not.


Vertical market application opportunities are limited and expensive.

• As a result, many wonderful applications have not reached their desired


users and many other great ideas have not been developed at all.
History of Mobile Software Development
continued…
The Open Handset Alliance
• Google has shown an interest in spreading its vision, its brand, its search and ad revenue based platform
and its suite of tools to the wireless marketplace.
• The company’s business model has been amazingly successful on the internet and technically, wireless is
not different.
Goggle Goes Wireless
• The company’s initial venture into mobile were best with all the problems encountered.
• The freedoms Internet users enjoyed were not shared by mobile phones subscribers.
• Internet users can choose from a wide variety of computer brands, operating systems, Internet service
providers and Web browsers applications
• Nearly all Google services are free and ad driven. Many applications in the Google Labs suite directly
compete with the applications available on the mobile phones.
• The applications range from simple calculators and calendars to navigation with Google Maps and latest
tailored news from News Alerts, not to mention corporate acquisitions such as Blogger and YouTube
History of Mobile Software Development
continued…
The Open Handset Alliance
Goggle Goes Wireless

• When this approach did not yield the intended results, Google decided on
a different approach, to revamp the entire system upon which application
development was based, hoping to provide a more open environment for
users and developers: the Internet Model

• The Internet model allows users to choose among freeware, shareware


and paid software. This enables free-market competition among services
History of Mobile Software Development
continued…
The Open Handset Alliance
Forming the Open Handset Alliance
• With its user-centric, democratic design philosophies, Google has led Aa
movement to turn the existing closely guarded wireless market into one
where phone users can move between carriers easily and have unfettered
access to applications and services.
• With its vast resources, Google has taken a broad approach, examining the
wireless infrastructure from the Federal Communications Commission
(FCC) wireless spectrum policies to the handset manufacturer’s
requirements, application developer needs and mobile operator desires.
History of Mobile Software Development
continued…
The Open Handset Alliance
Forming the Open Handset Alliance
• Google also joined with other like-minded members in the wireless community and
posed the following question: What would it take to build a better mobile phone?
• The Open Handset Alliance (OHA) was formed in 2007 to answer that question.
• The OHA is a business alliance composed of many of the largest and most successful
mobile companies on the planet.
• Its members include chip makers, handset manufacturers, software developers, and
service providers. The entire mobile supply chain is well represented.
• Andy Rubin has been credited as the father of the Android platform. His company,
Android, Inc., was acquired by Google in 2005.
History of Mobile Software Development
continued…
The Open Handset Alliance
Forming the Open Handset Alliance
• Working together, OHA members, including Google, has began developing an
open-standard platform based on technology developed at Android, Inc., that
would aim to alleviate the aforementioned problems hindering the mobile
community. The result is the Android project.
• Google’s involvement in the Android project has been so entensive that who
takes responsibility for the Android platform (the OHA or Google)is unclear.
• Google provides the initial code for the Android open-source project and
provides online Android documentation, tools, forums, and the Software
Development Kit (SDK) for developers
History of Mobile Software Development
continued…
The Open Handset Alliance
Forming the Open Handset Alliance
• Most major Android news originates from Google. The company has also hosted a
number of events at conferences (Google IO, Mobile World Congress, Cellular
Telecommunications Industry Association (CTIA) Wireless) and the Android
Developer Challenge (ADC), a series of contests to encourage developers to write
killer Android applications, for millions of dollars to spur development on the
platform.

• Google is not the only organisation that is involved in this initiative but it is the
driving force behind the platform.
History of Mobile Software Development
continued…
The Open Handset Alliance
Manufacturers: Designing Android Devices
• More than half the members of the OHA are device manufacturers, such as
Samsung, Motorola, Dell, Sony Ericsson, HTC and LG and semiconductor
companies such as Intel, Texas Instruments, ARM, NVIDIA, and Qualcomm

• The first shipping Android handset, the T-Mobile G1, was developed by handset
manufacturer HTC with service provided by T-Mobile and released in 2008.

• Many other Android handsets were scheduled for 2009 and early 2010. the
platform gained momentum relatively quickly.
History of Mobile Software Development
continued…
The Open Handset Alliance
Manufacturers: Designing Android Devices
• By the fourth quarter of 2010, Android had come to dominate the smartphone
market, gaining ground steadily against competitive platforms such as Research in
Motion (RIM) BlackBerry, Apple iOS, and Windows Mobile.

• Google normally announces Android platform statistics at its annual Google IO


conference each year and at important events, such as financial earnings calls

• As of May 2013, Android devices were being shipped to more than 130 countries,
more than 1,5 million new Android devices were being activated every day, and
about 9000 million devices have been activated in total
History of Mobile Software Development
continued…
The Open Handset Alliance
Manufacturers: Designing Android Devices
• The advantages of widespread manufacturer and carrier support appear to be
really paying off at this point.

• Manufacturers continue to create new generations of Android devices from


phones with HD displays, to watches for managing exercise programs, to dedicated
e-books readers to full-featured televisions, netbooks, and almost ant other
“smart” device you can imagine.
History of Mobile Software Development
continued…
The Open Handset Alliance
Mobile Operators: Delivering the Android Experience
• After you have the devices, you have to get them out to the users. Mobile
operators from North, South, and Central America as well as Europe, Asia, India,
Australia, Africa and the Middle East have joined the OHA, ensuring a worldwide
market for the Android movement.
• With almost half a billion subscribers alone, telephony giant China Mobile is a
founding member of the alliance.
• much of Android’s success is also due to the fact that many Android handsets do
not come with the traditional smartphone price tag, quite a few are offered free
with activation by carriers
History of Mobile Software Development
continued…
The Open Handset Alliance
Mobile Operators: Delivering the Android Experience
• Competitors such as Apple iPhone have struggled to provide competitive offerings
at the low end of the market. For the first time, the average Jane or Joe can afford
a feature-full smart device.
• Many people from wait staff to grocery store clerks, say how much their lives have
changed for the better after receiving their first Android phone. This phenomenon
has added to the Android’s underdog status.
• Google has also created its own Android brand known as Nexus. There are
currently three devices in the Nexus line, the Nexus 4, 7 , and 10, each created in
partnership with the handset manufacturers LG, Asus, and Samsung, respectively.
History of Mobile Software Development
continued…
The Open Handset Alliance
Mobile Operators: Delivering the Android Experience
• The Nexus devices provide the full, authentic Android experience as Google
intends.

• Many developers use these devices for building and testing their applications
because they are the only devices in the world that receive the latest Android
operating system upgrades as they are released.

• If you too, would like your applications to work on the latest Android operating
system version, you should consider investing in one or more of these devices.
History of Mobile Software Development
continued…
The Open Handset Alliance
Apps Drive Device Sales: Developing Android Applications
• When users acquire Android devices, they need those killer apps, right?
• Initially, Goggle led the pack in developing Android applications, many of which, such as
the email client and Web browser, are core features of the platform.
• They also developed the first successful distribution platform for third-party Android
applications: the Android Market, now known as the Google Play store.
• The Google play store remains the primary method by which users download apps, but
it is no longer the only distribution mechanism for Android apps.
• Since July 2013, there have been more than 50 billion application installations from the
Google Play store.
History of Mobile Software Development
continued…
The Open Handset Alliance
Apps Drive Device Sales: Developing Android Applications
• This takes into account only application installations from one marketplace, not
the many other applications sold individually or on other markets.

• These numbers also do not take into account all the Web applications that target
mobile devices running the Android platform.

• This opens up even more application choices for Android users and more
opportunities for Android developers

• The Google Play store has recently received a significant redesign, and there has
been a growing effort to increase the exposure and sales of game applications.
History of Mobile Software Development
continued…
The Open Handset Alliance
Apps Drive Device Sales: Developing Android Applications
• One way Google plans to increase the distribution of games is by providing the new
Google Play Game Services SDK.
• This SDK will allow developers to add real time social features to games and application
programming interfaces (APIs) for implementing leaderboards and achievements to
help drive new users to applications, while continuing to engage existing users.
• Another reason for the Google Play redesign is to help drive sales of content. Users are
always looking for new music, movies, TV shows, books, magazines, and more, and
Google Play’s focus on content has placed it in a position to keep up with user
demand for such services.
History of Mobile Software Development
continued…
The Open Handset Alliance
Taking Advantage of all Android has to Offer
• Android’s open platform has been embraced by much of the mobile development
community extending far beyond the members of the OHA.

• As Android devices and applications have become more readily available, many
other mobile operators and device manufacturers have jumped at the chance to
sell Android devices to their subscribers, especially given the cost benefits
compared to proprietary platforms.

• The open standard of the Android platform has resulted in reduced operator costs
in licensing and loyalties, and we are now seeing a migration to more open devices
History of Mobile Software Development
continued…
The Open Handset Alliance
Taking Advantage of all Android has to Offer
• The market has cracked wide open; new types of users are able to consider
smartphones for the first time. Android is well suited to fill this demand.
History of Mobile Software Development
continued…
The Android Marketplace: Where we are now
The Android market place continues to grow at an aggressive rate on all fronts
(devices, developers and users). Lately, the focus has been on several topics:
• Competitive hardware and software feature upgrades: the Android SDK
developers have focused on providing APIs for features that are not available on
competing platforms to move Android ahead in the market. For example, recent
releases of the Android SDK have featured significant improvements such as
Google Now contextual services
• Expansion beyond smartphones: tablet usage is on the rise with Android users.
There are many new tablets on the market with Android Jelly Bean that come in
many different sizes and form factors
History of Mobile Software Development
continued…
The Android Marketplace: Where we are now
• Some hardware manufacturers are even using Android for gaming consoles. Some
hardware manufacturers are even using Android for gaming consoles, smart
watches, and TVs, in addition to many other types of devices that require an
operating system

• Improved user-facing features: the Android development team has shifted its
focus from feature implementation to providing user-facing upgrades and
“chrome.” They have invested heavily in creating a smoother, faster, more
responsive user interface, in addition to upgrading their design documentation
with excellent trainings with best practices for developers to follow.
History of Mobile Software Development
continued…
The Android Marketplace: Where we are now
• Improved user-facing features: those principles are centered around three goals
and focused on the user experience: “Enchant me,” “Simplify my life,” and “Make
me amazing. ” Following these principles should help any application increase
usability.
History of Mobile Software Development
continued…
Android Platform Differences
The Android platform itself is hailed as “the first complete, open, and free mobile
platform”:
• Complete: the designers took a comprehensive approach when they developed
the Android platform. They began with a secure operating system and built a
robust software framework on top that allows for rich application development
opportunities.
• Open: the Android platform is provided through open-source licensing. Developers
have unprecedented access to the device features when developing applications.
• Free: Android applications are free to develop. There are no licensing fees for
developing on the platform. No required membership fees and testing fees.
History of Mobile Software Development
continued…
Android Platform Differences
• Free: No required signing or certification fees. Android applications can be
distributed and commercialised in a variety of ways. There are no costs for
distributing your applications on your own, but to do so in Google Play store
requires registration and paying a small, one time $25 fee.

• The term free implies there might actually be costs for development, but they are
not mandated by the platform. Costs for designing, developing, testing, marketing,
and maintaining are not included. If you provide all of these, you may not be laying
out cash, but there is a cost associated with them. The $25 developer registration
fee is designed to encourage developers to create quality applications.

You might also like