AND-401 Exam QuestionsBrowse all questions from this exam

AND-401 Exam - Question 20


What does this code do?

Intent intent = new Intent();

intent.setAction(Intent.ACTION_VIEW);

intent.setData(android.net.Uri.parse("http://www.androidatc.com")); startActivity(intent);

Show Answer
Correct Answer: D

The given code creates an intent, sets its action to view a specified URL, and starts an activity using this intent. This is an example of using an implicit intent because the action and data are specified, but the target activity is not explicitly named. Implicit intents allow Android to determine the most appropriate application to handle the intent.

Discussion

1 comment
Sign in to comment
MmadiOption: D
Dec 31, 2022

D. Starts an activity using an implicit intent.