Binding Activities to Services
------------------------------
When an Activity is bound to a Service, it maintains a reference to the Service instance itself, allowing you to make method calls on the.. Read more
An Earthquake Monitoring Service Example
----------------------------------------
In this chapter, you’ll modify the Earthquake example you started in Chapter 5 (and continued to enhance in Chapters .. Read more
To start a Service, call **startService**; you can either implicitly specify a Service to start using an action against which the Service is registered, or you can explicitly specify the Service using.. Read more
Unlike Activities, which present a rich graphical interface to users, Services run in the background — updating your Content Providers, firing Intents, and triggering Notifications. They are the perfe.. Read more
Because of the limited screen size of most mobile devices, typically only one application is vis-ible and active on a device at any given time. This offers a perfect environment for applications that .. Read more
Previously in this chapter, you saw how to add the Zoom View to a Map View by pinning it to a specific screen location. You can pin any View-derived object to a Map View (including layouts and other V.. Read more
Introducing MyLocationOverlay
=============================
The MyLocationOverlay class is a special Overlay designed to show your current location and orienta-tion on a MapView.
To use the My Locat.. Read more
Annotating “Where Am I?” This final modification to “Where Am I?” creates and adds a new Overlay that displays a red circle at the device’s current position.
Start by creating a new **MyPositionOverl.. Read more
Canvas drawing for Overlays is handled by overriding the Overlay’s draw handler.
The passed-in Canvas is the surface on which you draw your annotations, using the same techniques introduced in Chapte.. Read more
The Canvas used to draw Overlay annotations is a standard Canvas that represents the visible display surface. To add annotations based on physical locations, you need to convert between geographical p.. Read more
Overlays are a way to add annotations and click handling to MapViews. Each Overlay lets you draw 2D primitives including text, lines, images and shapes directly onto a canvas, which is then overlaid o.. Read more
You use the Map Controller to pan and zoom a MapView. You can get a reference to a MapView’s control-ler using getController, as shown in the following code snippet:
```
MapController mapController =.. Read more
The MapView class is a View that displays the actual map; it includes several options for deciding how the map is displayed.
By default, the Map View will show the standard street map, as shown in Fi.. Read more
The *MapView* provides a compelling User Interface option for presentation of geographical data.
One of the most intuitive ways of providing context for a physical location or address is to display i.. Read more
Using the Geocoder
------------------
Geocoding lets you translate between street addresses and longitude/latitude map coordinates. This can give you a recognizable context for the locations and coor.. Read more
Using Proximity Alerts
----------------------
It’s often useful to have your applications react when a user moves toward, or away from, a specific location. Proximity alerts let your applications set.. Read more
Ukraine has recaptured more than 6,000 square kilometers (2,300 sq miles) of Russian-occupied territory, President Zelenskyy said Monday night.
“From the beginning of September until today, our soldi.. Read more
In the following example, “Where Am I?” is enhanced to track your current location by listening for location changes. Updates are restricted to one every 2 seconds, and only when movement of more than.. Read more
Most location-sensitive applications will need to be reactive to user movement. Simply polling the Location Manager will not force it to get new updates from the Location Providers.
Use the **request.. Read more
The purpose of location-based services is to find the physical location of the device.
Access to the location-based services is handled using the Location Manager system Service. To access the Locati.. Read more