Lecture 10: Locations Flashcards

1
Q

What are the different ways of determining a users location?

A
  • GPS/GNSS
  • Network
  • WiFi
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How does GPS/GNSS work?

A

Uses satellite positioning to determine an exaction location

power expensive

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How does network location work?

A

Provides an approximation of the users location using the location of a nearby cellular network tower

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How does WiFi location work?

A

Uses an IP address lookup to check the approximate location of the user

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the 2 types of location permissions?

A
  • COARSE
  • FINE
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are FINE permissions?

A

Precision determined by GPS

Quoted accuraxy of +/- 50m

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are COARSE permissions?

A

Precision determined by WiFi or Cellular Network

Quoted accuracy of +/- 3km^2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the downside to using GPS location?

A

Its very battery intensive and typically slow

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the 2 practical problems you should consider when talking about location?

A
  • How accurate do we need to be?
  • Does the user have a choice?
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How does modern android allow users to have a choice on what location permissions they use?

A

Allows the user to select either

  • Precise
  • Approximate

location services at runtim

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the Fused Location Provide?

A

An API for fetching location data
Designed to handle all forms of location request (FINE or COARSE) with any location hardware (GPS, Network, WiFi)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Why use the Fused Location Provider?

A

More efficient use of location data and battery

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How does Fused Location Provider save battery?

A

Minimizes the number of location request made and the amount of time location hardware is used for

Does this by re-using location requests made previously by other maps

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the downsides of fused location provider?

A

Doesn’t case too much about minute-to-minute accuracy

Location refresh rate is tied to when other apps force a location update

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

In order to use the FusedLocationProvider we have to declare a __ of the provider

A

client

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are the 2 notable methods that the client uses?

A
  • getLastLocation()
  • getCurrentLocation()
17
Q

What is getLastLocation()

A

A simple read-only request for the last known location
Location can be very stale

18
Q

What is getCurrentLocation()

A

Intelligently cache location data and only force an updated request when the last location data is considered to old

19
Q

Fused provider allows you to assign a ___ to each__ you make

A
  • priority
  • location request
20
Q

What are the location priority levels?

A
  • PRIORITY_HIGH_ACCURACY
  • PRIORITY_BALANCED_POWER_ACCURACY
  • PRIORITY_LOW_POWER
  • PRIORITY_NO_POWER
21
Q

What is the best way to actively track the user

A

Use the requestLocationUpdates() method on a FusedLocationProviderClient object to request regular location updates on a fixed time interval

22
Q

How does the requestLocationUpdates() method work?

A

Takes parameters for the request and includes a callback method

every n time interval the callback method is called and passes the updated location variable containing the current location data

23
Q

What are some of the things a location object holds?

A

longitude, latitude, altitude, compass, bearing, GPS satellite time