Deck 6: Jam Implementing Audio in Android Apps

Full screen (f)
exit full mode
Question
Java allows only one thread of execution at a time.
Use Space or
up arrow
down arrow
to flip the card.
Question
You typically use the finish() method right after an activity is launched to clean up resources of the previously running activity.
Question
On an Android, what is 1000 milliseconds equivalent to in seconds?

A) 0.1 seconds
B) 1 second
C) 10 seconds
D) 100 seconds
Question
A delay timer is scheduled in milliseconds using the Timer class.
Question
Consumers often buy a phone with more memory to increase the number of songs they can store.
Question
The opening screen of an app that displays for a few seconds is called a burst screen.
Question
Which feature in Java executes a one-time task?

A) alarm
B) start
C) task
D) timer
Question
The four states of an Activity determine whether the activity is running, paused, idle, or terminated.
Question
What can be described as the series of actions from the beginning of an Activity to its end?

A) life cycle
B) flow chart
C) run time
D) execution period
Question
When you write the code to create a TimerTask , the start() method can be created as an auto-generated method stub.
Question
What invokes a scheduled Timer?

A) AbstractTask
B) ScheduledTask
C) Task
D) TimerTask
Question
If an Activity is hidden, the onStart() method makes the Activity visible.
Question
What is the TextView property for backgrounds?

A) graphic
B) background
C) picture
D) image
Question
When buying a phone, what specification should be considered to allow more music to be stored?

A) memory
B) number of speakers
C) screen size
D) text plan
Question
What unit of time is used when scheduling a timer?

A) milliseconds
B) minutes
C) picoseconds
D) seconds
Question
What method marks the end of an Activity?

A) atEnd
B) onClose
C) onDestroy
D) onEnd
Question
Where should you place an image file that will be used as a background image for a TextView control?

A) res\images folder
B) manifests folder
C) res\drawable folder
D) values\backgrounds folder
Question
It's not necessary to understand the life cycle of an app in order to code it.
Question
Android music apps are not capable of playing music from a memory card.
Question
What does the splash screen provide time for Android to do?

A) bootstrap the phone driver
B) download updates
C) initialize resources for your app
D) stream data from Google
Question
The ____________________ method releases resources and frees up memory connected to an Activity.
Question
Which method will temporarily stop music while it is playing?

A) cease
B) pause
C) start
D) stop
Question
In a camera app, the next step in the life cycle after tapping the button to take a picture is to call on which method?

A) onPause() to let the user do something else
B) onRestart() to restart the rest of the app
C) onResume() to reactivate the camera
D) onStop() to hide the live image
Question
Which of the following methods hides an Activity?

A) onDestroy
B) onResume
C) onStart
D) onStop
Question
Each of the following are a common state for the MediaPlayer class except for which one?

A) continue()
B) pause()
C) start()
D) stop()
Question
The code to create a timer named splashtime is Timer splashtime = __________________________.
Question
To schedule a three second TimerTask named splash for a timer named splashtime , the correct code is ___________________________________.
Question
Which of the following classes comes with the Android platform to play audio and video files?

A) iTunes
B) MediaPlayer
C) Player
D) VideoPlayer
Question
Which type of variable ceases to exist when execution of its declaring method completes?

A) constant
B) global
C) local
D) static
Question
Which property determines whether a control is displayed or not?

A) display property
B) seen property
C) viewable property
D) visibility property
Question
Which of the following actions can the MediaPlayer class NOT do?

A) play different music formats
B) play music files
C) report its current state
D) stop playing music
Question
What type of variable is visible in multiple methods throughout the program?

A) scope variable
B) class variable
C) local variable
D) universal variable
Question
After entering the TimerTask code, tap or click the red error line under the TimerTask( ) to add the _____________ method, an auto-generated method stub.
Question
A(n) ____________________ is a single sequential flow of control within a program.
Question
Which property of an Activity determines whether the Activity is active, paused, stopped, or dead.

A) label
B) name
C) state
D) tag
Question
Which property of a control determines whether the control is displayed on the screen?

A) Display
B) Visibility
C) Active
D) Show
Question
What is the most common file type of media supported for audio playback on the Android?

A) midi
B) mp3
C) ogg
D) wav
Question
Why might a music player fail to play a given file?

A) the file format is unsupported
B) another file is already playing
C) the file is stored on the memory card
D) the volume is too high
Question
Which is the correct statement to make a button named btnStart visible?

A) btnStart.setVisibility( S how.VIEW );
B) btnStart.setVisibility(Show. VISIBLE);
C) btnStart.setVisibility(View. SHOW);
D) btnStart.setVisibility(View. VISIBLE);
Question
Which of the following statements creates a new instance of MediaPlayer and assigns it to mpTrombone?

A) MediaPlayer.new(mpTrombone);
B) mpTrombone = MediaPlayer.create();
C) MediaPlayer.create(mpTrombone);
D) mpTrombone = new MediaPlayer();
Question
A(n) ____________________ is a piece of technology that is used to compress and decompress audio and video files.
Question
The ____________________ of a variable refers to the variable's visibility within a class.
Question
Typically, the ____________________ method, which is inside the onDestroy method, is called directly before another Activity is launched.
Question
Finish the code to assign a music file named guitar located in the raw directory to the mpGuitar MediaPlayer instance : mpGuitar = ______________________________.
Question
Android provides the ____________________ class to record audio and video.
Question
____________________ variables cease to exist when their class or activity is unloaded.
Question
The code to reference a music file called "balloonPop" in the raw directory is ____________________.
Question
When storing audio and video files in an application's resources for playing, the correct folder to use is ____________________.
Question
If you want a button to respond to a user's tap or click , you need to call the ____________________  method to implement the button.
Question
The method to modify the visibility property of a control is ____________________.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 6: Jam Implementing Audio in Android Apps
1
Java allows only one thread of execution at a time.
False
2
You typically use the finish() method right after an activity is launched to clean up resources of the previously running activity.
True
3
On an Android, what is 1000 milliseconds equivalent to in seconds?

A) 0.1 seconds
B) 1 second
C) 10 seconds
D) 100 seconds
B
4
A delay timer is scheduled in milliseconds using the Timer class.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
5
Consumers often buy a phone with more memory to increase the number of songs they can store.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
6
The opening screen of an app that displays for a few seconds is called a burst screen.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
7
Which feature in Java executes a one-time task?

A) alarm
B) start
C) task
D) timer
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
8
The four states of an Activity determine whether the activity is running, paused, idle, or terminated.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
9
What can be described as the series of actions from the beginning of an Activity to its end?

A) life cycle
B) flow chart
C) run time
D) execution period
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
10
When you write the code to create a TimerTask , the start() method can be created as an auto-generated method stub.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
11
What invokes a scheduled Timer?

A) AbstractTask
B) ScheduledTask
C) Task
D) TimerTask
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
12
If an Activity is hidden, the onStart() method makes the Activity visible.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
13
What is the TextView property for backgrounds?

A) graphic
B) background
C) picture
D) image
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
14
When buying a phone, what specification should be considered to allow more music to be stored?

A) memory
B) number of speakers
C) screen size
D) text plan
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
15
What unit of time is used when scheduling a timer?

A) milliseconds
B) minutes
C) picoseconds
D) seconds
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
16
What method marks the end of an Activity?

A) atEnd
B) onClose
C) onDestroy
D) onEnd
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
17
Where should you place an image file that will be used as a background image for a TextView control?

A) res\images folder
B) manifests folder
C) res\drawable folder
D) values\backgrounds folder
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
18
It's not necessary to understand the life cycle of an app in order to code it.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
19
Android music apps are not capable of playing music from a memory card.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
20
What does the splash screen provide time for Android to do?

A) bootstrap the phone driver
B) download updates
C) initialize resources for your app
D) stream data from Google
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
21
The ____________________ method releases resources and frees up memory connected to an Activity.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
22
Which method will temporarily stop music while it is playing?

A) cease
B) pause
C) start
D) stop
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
23
In a camera app, the next step in the life cycle after tapping the button to take a picture is to call on which method?

A) onPause() to let the user do something else
B) onRestart() to restart the rest of the app
C) onResume() to reactivate the camera
D) onStop() to hide the live image
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
24
Which of the following methods hides an Activity?

A) onDestroy
B) onResume
C) onStart
D) onStop
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
25
Each of the following are a common state for the MediaPlayer class except for which one?

A) continue()
B) pause()
C) start()
D) stop()
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
26
The code to create a timer named splashtime is Timer splashtime = __________________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
27
To schedule a three second TimerTask named splash for a timer named splashtime , the correct code is ___________________________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
28
Which of the following classes comes with the Android platform to play audio and video files?

A) iTunes
B) MediaPlayer
C) Player
D) VideoPlayer
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
29
Which type of variable ceases to exist when execution of its declaring method completes?

A) constant
B) global
C) local
D) static
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
30
Which property determines whether a control is displayed or not?

A) display property
B) seen property
C) viewable property
D) visibility property
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
31
Which of the following actions can the MediaPlayer class NOT do?

A) play different music formats
B) play music files
C) report its current state
D) stop playing music
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
32
What type of variable is visible in multiple methods throughout the program?

A) scope variable
B) class variable
C) local variable
D) universal variable
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
33
After entering the TimerTask code, tap or click the red error line under the TimerTask( ) to add the _____________ method, an auto-generated method stub.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
34
A(n) ____________________ is a single sequential flow of control within a program.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
35
Which property of an Activity determines whether the Activity is active, paused, stopped, or dead.

A) label
B) name
C) state
D) tag
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
36
Which property of a control determines whether the control is displayed on the screen?

A) Display
B) Visibility
C) Active
D) Show
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
37
What is the most common file type of media supported for audio playback on the Android?

A) midi
B) mp3
C) ogg
D) wav
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
38
Why might a music player fail to play a given file?

A) the file format is unsupported
B) another file is already playing
C) the file is stored on the memory card
D) the volume is too high
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
39
Which is the correct statement to make a button named btnStart visible?

A) btnStart.setVisibility( S how.VIEW );
B) btnStart.setVisibility(Show. VISIBLE);
C) btnStart.setVisibility(View. SHOW);
D) btnStart.setVisibility(View. VISIBLE);
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
40
Which of the following statements creates a new instance of MediaPlayer and assigns it to mpTrombone?

A) MediaPlayer.new(mpTrombone);
B) mpTrombone = MediaPlayer.create();
C) MediaPlayer.create(mpTrombone);
D) mpTrombone = new MediaPlayer();
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
41
A(n) ____________________ is a piece of technology that is used to compress and decompress audio and video files.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
42
The ____________________ of a variable refers to the variable's visibility within a class.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
43
Typically, the ____________________ method, which is inside the onDestroy method, is called directly before another Activity is launched.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
44
Finish the code to assign a music file named guitar located in the raw directory to the mpGuitar MediaPlayer instance : mpGuitar = ______________________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
45
Android provides the ____________________ class to record audio and video.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
46
____________________ variables cease to exist when their class or activity is unloaded.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
47
The code to reference a music file called "balloonPop" in the raw directory is ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
48
When storing audio and video files in an application's resources for playing, the correct folder to use is ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
49
If you want a button to respond to a user's tap or click , you need to call the ____________________  method to implement the button.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
50
The method to modify the visibility property of a control is ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 50 flashcards in this deck.