Tutorial 11 (1)
Tutorial 11 (1)
Tutorial 11 (Location)
Enhanced User Experience: Location services enable features like navigation, location-based
recommendations, and personalized content, improving user engagement.
Safety and Security: Apps can provide emergency location sharing, real-time tracking for family
members, or location-based alerts (e.g., weather warnings).
Business Opportunities: Location-based marketing (e.g., targeted ads, discounts for nearby stores)
can drive revenue and customer engagement.
Utility: Apps like Google Maps, Uber, and food delivery services rely heavily on location
services to function effectively.
Privacy Concerns: Continuous location tracking can lead to privacy violations, as users may not
want their movements monitored.
Battery Drain: Frequent use of GPS or location services can significantly drain the device's
battery.
Data Misuse: Location data can be misused by third parties for surveillance, tracking, or
unauthorized data sharing.
User Trust: Overuse of location services can lead to user distrust, especially if the app does not
clearly explain why location access is needed.
2. Two types of location permission are discussed in Lecture 10, viz., the Category and the
Accuracy.
Category:
Foreground Location: The app can access location only when it is in use (i.e., the app is
visible to the user). This is suitable for apps that need location access temporarily, such as
navigation or ride-hailing apps.
Background Location: The app can access location even when it is not in use. This is used for
apps that need continuous location tracking, such as fitness trackers or family tracking
apps.
Accuracy:
Coarse Location: Provides an approximate location (within 1 mile/1.6 km). This is less
intrusive and respects user privacy.
Fine Location: Provides precise location data (within a few meters). This is used for apps that
require high accuracy, such as navigation or augmented reality apps.
(b) Give an example of a scenario/application when we need to ask for these permissions
(one example for each permission).
Foreground Location: A ride-hailing app like Uber needs foreground location access to track
the user's location during a ride but does not need access when the app is closed.
Background Location: A fitness app like Strava needs background location access to track the
user's running or cycling route even when the app is minimized.
Coarse Location: A weather app can use coarse location to provide weather updates for the
user's general area without needing precise coordinates.
Fine Location: A navigation app like Google Maps requires fine location access to provide
turn-by-turn directions with high accuracy.
3. What are the other settings that we can customize in the MapView or SupportMapFragment when
the map is displayed? Identify two settings (besides those that had been covered in Lecture 10)
and explain their usage.
Map Type:
Usage: You can customize the map type to display different views, such as normal, satellite,
terrain, or hybrid. For example, a hiking app might use a terrain map to show elevation changes.
Example: googleMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);
UI Controls:
Usage: You can enable or disable UI controls like zoom buttons, compass, and my location
button. This improves user interaction with the map.
Example: googleMap.getUiSettings().setZoomControlsEnabled(true);
4. Geocoding is always used together when we are using the Location service. What is Geocoding?
Geocoding is the process of converting a physical address (e.g., "1600 Amphitheatre Parkway,
Mountain View, CA") into geographic coordinates (latitude and longitude). Reverse geocoding is
the opposite process, converting coordinates into a human-readable address.
Usage: Geocoding is used in apps that require location-based services, such as finding nearby
restaurants, displaying addresses on a map, or providing directions.
Example: A food delivery app uses geocoding to convert the user's address into coordinates for
delivery tracking.