nerdexam
Android

OA0-002 · Question #25

OA0-002 Question #25: Real Exam Question with Answer & Explanation

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);

Community Discussion

No community discussion yet for this question.

Full OA0-002 Practice