1. RESEARCH ON MOBILE LOCATION
SERVICE DESIGN BASED ON
“ANDROID”
Presented By :
Harish Kumar Upadhyay
Roll 31 ,IT ‘A’
SOE,CUSAT 1
2. THE PAPER WAS ORIGINALLY PRESENTED BY
XIANHUA SHU, ZHENJUN DU, RONG CHEN
SCHOOL OF INFORMATION SCIENCE AND TECHNOLOGY
DALIAN MARITIME UNIVERSITY
DALIAN, CHINA
2
3. OVERVIEW OF SEMINAR
1) INTRODUCTION TO ANDROID
2) ANDROID ARCHITECTURE
3) ANATOMY OF AN ANDROID APPLICATION
4) LOCATION BASED MOBILE SERVICE DESIGN
5) CONCLUSION
3
4. Q)HOW MANY OF YOU FACED THE INTERVIEW
QUESTION “TELL ME THE RECENT
ADVANCEMENT IN THE FIELD OF
TECHNOLOGY”?
ANS : TWO OF THE BEST POSSIBLE CHOICES
WOULD HAVE BEEN
1) “GEOLOCATION” AND 2) “ANDROID”
4
5. INTRODUCTION TO ANDROID :
This is not physics !
This is not chemistry !
This is not mathematics !
This certainly is not biology !
We will see today “ ANDROIDOLOGY “.
5
7. INTRODUCTION TO ANDROID :
Q) WHAT IS ANDROID ?
ANS: ANDROID MEANS
“A ROBOT WITH A HUMAN APPEARANCE”
Android is an operating system for mobile devices such
as smartphones and tablet computers. It is developed by
the Open Handset Alliance led by Google
It is built on top of modified linux kernel .This is the best thing
about ANDROID is it is free and open source Which means the
OS and its source code is available for free download and
editing.openhandsetalliance.com .
Applications are java based and can be created using ecllipse
as IDE. C/C++ can be used for creating libraries but they cannot
be used for coding application .They are not supported . 7
8. INTRODUCTION TO ANDROID :
• The Open Handset Alliance (OHA) is a business
alliance of firms to develop open standards for mobile devices.
Member Firms Include Google, HTC,
Sony, Dell, Intel, Motorola, Qualcomm, Texas
Instruments, Samsung, LG, T-Mobile, Nvidia, and Wind River
Systems and others.
8
9. INTRODUCTION TO ANDROID :
Google products gmail,gtalk,google chrome ,chrome OS ,
bing , google + has already caught the attention of users
because of its easier interface and usability .And Android is
one of them .
The conception of the Android platform is attracting more
and more programmers in mobile computing fields 9
10. INTRODUCTION TO ANDROID :
• THE ANDROID PHONES CAN BE CUSTOMIZED AS PER
THE USER CONVENIENCE
. THE OPEN HANDSET ALLIANCE RELEASED THE
GOOGLE ANDROID SDK ON NOVEMBER 12, 2007
. THE ANDROID SDK PROVIDES POWERFUL TOOLS
AND APIS NECESSARY TO DEVELOP APPLICATIONS ON
THE ANDROID PLATFORM USING THE JAVA
PROGRAMMING LANGUAGE
10
11. INTRODUCTION TO ANDROID :
. ANDROID PLATFORM IS OF OPEN SYSTEM
ARCHITECTURE(LAYERED STRUCTURE WITH EACH LAYER
EXISTING AS INDIVIDUAL ).IT SUPPORTS A VERY
POWERFUL BROWSER
. IT USES A DALVIK VIRTUAL MACHINE HEAVILY
OPTIMIZED FOR MOBILE DEVICES.THE JAVA CODES ARE
CONVERTED TO BYTECODE.THE BYTECODE TO .CLASS
TYPE FILE UNDERSTANDABLE BY JAVA VIRTUAL MACHINE
AND THEN TO .DEX FILE BY “DX” TOOL.
. ANDROID PLATFORM WILL NOT ONLY PROMOTE THE
TECHNOLOGY (INCLUDING THE PLATFORM ITSELF) OF
INNOVATION, BUT ALSO HELP TO REDUCE
DEVELOPMENT COSTS . 11
12. INTRODUCTION TO ANDROID :
. ANDROID ALSO SUPPORTS GPS, VIDEOCAMERA,
COMPASS, AND 3D-ACCELEROMETER AND PROVIDES
RICH APIS FOR MAP AND LOCATION FUNCTIONS.
USERS CAN FLEXIBLY ACCESS, CONTROL AND
PROCESS THE FREE GOOGLE MAP AND IMPLEMENT
LOCATION BASED MOBILE SERVICE IN HIS MOBILE
SYSTEMS AT LOW COST
. A TABLET NAMED “AAKASH” WAS RELEASED ON
SATURDAY BY AN INDIAN COMPANY –DATAWIND .THIS
IS THE CHEAPEST TABLET EVER MADE.IT COSTS INR
2576 . THIS TABLET IS BASED ON “ANDROID 2.2”.
12
13. INTRODUCTION TO ANDROID :
• It enables reuse and replacement of components
and an efficient database support and support
various wireless communication means
The conception of the Android platform is
attracting more and more programmers in mobile
computing fields. There are over 1,50,000
applications and the android market is growing
every day, evey hour every minute and every
second .Even at the time of presentation someone
in some part of the world migth be creating some
android application .
13
18. ANDROID ARCHITECTURE
APPLICATIONS
Contact Quick
Home Maps Phone Browser
s Fix
APPLICATION FRAMEWORK
Activity Telephony Content View
Manager Manager Provider System
Package Resource Location
Manager Manager Manager
LIBRARIES ANDROID RUNTIME
SQLite Dalvik Virtual
Core Libraries
Machine
LINUX KERNEL
Capstone Team#5 : Google's Android Mobile Application 9:42:16 AM
5/12/2012 18
19. Android SDK installation
1)DOWNLOAD THE SDK AND COMPATIBLE SDK.
2)INSTALL THE PACKAGES AND THE
ENVIRONMENT(HERE 3.2)
3)CREATE “AVD” SELECTING THE TARGET .
4)SET THE PROPERTIES IN THE ADVANCED SETTING
OF YOUR COMPUTER TO THE PATH TOOLS/
5)AVD MUST BE CONFIGURED START THE SDK
MANAGER FROM THERE YOU GET THE MESSAGE NO AVD
DEVICE FOUND CREATE A NEW ONE THEREAFTER
6)COMMAND FOR RUNNING THE “AVD”
EMULATOR @AVDNAME E.G. EMULATOR @HARISH
19
21. Android applications have
common structure
Views such as lists,
grids, text boxes, An Activity Manager that
buttons, and even manages the life cycle of
an embeddable web applications and provides a
browser common navigation
backstack
Content Providers A Notification Manager that
that enable enables all apps to display
applications to custom alerts in the status
access data from bar
other applications
(such as Contacts),
A Resource Manager,
or to share their
providing access to non-
own data
code resources such as
localized strings, graphics,
and layout files
23. These are the 4 building blocks of
android application .
Activity
IntentReceiver
Service
ContentProvider
Not every
application needs to have all four, but a user’s application will
be written with some combination of these. Once the user has
decided what components are needed for the application, they
should be listed in a file called AndroidManifest.xml, which is
where the components of the application are declared and what
their capabilities and requirements are
24. Activities
• usually a single screen.
• Each implemented as single class.
• most apps consists of multiple screens ,each
screen will be an activity .
• When we switch from one activity to another ,the
older one is paused and put on stack .It is called
back again on resume .
• Android uses a special class called Intent to move
from screen to screen.
25. Intents
Home
Picasa
Photo Gallery
Contacts
“Pick photo”
GMail
Client component makes a
Chat System picks best
request for a specific action
New components can use
component for that action
Blogger
Blogger
existing functionality
26. IntentReceivers
You can use an IntentReceiver when you want code in your
application to execute in reaction to an external event, for
example, when the phone rings, or when the data network
is available, or when it's midnight.
Intent receivers do not display a UI, although they may
display Notifications to alert the user if something
interesting has happened.
Intent receivers are also registered in AndroidManifest.xml,
but you can also register
Your application does not have to be running for its intent
receivers to be called;
the system will start your application, if necessary,
27. Services
A Service is code that is long-lived and runs
without a UI
(IN BACKGROUND).
A good example of this is a media player
playing songs from a play list. In a media
player application, there would probably be
one or more activities that allow the user to
choose songs and start playing them.
28. ContentProviders
A content provider, however, is useful if you
want your application's data to be shared
with other applications.
A content provider is a class that implements
a standard set of methods to let other
applications store and retrieve the type of
data that is handled by that content provider.
30. Common uses of location in apps
1) Plotting a point on a map.
2) Navigation/directions to a point on a map.
3) Finding a local point of interest (nearest ATM ,nearby
restaurants. Etc.
4) Vehicle/traffic tracking
5) Local weather. And countless other things .
Flexible map display and control functions and location
support are provided in Android for mobile system design
31. Location base service
• LBS stands for location based service .
• Location based service is forcasted to be a big
revenue .(Revenue expected to be 10 billion
by 2015 . So it is expected to grow at a high
rate.
KEY CONCEPTS :
1) How do we get the current location
2) Using google map API extension.
32. Location Technologies
network-based
TOA ( Time of Arrival)
Base Station 1
Mobile
T=distance 1
1
Base Station 2
T=distance 2
2
Base Station 3
=distance 3
T3
32
33. HOW LOCATION WORKS ?
* Android provides a location framework
- Determine the device’s location
* It can be a combination of GPS and Network Location(Cell
tower and /wi-fi) or just one technology
We then use the Android Location-Based API to collect
user current position and display that location on the screen,
and use Google Maps to display the current user location on
the cell phone.
34. Location Technologies
handset-based
EOTD (Enhanced Observed Time Difference)
Difference 1-3
Base Station 1 Difference 1-2
Clock time 1
Mobile Clock time 2
Base Station 3
Clock time 3
Base Station 2 Difference 2-3
34
36. GETTING CURRENT LOCATION :-
The Android has a LocationManager
- Implement a LocationListener
- Call requestLocationUpdates() passing your
LocationListener
- Can define GPS/Network Location Provider at the same
time
LocationManager will use callback methods' implemented
in LocationListener when :
-Location is changed
- Status of location service changes
For improving performance
-getLastKnownLocation
-min time and min Distance for updating .
37. LOCATION PERMISSION
* Manifest file:user permission request
• -ACCESS_COARSE_LOCATION
• -ACCESS_FINE_LOCATION(GPS AND/OR Network
Location Provider)
Application will fail at without requesting and being granted
necessary permissions .
38. KEY CLASSES :
1) GeoPoint : a pair of latitued and longitude cordinate
2) MapView :displays a map with data obtained from the Google Maps
service
- built in zoom and pan capabilities
- Support for satellite ,traffic and street views
MapView is used to display a view of the map. It can accept the keyboard
events such as onKeyDown and onKeyUp to support the map movement
and the zoom feature. It also supports multi-layer Overlay and user can
draw coordinates,pictures and strings on the map. MapView is set up
only byMapActivity.
3) Overlay : Which can be displayed on top of map like :direction or
compass
39. LOCATION BASED MOBILE SERVICE DESIGN
MAP PROCESS:
-Add maps add-on for google APIs to project
- Multiple versions are available for different API level s
*Manifest file: add<user-library> with com.google.android.maps
-get a MAP API
Sign application with certificate associated with Map API key
40. MapView is required to be added into the layout
create a LocationManager from which we can get the
coordinate values:
41. GETTING CURRENT LOCATION :-
• Dalvik Debug Monitor Server (DDMS)
• Keyhole Markup Language (KML) is an XML notation for expressing
geographic annotation and visualization within Internet-based, two-
dimensional maps and three-dimensional Earth browsers
42. Definition – Reference Point
Reference point: Place taken as a reference
on target path in the cell data collection
process (e.g. bus stop, railway stations)
42
43. Definition – Point of
Interest
Point of Interest (POI): Location that is
interested in the application level (e.g.
building, tourist spot)
43
47. Application in Action (4)
3. The application keeps
track of the location of the
user in the path at each
reference point
47
48. Application in Action (5)
4. Display the information
about the point of interest
(destination)
48
49. CONCLUSIONS
The feature of location based service is emphasized on
Android platform. One can integrate a fully zoom and
drag enabled map by adding just few lines in the java
code and XML code to the Android-Default-Application.
Through this paper, the availability and performance of
the platform is verified and the design result also shows
the easiness to implement self-location,to perform
queries and to flexibly control the real-time map on
Android. The actual system also achieves high running
performance.
The future work is to design a more powerful mobile
location-based system featured with more unique
customized functions based on Android.
50. [5] C. Haseman, Android Essentials, PDF Electronic
Book, 2008.Available
from: http://androidos.cc/dev/index.php.
[6] N. Gramlich, Android Programming , PDF
Electronic Book, 2008 Available from:
http://androidos.cc/dev/index.php.
[7] Wikipedia :
www.wikipedia.org
OPEN TO QUESTIONS AND SUGGESTIONS….
50