Seminar Topics & Project Ideas On Computer Science Electronics Electrical Mechanical Engineering Civil MBA Medicine Nursing Science Physics Mathematics Chemistry ppt pdf doc presentation downloads and Abstract

Full Version: Effective Development of Andriod Applications using Andriod Services
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Effective Development of Andriod Applications ausing Andriod Services

[attachment=54138]

Abstract

Android is the most popular operating system
for mobile devices like smart phones and tablets. Android
is developed on top of Linux with some modifications
suitable for mobile devices. Gartner survey [1] stated that
android shares 43% of smart phone market, while apple is
only 18%. There are 400,000+ apps available in android
market and 556,750+ apps are there in Apple app store
These figures shows the importance of developing apps for
android. Here the question is how to make your app
selective/popular/effective for the users among thousands
of Apps. Android provides a lot of flexibility to the
developers. SERVICES are the most important application
components in Android. This paper will discuss about
services that can be used to make your apps effective. How
to use services where to use services, and where they are
not helpful, and how services differ with Threads and
Async task with the help of three example Apps.

INTRODUCTION

Today, smart phones are the replacement of
Computers/Laptops. Smart phones demands apps with
high Responsiveness, Rich UI. Using Services in apps
can make them High responsive. Android provide four
types of application components [2]. They are Activities,
Services, Content Providers and Broadcast receivers. A
service can perform long running operations in
background. Service does not provide UI.
Services might use for playing Music, performing
File I/O operations, Network transactions all from the
background. Here for these operations developers can
also use Async task or threads .But why we have to use
services? The answer is whenever resources required the
system kills some processes. Async task and threads are
having more priority than services to get killed by
System. And another advantage is service can be
specified with what to do after recreation of service.
There are three types of services [3] 1) Started service 2)
Bounded service 3) Started cum bounded services.

IMPLEMENTATION OF SERVICES

As mentioned in section 1 there are three types of
services 1) started service 2) bounded service 3) started
cum bounded service

Started Service

Started services [4] are Services that are started by
an application component by calling startService()
method. Started service will hold the resource even if
the components which started it are not destroyed.
Started services do not allow the activities to interact
with them. Once started they performs a operation and
does not return any result to the caller. A started service
runs until someone stops the service by stopService() or
service stopped by itself using stopSelf(), after
completion of operation. If no stopService() or stopSelf ()
is called then the service will be exist even after
completion of operation. The service is destroyed if
system running out of resources.

Bounded Service

A service is said to be “Bound” [5] when an
application component is bound to it by calling
bindService(). Advantage of the bounded services is
they offer a client server interaction. It means the clients
bounded to a service can send a request and get the
results from the service. Multiple components can get
bound to a service. Here important thing to note is
among the android’s four application components only 3
types of components can bound to a service. They are
Activities, Services and Content providers. We cannot
bind a service from broadcast receiver. A bounded
service runs until the components that are bounded to
the service and will destroyed if all the components
bounded to it are destroyed.

Started Cum Bounded Service

As the name suggests, Service first started by any
application component by startService() and then some
other components may get bound to this service. Here
the service is remains even if all the components get
unbounded from service. This service is stopped in a
way similar to started service. Simply we can say this as
a started service with interaction. This type is not
mentioned anywhere but this is possible.
Like all Application components are declared in
manifest file Services also should be mentioned in
Android manifest file. You can also define intent filters
for service. The intent filters allow the components to
call your service even from any other applications
installed on user’s device. For now I am not discussing
more about intent filters here is the way to declare
services in manifest file [6]

RESULTS

If we apply these fundamentals in implementation of
internet based Android apps we will get effective results.
The example screens for the cricinfo App are shown
below. As shown in figure4 the service is running
indefinitely and getting updates from server and also
post them in UI.
Figure 5 shows the score screen. When app is
opened, it readily displays the updated score without any
delay. This is because service is updating the score, so
whenever app is opened it displays the updated score.
But without services user need to wait to see the score,
because the request for updated score is fired when user
opened the App.

CONCLUSION

The Android Phone platform has offered a lot of
opportunities for developing new kinds of applications
and games. This paper provides an insight to the
developers to use services in developing internet based
applications. This noble approach of services provides
flexibility of implementation of developer’s thoughts
with fewer efforts .usage of services in makes apps
effective and can implement the rich user interface
methodologies.
The service mechanism allows developer to increase
the multitasking ability of the android phone. Services
play an important role in developing legacy applications
like developing a generic Photoviewer application. This
can upload photos to multiple photo hosting sites
simultaneously.