Android Intents and Filters MCQ Questions
This section focuses on "Intents and Filters" of Android. These Multiple Choice Questions (MCQ) should be practiced to improve the Android skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations.
1. An Android _____________ is an abstract description of an operation to be performed. It can be used with startActivity to launch an Activity.
A. Filters
B. Intent
C. Service
D. Broadcast Receiver
View Answer
Ans : B
Explanation: An Android Intent is an abstract description of an operation to be performed.
2. Which method is used to launch a new activity or get an existing activity to do something new?
A. Context.startActivity()
B. Context.startService()
C. Context.sendBroadcast()
D. All of the above
View Answer
Ans : A
Explanation: Context.startActivity() :The Intent object is passed to this method to launch a new activity or get an existing activity to do something new.
3. Which method is used to initiate a service or deliver new instructions to an ongoing service?
A. Context.startActivity()
B. Context.startService()
C. Context.sendBroadcast()
D. None of the above
View Answer
Ans : B
Explanation: Context.startService() : The Intent object is passed to this method to initiate a service or deliver new instructions to an ongoing service.
4. Which of the following action will display the phone dialer with the given number filled in?
A. ACTION_VIEW tel:123
B. ACTION_SET_WALLPAPER
C. ACTION_DIAL tel:123
D. None of the above
View Answer
Ans : C
Explanation: ACTION_DIAL tel:123 : Display the phone dialer with the given number filled in.
5. Which of the following is true about ACTION_TIMEZONE_CHANGED?
A. It is used to run default uninstaller
B. Show settings for choosing wallpaper
C. Display a list of people, which the user can browse through.
D. It intimates when time zone has changed
View Answer
Ans : D
Explanation: ACTION_TIMEZONE_CHANGED : It intimates when time zone has changed
6. The action in an Intent object can be set by the?
A. setAction() method
B. set() method
C. Action() method
D. setsAction() method
View Answer
Ans : A
Explanation: The action in an Intent object can be set by the setAction() method .
7. In Data, The URI is read by?
A. getD()
B. get()
C. getData()
D. getsetData()
View Answer
Ans : C
Explanation: The URI is read by getData() and the type by getType().
8. Which of the following is true about ACTION_SET_WALLPAPER?
A. Edit information about the person whose identifier is "1".
B. Show settings for choosing wallpaper
C. It will start the platform-defined tutorial
D. It intimates when time zone has changed
View Answer
Ans : B
Explanation: ACTION_SET_WALLPAPER : Show settings for choosing wallpaper
9. The extras can be set and read using the?
A. setExtras() and getExtras() methods
B. putsExtras() and getsExtras() methods
C. setsExtras() and getsExtras() methods
D. putExtras() and getExtras() methods
View Answer
Ans : D
Explanation: The extras can be set and read using the putExtras() and getExtras() methods respectively.
10. What is true about FLAG_ACTIVITY_NEW_TASK?
A. If set in an Intent passed to Context.startActivity()
B. If set, and the activity being launched is already running in the current task
C. This flag is generally used by activities that want to present a "launcher" style behavior
D. All of the above
View Answer
Ans : C
Explanation: FLAG_ACTIVITY_NEW_TASK: This flag is generally used by activities that want to present a "launcher" style behavior: they give the user a list of separate things that can be done, which otherwise run completely independently of the activity launching them
Discussion