Android
OA0-002 · Question #25
The following code is a part of a program which sends a status bar notification. Which is the correct code to put into (1) so that it will automatically cancel the notification after it occurs?
The correct answer is B. notification.flags |= Notification.FLAG_AUTO_CANCEL. See the full explanation below for the reasoning.
Question
The following code is a part of a program which sends a status bar notification. Which is the correct code to put into (1) so that it will automatically cancel the notification after it occurs?
Options
- Anotification.flags |= Notification.FLAG_INSISTENT;
- Bnotification.flags |= Notification.FLAG_AUTO_CANCEL;
- Cnotification.setFlags(Notification.FLAG_AUTO_CANCEL);
- Dnotification.setFlags(Notification. FLAGJNSISTENT);
How the community answered
(40 responses)- A15% (6)
- B73% (29)
- C5% (2)
- D8% (3)
Community Discussion
No community discussion yet for this question.