Location based services Using Google Maps v2 etc. in Android apps 1Location based services.

Slides:



Advertisements
Similar presentations
Android Application Development Tutorial. Topics Lecture 4 Overview Overview of Sensors Programming Tutorial 1: Tracking location with GPS and Google.
Advertisements

Bruce Scharlau, University of Aberdeen, 2010 Android and Location Mobile Computing Unless otherwise stated, images are from android sdk.
Location based services
HTML 5 – GeoLocation and Maps. Geolocation API What is a ”geolocation”…? A geographical location, defined in terms of – Latitude (north/south) – Longitude.
Tracking & Login Data persistence User tracking.
Sensors. Point your phone at the sky, and Google Sky Map tells you which stars you’re looking at. Tilt your phone, and you can control the game you’re.
CS378 - Mobile Computing Maps. Using Google Maps Like other web services requires an API key from Google ons/google-apis/mapkey.html.
Location & Maps.  Mobile applications can benefit from being location-aware, e.g.,  Routing from a current to a desired location  Searching for stores.
Location and Maps Content Getting Location Getting Google Map In application Test on Emulator/Device.
SDReaderCE An Overview on Use and Functionality. Using SDReaderCE After loading the route to the handheld from SDReader6, select the route folder from.
ALBERT PARK EEL 6788: ADVANCED TOPICS IN COMPUTER NETWORKS Energy-Accuracy Trade-off for Continuous Mobile Device Location, In Proc. of the 8th International.
CS378 - Mobile Computing Location (Location, Location, Location)
CS378 - Mobile Computing Location.
CS378 - Mobile Computing Maps. Using Google Maps Content on using Google Maps inside your app Alternatives: Open Street Maps –
Map Applications.
Route Tracker App Android How to Program © by Pearson Education, Inc. All Rights Reserved.
CHAP 4. GEOLOCATION API.  You can request users to share their location and, if they agree, you can provide them with instructions on how to get to a.
Google Maps Android API v2 吳俊興 國立高雄大學 資訊工程學系 CSF645 – Mobile Computing 行動計算
Location-Based API 1. 2 Location-Based Services or LBS allow software to obtain the phone's current location. This includes location obtained from the.
Location Services: Part 1 (Location and Geocoding)
REMINDER + RADAR Brad Bootz, Robert Douglas, Natalie Freed Team Members: Getting things done… one place at a time R.
Social network Twitter Hashtag: #m2eu #android Personal Israel Ferrer –
Location based services
Operating system for mobile devices with a Java programming interface. Provides tools, e.g. a compiler, debugger, device emulator, and its own Java Virtual.
Prerequisites Android Studio – io.html io.html Java.
#gsa2012 Android Basics By: Amr Mohsen
Context Aware Location Nasrullah. Location Basics LocationManager—Class providing access to Android system location services LocationListener—Interface.
Creating an Example Android App in Android Studio Activity lifecycle & UI Resources.
MAKANI ANDROID APPLICATION Prepared by: Asma’ Hamayel Alaa Shaheen.
1 CSCE 5013: Hot Topics in Mobile and Pervasive Computing Nilanjan Banerjee Hot Topic in Mobile and Pervasive Computing University of Arkansas Fayetteville,
Android networking 1. Network programming with Android If your Android is connected to a WIFI, you can connect to servers using the usual Java API, like.
GPS Provider:  GPS signal Network Location Provider:  Cell ID  Wi-Fi.
Location. GPS Global Positioning System – At least 4 satellites typically used 3 required extra for error detection and altitude typically accurate within.
Maps Dr. David Janzen Except as otherwise noted, the content of this presentation is licensed under the Creative Commons Attribution 2.5 License.
Dr. Martin Zhao Sept 4, Topics HTML and related tutorials on w3schools.com Related HTML tags Adding interesting features using JavaScript What is.
Adding Location Nasrullah. Adding Location Adding a Map Activity Obtaining a Map API Debug Key Adding a Map View Finding an Address with Google’s GeoCoder.
LocationListener in Android Nasrullah. The LocationManager provides access to the system location services The LocationListener is used for receiving.
Introduction to Android
CMPE Senior Design Project Group Members: Jose A Montoya (CMPE) Carlos Olvera (CSCI)
FCM Workflow using GCM.
Android - Location Based Services. Google Play services facilitates adding location awareness to your app with automated location tracking Geo fencing.
FriendFinder Location-aware social networking on mobile phones.
Introduction to Android Android Club Agenda Set development environment “Hello Android” app Device connection Debugging.
FriendFinder Location-aware social networking on mobile phones.
Internet Safety and Productivity Tips Presented by ITS Kerri Sorenson and Sean Hernandez December 11, 8:30-9:00 am.
Sensors – Part 2 SE 395/595. Location in Android LocationManager class – Configure providers and their listeners LocationListener class – Handles update.
Local Positioning System
DEVOLOPING ANDROID APP ON LOCATION BASED REMINDER ON ANDROID MOBILE SYSTEMS.
TCS Internal Maps. 2 TCS Internal Objective Objective :  MAPS o Integration of Maps.
Cosc 4735 LocationAware API. Previous on … Before we looked at GPS location. – d-gpslocation.pptx
Phonegap Bridge –Geolocation and Google maps CIS 136 Building Mobile Apps 1.
Chapter 6 Google Play Services GOALS & OBJECTIVES Google Play Services give you features to attract users using Google features such as Google Maps, Google+,
Lecture 5: Location Topics: Google Play Services, Location API Date: Feb 16, 2016.
Location based services 1. Some location-based services available in Android Geo-coding – Address -> location Reverse geo-coding – Location -> address(es)
CS371m - Mobile Computing Maps. Using Google Maps Content on using Google Maps inside your app Alternatives Exist: – Open Street Maps –
3 rd -party APIs Kalin Kadiev Astea Solutions AD.
CS378 - Mobile Computing Location (Location, Location, Location)
1. 2 Android location services Determining a device’s current location Tracking device movements Proximity alerts.
CS499 – Mobile Application Development Fall 2013 Location & Maps.
Location-Based Services: Part 2 (Google Maps)
Development-Introduction
Setting Up Chatter on Mobile devices
Sensors, maps and fragments:
The GoogleMap API By Cody Littley.
Google Maps Tutorials Android Studio. About Google map Google Maps is a web mapping service developed by Google. Google Maps began as a C++ desktop program.
Location (Location, Location, Location)
RestComm Open Source Mobile WebRTC SDKs
Find your friend – An Android application
CS378 - Mobile Computing Location and Maps.
Maps, Geocoding, and Location-Based Services.
Presentation transcript:

Location based services Using Google Maps v2 etc. in Android apps 1Location based services

Proximity sensor Not really location based … Many devices can “feel” if an object is near the device. Proximity sensor – Example: ProximityExample Devices usually have many other censors Location based services2

Where am I? Obtaining the device’ location LocationManager class Listen for changes in the location Example – LocationManagerExample Location based services3

Getting location data: Where am I? Some applications needs to know the current position of the user’s device. Three ways to obtain the position – GPS satellite Most accurate – Mobile phone cell tower triangulation Works indoors – Wi-Fi The address of the connected Wi-Fi should be known Least accurate AndroidManifest.xml – Location based services4

Some location-based services available in Android Google maps – Showing and annotating maps Geo-coding – Address -> location Reverse geo-coding – Location -> address(es) Getting live location information – Through GPS, mobile phone cell tower triangulation, or Wi-Fi positioning 5Location based services

Google Maps API versions Google Maps Android API – MapActivity, Overlay, etc. – Deprecated Google Maps Android API v2 – android/ android/ Google Maps for JavaScript v2 – Deprecated Google Maps for JavaScript v3 – /javascript/ /javascript/ Location based services6

Google maps Google maps are NOT part of the Android API – It’s an add-on – This means that you will have to do a number of things to make it work … 7Location based services

Some Map related classes Example: Map5 GoogleMap – This is the main class – setOnMapClickListener(…) Hitting the map you can add markers, etc. MyLocation – Will send you to your current location – Requires permissions: ACCESS_FINE_LOCATION UISettings – To change the default settings of the map 8Location based services

Markers Marker – An annotation on a map – Map. setOnMarkerClickListener(…) Event when you hit a marker MarkerOptions – The “constructor” parameters for Marker objects Position, title, icon, etc. Circle, and other annotation – You can add circles (and many other annotation) to a map Location based services9

How to make it work … when programming Google Maps API v2 is part of Google Play services SDK – Use the Android SDK Manager to obtain the ”Google Play Services” API It’s in “Extra” at the bottom of the screen – aps/article.html#installmaps aps/article.html#installmaps Android Studio can create a special Map activity – This is quite helpful Location based services10

How to make it work … when running Google Maps API key – SHA1 + applications package name gives you a key aps_key aps_key – The key must be placed in AndroidManifest.xml Permissions to use Internet, etc. – Stated in AndroidManifest.xml Google Maps requires Open GL – Stated in AndroidManifest.xml Genymotion: Has no access to GooglePlay – It should be possible to upgrade GenyMotion, but I can’t make it work – It run the app on my Android phone Location based services11

Getting location updates locationManager.requestLocationUpdates( … ) on/LocationManager.html on/LocationManager.html Example: Maps5 Location based services12

Different location providers: Pros and cons GPS_PROVIDER – Accurate – Works only outdoors Device must have satellite connection – Consumes battery Satellite connection consumes battery – Slow NETWORK_PROVIDER – Less accurate – Works indoors (Wi-Fi + cell-tower) and outdoors (cell-tower) – Consumes less battery – Faster Source – location.html Location based services13

Geocoding Getting real addresses from a position GeoCoder – List getFromLocationName(name, howMany) Geocoding Address includes ordinary address + (lat, long) – List getFromLocation(lat, long, howMany) Reverse geocoding – Example: Maps3 Location based services14

References and further readings Google Maps Android API v2 – Lars Vogel: Google Maps Android API v2 – Tutorial – ml ml George Mathew: Remove a single marker from Google Maps Android API V2 … – ml ml Making your app location-aware – Location based services15