Android the future

51
RESEARCH ON MOBILE LOCATION SERVICE DESIGN BASED ON ANDROIDPresented By : Harish Kumar Upadhyay Roll 31 ,IT ‘A’ SOE,CUSAT 1

description

It was a seminar topic for Harish Kumar Upadhyay of IT-A, CUSAT (2012 passout)It deals with the introduction and architecture of Android, its uses and one project into based on Android

Transcript of Android the future

Page 1: Android  the future

RESEARCH ON MOBILE LOCATION SERVICE DESIGN BASED ON

“ANDROID”

Presented By :Harish Kumar Upadhyay Roll 31 ,IT ‘A’SOE,CUSAT

Page 2: Android  the future

THE PAPER WAS ORIGINALLY PRESENTED

BY

XIANHUA SHU, ZHENJUN DU, RONG CHEN SCHOOL OF INFORMATION SCIENCE AND TECHNOLOGY DALIAN MARITIME UNIVERSITY DALIAN, CHINA

Page 3: Android  the future

1) INTRODUCTION TO ANDROID

OVERVIEW OF SEMINAR

2) ANDROID ARCHITECTURE3) ANATOMY OF AN ANDROID APPLICATION

4) LOCATION BASED MOBILE SERVICE DESIGN

5) CONCLUSION

Page 4: Android  the future

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 BEEN1) “GEOLOCATION” AND 2)

“ANDROID”

Page 5: Android  the future

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 “.

Page 6: Android  the future

Introduction to Android

Page 7: Android  the future

Q) WHAT IS ANDROID ?

INTRODUCTION TO 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 .

Page 9: Android  the future

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

Page 10: Android  the future

• 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 TOOLSAND APIS NECESSARY TO DEVELOP APPLICATIONS ON THE ANDROID PLATFORM USING THE JAVA PROGRAMMING LANGUAGE

INTRODUCTION TO ANDROID :

Page 11: Android  the future

. 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) OFINNOVATION, BUT ALSO HELP TO REDUCE DEVELOPMENT COSTS .

INTRODUCTION TO ANDROID :

Page 12: Android  the future

. 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”.

INTRODUCTION TO ANDROID :

Page 13: Android  the future

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 .

Page 14: Android  the future

INTRODUCTION TO ANDROID :

Page 15: Android  the future

INTRODUCTION TO ANDROID :

Page 16: Android  the future

ANDROID ARCHITECHTURE

Page 17: Android  the future

ANDROID ARCHITECTURE

Page 18: Android  the future

04/10/2023 12:44:00 PMCapstone Team#5 : Google's Android Mobile Application 18

HomeContac

tsPhone

Quick Fix

MapsBrowse

r

APPLICATIONS

APPLICATION FRAMEWORK

Activity Manager

Resource Manager

Package Manager

Content Provider

Telephony Manager

Location Manager

View System

LIBRARIES

SQLite

ANDROID RUNTIME

Core Libraries

Dalvik Virtual Machine

LINUX KERNEL

ANDROID ARCHITECTURE

Page 19: Android  the future

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

Android SDK installation

Page 20: Android  the future

20

EMULATOR @AVD

Android SDK installation

Page 21: Android  the future

Android applications have common structureViews such as

lists, grids, text boxes, buttons, and even an embeddable web browser

Content Providers that enable applications to access data from other applications (such as Contacts), or to share their own data

A Resource Manager, providing access to non-code resources such as localized strings, graphics, and layout files

A Notification Manager that enables all apps to display custom alerts in the status bar

An Activity Manager that manages the life cycle of applications and provides a common navigation backstack

Page 22: Android  the future

22

ANATOMY OF ANDROID APPLICATION

Page 23: Android  the future

These are the 4 building blocks of android application . Activity IntentReceiver Service ContentProvider

Not everyapplication needs to have all four, but a user’s application willbe written with some combination of these. Once the user hasdecided what components are needed for the application, theyshould be listed in a file called AndroidManifest.xml, which iswhere the components of the application are declared and whattheir capabilities and requirements are

Page 24: Android  the future

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.

Page 25: Android  the future

Intents

GMail

Contacts

Home

Blogger

ChatClient component makes a request for a specific action

“Pick photo”

Picasa

System picks best component for that actionNew components can use existing functionality

Blogger

Photo Gallery

Page 26: Android  the future

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,

Page 27: Android  the future

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.

Page 28: Android  the future

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.

Page 29: Android  the future

29

LOCATION BASED SERVICE DESIGN

Page 30: Android  the future

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 tracking5) Local weather. And countless other things .

Flexible map display and control functions and location

support are provided in Android for mobile system design

Page 31: Android  the future

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.

Page 32: Android  the future

32

Location Technologiesnetwork-based

TOA ( Time of Arrival)

Mobile

Base Station 1

1T =distance 1Base Station 2

Base Station 32T

3T

=distance 2

=distance 3

Page 33: Android  the future

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 collectuser current position and display that location on the

screen,and use Google Maps to display the current user location onthe cell phone.

Page 34: Android  the future

34

Location Technologieshandset-based

EOTD (Enhanced Observed Time Difference)

Base Station 1

Base Station 2

Base Station 3Mobile

Clock time 3

Clock time 2

Clock time 1

Difference 1-2Difference 1-3

Difference 2-3

Page 35: Android  the future

LOCATION BASED MOBILE SERVICE DESIGN LOCATION TECHNOLOGIES :

Page 36: Android  the future

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 .

Page 37: Android  the future

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 .

Page 38: Android  the future

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

Page 39: Android  the future

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

Page 40: Android  the future

MapView is required to be added into the layout

create a LocationManager from which we can get thecoordinate values:

Page 41: Android  the future

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

Page 42: Android  the future

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)

Page 43: Android  the future

43

Definition – Point of Interest Point of Interest (POI): Location

that is interested in the application level (e.g. building, tourist spot)

Page 44: Android  the future

44

Application in Action (1)

Reference Points

Points of Interest

Page 45: Android  the future

45

Application in Action (2)

1. User selects adestination

Page 46: Android  the future

46

Application in Action (3)

2. User is at the startingpoint of a route

Page 47: Android  the future

47

Application in Action (4)

3. The application keepstrack of the location of theuser in the path at eachreference point

Page 48: Android  the future

48

Application in Action (5)

4. Display the informationabout the point of interest(destination)

Page 49: Android  the future

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.

Page 50: Android  the future

REFERENCES : -

[1] Open Hanset Alliance, http://www.openhandsetalliance.com/.

[2] Android - An Open Handset Alliance Project,http://code.google.com-/intl/zh-CN/android/.

[3] J.F. DiMarzio, Android A Programmer’s Guide, Chicago: McGraw-Hill,Jul. 2008.

[4] Android Developers, http://www.androidin.com/.

[5] C. Haseman, Android Essentials, PDF Electronic Book, 2008.Availablefrom: 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….

Page 51: Android  the future

. 51

The End .