Deck 12: Using an Existing App: Taking a Photo and Sending an Email

Full screen (f)
exit full mode
Question
An app can access another app.
Use Space or
up arrow
down arrow
to flip the card.
Question
We can test whether the device has a given feature, such as a camera, by calling the hasSystemFeature method of the ____________ class, passing a constant of the class that corresponds to that feature.
Question
The argb, alpha, red, green, and blue methods of the Color class of the android.graphics package are all static methods.
Question
The alpha, red, green, and blue methods of the Color class of the android.graphics package all accept one parameter, an int representing a color.
Question
To access programmatically a resource named xyz.xml located in the drawable directory, we use the expression ____________.
Question
To set the current value of a seek bar to 0 inside an XML layout file, what attribute do we use?

A) android:current
B) android:value
C) android:progress
D) android:seek
Question
It is possible to write a method that takes a double parameter and returns that double with a maximum of three significant digits after the decimal point.
Question
It is possible for an app to store persistent data on a device.
Question
The fromFile static method of the Uri class takes a File parameter and returns a(n) ____________ reference.
Question
The createChooser static method of the Intent class returns an Intent reference such that when we start an activity with it, the user is presented with a choice of ____________ that match the Intent.
Question
The constant that we can pass to the hasSystemFeature to check whether the device includes a camera is ____________.
Question
After having started an Activity for an Intent by calling the ____________ method, we can access the results inside the onActivityResult method.
Question
The ____________ of the Bitmap class returns the integer representation of the color of the pixel at coordinate( x, y ) in the Bitmap.
Question
The ____________ of the Bitmap class sets the color of a point at some x and y coordinate in the Bitmap.
Question
The onStopTrackingTouch method of the SeekBar.OnSeekBarChangeListener interface is called when the user ____________ touching the seek bar.
Question
What constant do we pass to the Intent constructor to create an Intent to use a camera app?

A) MediaStore.IMAGE
B) MediaStore.IMAGE_CAPTURE
C) MediaStore.ACTION_IMAGE_CAPTURE
D) MediaStore.CAMERA
Question
What is the name of the class that encapsulates a slider?

A) Slider
B) SeekBar
C) Button
D) CheckBox
Question
What is the XML attribute that corresponds to the setMax method of the ProgressBar class?

A) android:max
B) max
C) android:maximum
D) android:setMax
Question
What is the value of the DIRECTORY_PICTURES constant of the Environment class?

A) Directory
B) Photos
C) Pictures
D) Directory_Pictures
Question
What is the data type of the only parameter of the setImageBitmap method of the ImageView class?

A) Bitmap
B) ImageBitmap
C) Image
D) ImageView
Question
It is not possible to add data in an Intent in the form of key/value pairs.
Question
The ImageView class can be used to display an image.
Question
The alpha, red, green, and blue methods of the Color class of the android.graphics package all return an int whose value is between 0 and 255.
Question
The constant that we can pass to the hasSystemFeature to check whether the device includes Bluetooth is __________________.
Question
The __________________ method of the Bitmap class returns the width of the Bitmap object.
Question
The __________________ method of the Bitmap class returns the height of the Bitmap.
Question
The onProgressChanged method of the SeekBar.OnSeekBarChangeListener interface is called __________________ as the user moves the seek bar.
Question
If we want to assign a unique name to a file, we can incorporate in the file name the time since the last boot in milliseconds, which we can get by calling the __________________ method of the SystemClock class.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/28
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 12: Using an Existing App: Taking a Photo and Sending an Email
1
An app can access another app.
True
2
We can test whether the device has a given feature, such as a camera, by calling the hasSystemFeature method of the ____________ class, passing a constant of the class that corresponds to that feature.
PackageManager
3
The argb, alpha, red, green, and blue methods of the Color class of the android.graphics package are all static methods.
True
4
The alpha, red, green, and blue methods of the Color class of the android.graphics package all accept one parameter, an int representing a color.
Unlock Deck
Unlock for access to all 28 flashcards in this deck.
Unlock Deck
k this deck
5
To access programmatically a resource named xyz.xml located in the drawable directory, we use the expression ____________.
Unlock Deck
Unlock for access to all 28 flashcards in this deck.
Unlock Deck
k this deck
6
To set the current value of a seek bar to 0 inside an XML layout file, what attribute do we use?

A) android:current
B) android:value
C) android:progress
D) android:seek
Unlock Deck
Unlock for access to all 28 flashcards in this deck.
Unlock Deck
k this deck
7
It is possible to write a method that takes a double parameter and returns that double with a maximum of three significant digits after the decimal point.
Unlock Deck
Unlock for access to all 28 flashcards in this deck.
Unlock Deck
k this deck
8
It is possible for an app to store persistent data on a device.
Unlock Deck
Unlock for access to all 28 flashcards in this deck.
Unlock Deck
k this deck
9
The fromFile static method of the Uri class takes a File parameter and returns a(n) ____________ reference.
Unlock Deck
Unlock for access to all 28 flashcards in this deck.
Unlock Deck
k this deck
10
The createChooser static method of the Intent class returns an Intent reference such that when we start an activity with it, the user is presented with a choice of ____________ that match the Intent.
Unlock Deck
Unlock for access to all 28 flashcards in this deck.
Unlock Deck
k this deck
11
The constant that we can pass to the hasSystemFeature to check whether the device includes a camera is ____________.
Unlock Deck
Unlock for access to all 28 flashcards in this deck.
Unlock Deck
k this deck
12
After having started an Activity for an Intent by calling the ____________ method, we can access the results inside the onActivityResult method.
Unlock Deck
Unlock for access to all 28 flashcards in this deck.
Unlock Deck
k this deck
13
The ____________ of the Bitmap class returns the integer representation of the color of the pixel at coordinate( x, y ) in the Bitmap.
Unlock Deck
Unlock for access to all 28 flashcards in this deck.
Unlock Deck
k this deck
14
The ____________ of the Bitmap class sets the color of a point at some x and y coordinate in the Bitmap.
Unlock Deck
Unlock for access to all 28 flashcards in this deck.
Unlock Deck
k this deck
15
The onStopTrackingTouch method of the SeekBar.OnSeekBarChangeListener interface is called when the user ____________ touching the seek bar.
Unlock Deck
Unlock for access to all 28 flashcards in this deck.
Unlock Deck
k this deck
16
What constant do we pass to the Intent constructor to create an Intent to use a camera app?

A) MediaStore.IMAGE
B) MediaStore.IMAGE_CAPTURE
C) MediaStore.ACTION_IMAGE_CAPTURE
D) MediaStore.CAMERA
Unlock Deck
Unlock for access to all 28 flashcards in this deck.
Unlock Deck
k this deck
17
What is the name of the class that encapsulates a slider?

A) Slider
B) SeekBar
C) Button
D) CheckBox
Unlock Deck
Unlock for access to all 28 flashcards in this deck.
Unlock Deck
k this deck
18
What is the XML attribute that corresponds to the setMax method of the ProgressBar class?

A) android:max
B) max
C) android:maximum
D) android:setMax
Unlock Deck
Unlock for access to all 28 flashcards in this deck.
Unlock Deck
k this deck
19
What is the value of the DIRECTORY_PICTURES constant of the Environment class?

A) Directory
B) Photos
C) Pictures
D) Directory_Pictures
Unlock Deck
Unlock for access to all 28 flashcards in this deck.
Unlock Deck
k this deck
20
What is the data type of the only parameter of the setImageBitmap method of the ImageView class?

A) Bitmap
B) ImageBitmap
C) Image
D) ImageView
Unlock Deck
Unlock for access to all 28 flashcards in this deck.
Unlock Deck
k this deck
21
It is not possible to add data in an Intent in the form of key/value pairs.
Unlock Deck
Unlock for access to all 28 flashcards in this deck.
Unlock Deck
k this deck
22
The ImageView class can be used to display an image.
Unlock Deck
Unlock for access to all 28 flashcards in this deck.
Unlock Deck
k this deck
23
The alpha, red, green, and blue methods of the Color class of the android.graphics package all return an int whose value is between 0 and 255.
Unlock Deck
Unlock for access to all 28 flashcards in this deck.
Unlock Deck
k this deck
24
The constant that we can pass to the hasSystemFeature to check whether the device includes Bluetooth is __________________.
Unlock Deck
Unlock for access to all 28 flashcards in this deck.
Unlock Deck
k this deck
25
The __________________ method of the Bitmap class returns the width of the Bitmap object.
Unlock Deck
Unlock for access to all 28 flashcards in this deck.
Unlock Deck
k this deck
26
The __________________ method of the Bitmap class returns the height of the Bitmap.
Unlock Deck
Unlock for access to all 28 flashcards in this deck.
Unlock Deck
k this deck
27
The onProgressChanged method of the SeekBar.OnSeekBarChangeListener interface is called __________________ as the user moves the seek bar.
Unlock Deck
Unlock for access to all 28 flashcards in this deck.
Unlock Deck
k this deck
28
If we want to assign a unique name to a file, we can incorporate in the file name the time since the last boot in milliseconds, which we can get by calling the __________________ method of the SystemClock class.
Unlock Deck
Unlock for access to all 28 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 28 flashcards in this deck.