Deck 11: Using the Gps and Location Services

ملء الشاشة (f)
exit full mode
سؤال
For an app to retrieve the location of a device using its GPS, it needs to access Google Play services.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
What file must be edited in order to include Google Play services in the compilation process?

A) MainActivity
B) AndroidManifest.xml
C) build.gradle
D) gradle
سؤال
The ____________ method of the Location class returns the longitude of a Location object.
سؤال
In what units does the getAccuracy method of the Location class return the accuracy of a Location object?

A) Miles
B) Kilometers
C) Meters
D) Feet
سؤال
Inside the AndroidManifest.xml file, what String constant of the Manifest.permission class can be used to specify an approximate location?

A) ACCESS_COARSE_LOCATION
B) ACCESS_FINE_LOCATION
C) ACCESS_PRECISE_LOCATION
D) ACCESS_CLOSE_LOCATION
سؤال
The startResolutionForResult method of the ConnectionResult class throws an exception.
سؤال
Several methods of the GoogleApiClient.Builder class return the GoogleApiClient object reference that called them so that method calls can be ____________.
سؤال
What method of the GoogleApiClient class do we call to close the connection with Google Play services?

A) close
B) stop
C) disconnect
D) quit
سؤال
The ____________ method of the LocationRequest class sets the priority level of the request for location updates.
سؤال
What is the name of the only method of the LocationListener interface?

A) onMoved
B) onLocationChanged
C) onChanged
D) locationChanged
سؤال
ConnectionCallbacks provides callback methods that are automatically called when we ____________ or are disconnected from the Google Play service.
سؤال
OnConnectionFailedListener provides a callback method that is automatically called if the connection attempt failed.
سؤال
One of the two methods of ConnectionCallbacks is onConnectionSuspended. What is the name of its other method?

A) onConnected
B) onSuspending
C) onSuspended
D) connect
سؤال
To call the requestLocationUpdates method, we need a FusedLocationProviderApi object reference. How can we get one?

A) FusedLocationProviderApi flpa = LocationServices.FusedLocationApi;
B) FusedLocationProviderApi flpa = LocationServices;
C) FusedLocationProviderApi flpa = FusedLocationApi;
D) FusedLocationProviderApi flpa = API;
سؤال
To get a GoogleApiClient reference, we can use the GoogleApiClient constructor.
سؤال
The LocationListener interface is part of the com.google.android.gms.location package.
سؤال
The Location class includes the getElapsedRealtimeNanos method, which returns the time since the last boot in nanoseconds, so we can compare the time between two location updates if we want to.
سؤال
Once location updates have been requested, it is not possible to stop them.
سؤال
The ConnectionCallbacks and OnConnectionFailedListener are static inner __________________ of the GoogleApiClient class.
سؤال
The __________________ method of the FusedLocationProviderApi interface returns the current location of the device as a Location reference.
سؤال
The __________________ method of the LocationRequest class sets the minimum distance between consecutive updates.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/21
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 11: Using the Gps and Location Services
1
For an app to retrieve the location of a device using its GPS, it needs to access Google Play services.
True
2
What file must be edited in order to include Google Play services in the compilation process?

A) MainActivity
B) AndroidManifest.xml
C) build.gradle
D) gradle
build.gradle
3
The ____________ method of the Location class returns the longitude of a Location object.
getLongitude
4
In what units does the getAccuracy method of the Location class return the accuracy of a Location object?

A) Miles
B) Kilometers
C) Meters
D) Feet
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 21 في هذه المجموعة.
فتح الحزمة
k this deck
5
Inside the AndroidManifest.xml file, what String constant of the Manifest.permission class can be used to specify an approximate location?

A) ACCESS_COARSE_LOCATION
B) ACCESS_FINE_LOCATION
C) ACCESS_PRECISE_LOCATION
D) ACCESS_CLOSE_LOCATION
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 21 في هذه المجموعة.
فتح الحزمة
k this deck
6
The startResolutionForResult method of the ConnectionResult class throws an exception.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 21 في هذه المجموعة.
فتح الحزمة
k this deck
7
Several methods of the GoogleApiClient.Builder class return the GoogleApiClient object reference that called them so that method calls can be ____________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 21 في هذه المجموعة.
فتح الحزمة
k this deck
8
What method of the GoogleApiClient class do we call to close the connection with Google Play services?

A) close
B) stop
C) disconnect
D) quit
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 21 في هذه المجموعة.
فتح الحزمة
k this deck
9
The ____________ method of the LocationRequest class sets the priority level of the request for location updates.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 21 في هذه المجموعة.
فتح الحزمة
k this deck
10
What is the name of the only method of the LocationListener interface?

A) onMoved
B) onLocationChanged
C) onChanged
D) locationChanged
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 21 في هذه المجموعة.
فتح الحزمة
k this deck
11
ConnectionCallbacks provides callback methods that are automatically called when we ____________ or are disconnected from the Google Play service.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 21 في هذه المجموعة.
فتح الحزمة
k this deck
12
OnConnectionFailedListener provides a callback method that is automatically called if the connection attempt failed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 21 في هذه المجموعة.
فتح الحزمة
k this deck
13
One of the two methods of ConnectionCallbacks is onConnectionSuspended. What is the name of its other method?

A) onConnected
B) onSuspending
C) onSuspended
D) connect
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 21 في هذه المجموعة.
فتح الحزمة
k this deck
14
To call the requestLocationUpdates method, we need a FusedLocationProviderApi object reference. How can we get one?

A) FusedLocationProviderApi flpa = LocationServices.FusedLocationApi;
B) FusedLocationProviderApi flpa = LocationServices;
C) FusedLocationProviderApi flpa = FusedLocationApi;
D) FusedLocationProviderApi flpa = API;
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 21 في هذه المجموعة.
فتح الحزمة
k this deck
15
To get a GoogleApiClient reference, we can use the GoogleApiClient constructor.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 21 في هذه المجموعة.
فتح الحزمة
k this deck
16
The LocationListener interface is part of the com.google.android.gms.location package.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 21 في هذه المجموعة.
فتح الحزمة
k this deck
17
The Location class includes the getElapsedRealtimeNanos method, which returns the time since the last boot in nanoseconds, so we can compare the time between two location updates if we want to.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 21 في هذه المجموعة.
فتح الحزمة
k this deck
18
Once location updates have been requested, it is not possible to stop them.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 21 في هذه المجموعة.
فتح الحزمة
k this deck
19
The ConnectionCallbacks and OnConnectionFailedListener are static inner __________________ of the GoogleApiClient class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 21 في هذه المجموعة.
فتح الحزمة
k this deck
20
The __________________ method of the FusedLocationProviderApi interface returns the current location of the device as a Location reference.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 21 في هذه المجموعة.
فتح الحزمة
k this deck
21
The __________________ method of the LocationRequest class sets the minimum distance between consecutive updates.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 21 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 21 في هذه المجموعة.