1 / 4

Week 7

Week 7. Car Locator. GPS updates dynamically. Added the LocationListener interface to acquire the GPS data. Added the LocationManager class to implement the following methods –

mervyn
Download Presentation

Week 7

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Week 7 Car Locator

  2. GPS updates dynamically • Added the LocationListener interface to acquire the GPS data. • Added the LocationManager class to implement the following methods – • requestLocationUpdates – Takes arguments minTime and minDistance (amongst others – unimportant). • getLastKnownLocation – Gives the last known GPS coordinates received (or “listened” to by the listener). Notice (amongst the other hidden and currently unimportant comments) the note in the above comment Have the main activity implement the listener as it is going to be used by the entire layer

  3. Location location location • The position of latitude and longitude in the URL have to be correct • Latitude comes first and the longitude follows At latitude 40.458o N and longitude -86.9331o W is our local Wal-Mart At latitude -86.9331o W and longitude 40.458o N are the barren plains of Antarctica

  4. The next step • Have to now change ImageView to MapView – This creates a dynamic map that you can pan and zoom in and out of. • An API key is required. Requires accessing the Registry (or the Mac equivalent of it, if there is one). • Fix memory leaks (Already? YES!). It appears that the application is allocating memory that it is not de-allocating. Application had to force close 10-20% of the times when it was run multiple times.

More Related