Lecture Slides for Location based Services [Android]
Upcoming SlideShare
Loading in...5
×
 

Lecture Slides for Location based Services [Android]

on

  • 2,396 views

 

Statistics

Views

Total Views
2,396
Slideshare-icon Views on SlideShare
2,368
Embed Views
28

Actions

Likes
2
Downloads
119
Comments
0

2 Embeds 28

http://nehiljain.wordpress.com 17
http://nehil.e-caffeine.net 11

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Lecture Slides for Location based Services [Android] Lecture Slides for Location based Services [Android] Presentation Transcript

    • Accessing Location-Based services Software Development for Portable Devices BITS Pilani Goa Campus Sem I 2011-12
    • Applications
      • Mapping
      • Directions
      • Dynamic chat Application
      • “ Geotag” your photos, tweets
      CS C314 Software Development For Portable Devices
    • What's common in the above?
      • GPS capability of the phone
      • Technologies to identify your location
        • GPS
        • Cell tower triangulation
      CS C314 Software Development For Portable Devices
    • Location based Services (LBS)
      • Two elements of LBS:
        • Location manager : provides hooks to lbs
        • Location providers : provide current location
      CS C314 Software Development For Portable Devices
    • Update location in Emulator
      • In DDMS view, you can set the longitude and latitude 
      • Lets see how.
      CS C314 Software Development For Portable Devices
    • Location manager
      • You can :
        • Find available location providers
        • Obtain your current location
        • Track movement
        • Set proximity alerts for detecting movement into and out of the specified areas
      CS C314 Software Development For Portable Devices
    • Location Providers: They know where you are hiding
      • Selecting location provider
        • Explicitly – By specifying the name
        • Implicitly – By specifying the selection criteria
      CS C314 Software Development For Portable Devices
    • Explicit CS C314 Software Development For Portable Devices
    • User permissions CS C314 Software Development For Portable Devices
    • Finding yourself
      • hasAltitude() and getAltitude() for Altitude
      • hasSpeed() and getSpeed() for Speed
      CS C314 Software Development For Portable Devices
    • On the move
      • Why no getMyCurrentLocationNow() ?
      • Not all location providers are immediately responsive.
      • How to get changes in location reflected in your app?
      • Register for location updates!
      CS C314 Software Development For Portable Devices
    • requestLocationUpdates ( String  provider, long minTime, float minDistance,  LocationListener  listener)
      • provider : name of location provider
      • minTime : how long, in milliseconds, before we might request for a location update
      • minDistance : how far,…. in meters
      • Listener : name of object of locationListener
      CS C314 Software Development For Portable Devices
    • LocationListener CS C314 Software Development For Portable Devices These are the functions provided by the location Listeners
    • STOP!
      • When not required use removeUpdates()
      • If you fail to do this your app will continue getting location updates even after all activities are closed.
      CS C314 Software Development For Portable Devices
    • Are we there yet?
      • LocationManager offers addProximityAlert()
      • Registers a Pending intent
      • addProximityAlert (double latitude, double longitude, float radius, long expiration, PendingIntent intent)
      • In case the screen goes to sleep, checks for proximity alerts happen only once every 4 minutes.
      CS C314 Software Development For Portable Devices
    • parameters
      • Radius: the radius of the central point of the alert region, in meters
      • Expiration: time for this proximity alert, in milliseconds, or -1 to indicate no expiration
      CS C314 Software Development For Portable Devices
    • Thank You! CS C314 Software Development For Portable Devices
    • References
      • Location http://developer.android.com/reference/android/location/Location.html
      • Location Manager http://developer.android.com/reference/android/location/LocationManager.html
      • Location Provider http://developer.android.com/reference/android/location/LocationProvider.html
      CS C314 Software Development For Portable Devices