SlideShare a Scribd company logo
Location API and programming
                                                      practices




Introduction to
programming using Location API

                         Amrit Sanjeev
                  Bangalore Android User Group
What’s on the agenda today ?


Introduction   Challenges              Best
   to LBS                            practices




                Let go and find where our users are 
Introduction to LBS



Things to keep in mind before you create your world changing LBS
What is a location based service ?



        ―A location-based service (LBS) is an
    information or entertainment service, which is
     accessible with mobile devices through the
   mobile network and which uses information on
   the geographical position of the mobile device.‖
Is it the hot tech of today ??

• Not really !!! But there is a lot of potential




• Gartner (2009) identifies the LBS will be the #2 mobile
  application for 2012 because of its perceived high user
  value and its influence on user loyalty.
Some interesting stats

        • people where
 63%      aware of LBS

        • report having
 52%      used LBS         • 32% use it every month

                           • 10% use it every day

        • thought it was
 94%      valuable
                           • 18% tell others their location



                           • Expose location without consent 84%

                           • Identity theft 84%
        • expressed
 52%      concerns         • Loss of privacy 84%
Why is LBS so important

                               Need for
                               services
                                on the
                                move .



           Better                               Availability
            data                                    of
          networks                              hardware
                                LBS
                             popularity


                                             GPS
                  Better                  hardware
                 batteries                 in more
                                           devices
LBS Growth Factors



                                Success of new
             Growth of mobile
                                digital business
               advertising.
                                    models.



                                                Increasing
    Increased                                  speeds and
   smartphone                                     broader
     adoption.                                 coverage of
                        Growth               mobile networks.

                        of LBS
Challenges in deploying
LBS



          Things that are slowing it down
LBS : Aspects to work on

                     Control
                     (Legal)




          Security                Trust
         (Technolo
           gical)
                     LBS         (Social)




                     Privacy
                     (Ethical)
Obstacles in LBS adoption


    Privacy concerns.


       Security concerns


         Two-thirds of advertising companies aren’t using LBS (2011 data).


       General awareness is only around 30%.


    Device user experience
Technical Challenges


•   Maintaining battery performance
•   Varying accuracy
•   Multiple providers ( GPS , WIFI etc)
•   Continuous change
•   Responsiveness
Best Practices



Things that you might wanna try in your application
Decide on your app location requirements upfront



     How often do you need updates?

       What happens when GPS and WIFI are disabled ?

        How accurate do u need to be ?

       What is the impact on battery life ?

     What happens when location jumps ?
Best practices



• Specify a minimum update frequency.
• Specify a minimum update distance.

int freq = 10 * 60 * 1000 ; // 10 minutes
int distance = 500 ; // 500 meters
locationManager.requestLocationUpdates(provider, freq, distance, 1)
Best practices

• Use criteria to select a location provider
• Specify the criteria
   – Allowable power drain
   – Required accuracy
   – Need for additional parameters like altitude, bearing , speed etc
• Find the best location provider based on your criteria
• Relax requirement till you find a provider
• Can limit to only active providers
• Can use all matching providers
Best practices


Criteria criteria = new Criteria() ;
criteria.setAccuracy(Criteria.ACCURACY_FINE);
criteria.setAltitudeRequired(false);
criteria.setBearingRequired(false);
criteria.setCostAllowed(true);
criteria.setPowerRequirement(Criteria.POWER_LOW);
String provider = locationManager.getBestProvider(criteria, true);
Some best practices

• Reduce the latency for getting your first
  location fix by retrieving the last known
  location from the Location Manager each
  time the app is resumed.

• If there is one or more locations available
  from within the allowed latency, return the
  most accurate one. If not, we simply return
  the most recent result.
Best practices

• Implement a back off pattern
  – Use multiple location providers
     • Fine and course
     • High and low frequency /distance

• Remove listeners as accuracy improves
• Monitor battery and reduce functionality to
  save power .
  – Change frequency of updates
  – Disable location change receivers
Best practices

• Network location provider — tend to return results
  faster than the more accurate options

• Requesting location updates (particularly using the
  GPS) while your app isn’t in the foreground is poor
  practice, as it can significantly impact battery life.

• Register Passive Location Changed Receiver that
  allows you to receive background updates even
  when the application has been killed by the
  system to free resources.
Q&A
Location Based Services - An Overview

More Related Content

PPTX
Location Based Services
PPTX
Location Based services
PPT
Wearable Biosensors
PPTX
Location based services
PPT
Location-based Services - Introduction
PDF
A quick introduction to The Things Network
PPTX
Location based services
PPTX
Location Based Services
Location Based services
Wearable Biosensors
Location based services
Location-based Services - Introduction
A quick introduction to The Things Network
Location based services

What's hot (20)

PPTX
PPTX
Developing Efficient Web-based GIS Applications
PPT
PPTX
Introduction to global position system
PPTX
PPT
Introduction to Location-Based Service (LBS)
PPTX
Vehicle tracking system using gps and google map
PDF
Bringing AI research to wireless communication and sensing
PPTX
PDF
What is GIS
PPTX
IRNSS by Sree Bhargava
PDF
Internet of Things (IoT) - Slide Marvels, Top PowerPoint presentation design ...
PDF
Global Positioning System (GPS)
PPTX
PPT
PDF
Location Based Services: Global Market Overview, Deployment Trends and Potent...
PPTX
JARVIS - The Digital Life Assistant
PPTX
Global positioning system ppt
PPT
Rfid presentation
Developing Efficient Web-based GIS Applications
Introduction to global position system
Introduction to Location-Based Service (LBS)
Vehicle tracking system using gps and google map
Bringing AI research to wireless communication and sensing
What is GIS
IRNSS by Sree Bhargava
Internet of Things (IoT) - Slide Marvels, Top PowerPoint presentation design ...
Global Positioning System (GPS)
Location Based Services: Global Market Overview, Deployment Trends and Potent...
JARVIS - The Digital Life Assistant
Global positioning system ppt
Rfid presentation
Ad

Similar to Location Based Services - An Overview (20)

PDF
Locationaware Applications Pappsc Richard Ferraro Murat Aktihanoglu
DOC
OMI whitepaper On LBS - Nov 2008
PDF
Location-Based Services on Mobile and Market Insight
PPTX
Remember the Milk: Location-based Apps and the Marketplace
PPSX
How To Create The Killer Location Aware Social Networking Application
PDF
Location Based Service Talk in CSCOOP
PDF
Location, a layer not just features
DOCX
location based service
PPTX
Location based services (LBS)
PDF
Claudio - Local Social Networks
PDF
Location Based Services, Change in Profile and Notification
PPTX
How location based services change everything
PDF
Location Context Awareness
PDF
CC - Location based services - Global deployment & adoption trends - 2013
PPTX
LBS and the evolution of mobile marketing
PDF
Future of Mobile_Mindshare
PPT
Angel Beat, San Francisco 3.14.01
PDF
Opportunities in a Buoyant LBS Market
PDF
Location aggregation, the next wave of location access
Locationaware Applications Pappsc Richard Ferraro Murat Aktihanoglu
OMI whitepaper On LBS - Nov 2008
Location-Based Services on Mobile and Market Insight
Remember the Milk: Location-based Apps and the Marketplace
How To Create The Killer Location Aware Social Networking Application
Location Based Service Talk in CSCOOP
Location, a layer not just features
location based service
Location based services (LBS)
Claudio - Local Social Networks
Location Based Services, Change in Profile and Notification
How location based services change everything
Location Context Awareness
CC - Location based services - Global deployment & adoption trends - 2013
LBS and the evolution of mobile marketing
Future of Mobile_Mindshare
Angel Beat, San Francisco 3.14.01
Opportunities in a Buoyant LBS Market
Location aggregation, the next wave of location access
Ad

More from amsanjeev (8)

PDF
No sql databases blrdroid devfest 2016
PDF
Introduction to Firebase on Android
PDF
Introduction to Android M
PDF
Io13 deep dive location api
PPTX
Jelly bean aka Andorid 4.1
PPTX
Mobile UX
PPTX
NFC - quick primer
PPTX
Introduction to ICS
No sql databases blrdroid devfest 2016
Introduction to Firebase on Android
Introduction to Android M
Io13 deep dive location api
Jelly bean aka Andorid 4.1
Mobile UX
NFC - quick primer
Introduction to ICS

Recently uploaded (20)

PDF
August Patch Tuesday
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
Hindi spoken digit analysis for native and non-native speakers
PPTX
TLE Review Electricity (Electricity).pptx
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
A Presentation on Artificial Intelligence
PDF
Getting Started with Data Integration: FME Form 101
PPTX
1. Introduction to Computer Programming.pptx
PDF
WOOl fibre morphology and structure.pdf for textiles
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Approach and Philosophy of On baking technology
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
DP Operators-handbook-extract for the Mautical Institute
August Patch Tuesday
cloud_computing_Infrastucture_as_cloud_p
Hindi spoken digit analysis for native and non-native speakers
TLE Review Electricity (Electricity).pptx
OMC Textile Division Presentation 2021.pptx
Assigned Numbers - 2025 - Bluetooth® Document
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
A Presentation on Artificial Intelligence
Getting Started with Data Integration: FME Form 101
1. Introduction to Computer Programming.pptx
WOOl fibre morphology and structure.pdf for textiles
Group 1 Presentation -Planning and Decision Making .pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Approach and Philosophy of On baking technology
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Digital-Transformation-Roadmap-for-Companies.pptx
Unlocking AI with Model Context Protocol (MCP)
Zenith AI: Advanced Artificial Intelligence
DP Operators-handbook-extract for the Mautical Institute

Location Based Services - An Overview

  • 1. Location API and programming practices Introduction to programming using Location API Amrit Sanjeev Bangalore Android User Group
  • 2. What’s on the agenda today ? Introduction Challenges Best to LBS practices Let go and find where our users are 
  • 3. Introduction to LBS Things to keep in mind before you create your world changing LBS
  • 4. What is a location based service ? ―A location-based service (LBS) is an information or entertainment service, which is accessible with mobile devices through the mobile network and which uses information on the geographical position of the mobile device.‖
  • 5. Is it the hot tech of today ?? • Not really !!! But there is a lot of potential • Gartner (2009) identifies the LBS will be the #2 mobile application for 2012 because of its perceived high user value and its influence on user loyalty.
  • 6. Some interesting stats • people where 63% aware of LBS • report having 52% used LBS • 32% use it every month • 10% use it every day • thought it was 94% valuable • 18% tell others their location • Expose location without consent 84% • Identity theft 84% • expressed 52% concerns • Loss of privacy 84%
  • 7. Why is LBS so important Need for services on the move . Better Availability data of networks hardware LBS popularity GPS Better hardware batteries in more devices
  • 8. LBS Growth Factors Success of new Growth of mobile digital business advertising. models. Increasing Increased speeds and smartphone broader adoption. coverage of Growth mobile networks. of LBS
  • 9. Challenges in deploying LBS Things that are slowing it down
  • 10. LBS : Aspects to work on Control (Legal) Security Trust (Technolo gical) LBS (Social) Privacy (Ethical)
  • 11. Obstacles in LBS adoption Privacy concerns. Security concerns Two-thirds of advertising companies aren’t using LBS (2011 data). General awareness is only around 30%. Device user experience
  • 12. Technical Challenges • Maintaining battery performance • Varying accuracy • Multiple providers ( GPS , WIFI etc) • Continuous change • Responsiveness
  • 13. Best Practices Things that you might wanna try in your application
  • 14. Decide on your app location requirements upfront How often do you need updates? What happens when GPS and WIFI are disabled ? How accurate do u need to be ? What is the impact on battery life ? What happens when location jumps ?
  • 15. Best practices • Specify a minimum update frequency. • Specify a minimum update distance. int freq = 10 * 60 * 1000 ; // 10 minutes int distance = 500 ; // 500 meters locationManager.requestLocationUpdates(provider, freq, distance, 1)
  • 16. Best practices • Use criteria to select a location provider • Specify the criteria – Allowable power drain – Required accuracy – Need for additional parameters like altitude, bearing , speed etc • Find the best location provider based on your criteria • Relax requirement till you find a provider • Can limit to only active providers • Can use all matching providers
  • 17. Best practices Criteria criteria = new Criteria() ; criteria.setAccuracy(Criteria.ACCURACY_FINE); criteria.setAltitudeRequired(false); criteria.setBearingRequired(false); criteria.setCostAllowed(true); criteria.setPowerRequirement(Criteria.POWER_LOW); String provider = locationManager.getBestProvider(criteria, true);
  • 18. Some best practices • Reduce the latency for getting your first location fix by retrieving the last known location from the Location Manager each time the app is resumed. • If there is one or more locations available from within the allowed latency, return the most accurate one. If not, we simply return the most recent result.
  • 19. Best practices • Implement a back off pattern – Use multiple location providers • Fine and course • High and low frequency /distance • Remove listeners as accuracy improves • Monitor battery and reduce functionality to save power . – Change frequency of updates – Disable location change receivers
  • 20. Best practices • Network location provider — tend to return results faster than the more accurate options • Requesting location updates (particularly using the GPS) while your app isn’t in the foreground is poor practice, as it can significantly impact battery life. • Register Passive Location Changed Receiver that allows you to receive background updates even when the application has been killed by the system to free resources.
  • 21. Q&A

Editor's Notes

  • #2: .
  • #9: It’s estimated that by 2015, 58% of mobile users will own smartphones. That’s a significant percentage of consumers who can potentially be reached by marketers via LBS.As consumers spend more time on their mobile phones—especially smartphone users—mobile advertisers are capitalizing. We’re a group that wants to be engaged and because most of us smartphone users are permanently glued to our phones, we’re a rather captive audience.More companies are gaining positive results from being active in the mobile space. The success surrounding digital business models is attracting other companies to the space.Basic supply and demand: With more and more mobile and smartphone users, broader mobile coverage is a necessity. The “Can you hear me now?” campaign is pretty close to being a thing of the past.
  • #11: Control (Legal) – Commonly GPS and other LBS devices are used to control and offer various types of services to the user. Personally it controls one’s own direction of moving in guiding the right way. In case of child tracking, parents have exclusive right to look after their children, as it is not possible for the young ones to make their own decision. So it is their legal right to monitor their children thereby reflecting a sense of caring. In case of law enforcement, special laws provide legal rights to police or security departments to keep an eye on criminals or suspects.Trust (Social) – In social life trust is the most essential part in human relationship. However, the use of LBS is being practiced in low trust conditions. Monitoring someone with the help of tracking system really affects personal relationship but as far as tracking criminals by cops or tracking children by parents are concerned, it is for the welfare of the individual & society.Privacy (Ethical) – As a human being, everyone has the right to privacy or being free from intrusion or disturbances in one’s personal life. But in case of LBS or any other telecommunication technologies dealing with transformation of various kinds of information, it becomes essential to provide adequate security to these kinds of data for not being misused by any unauthorized person. Tracking and monitoring someone without his/her consent is purely unethical so needs high level of security. But again as in case of law and order where tracking devices are used to monitor criminals becomes essential for the sake of society as a whole. Here, social security is counted higher than Individual safety and security.Security (Technological) – Again for maintaining privacy, security system should be strong. Every technology has both positive and negative impact on human life and LBS also has shortcomings by locating accurate information data or even easily given access to unauthorized person. On one hand LBS enhances both national and personal security but create another problem for the privacy of individual by not providing a foolproof security system to that highly sensitive information stored in its database. For obtaining security, one needs to do a little compromise on his/her privacy but to what extent is a question.