Android Programming and Technical Programming Technical

What will happen if there is no action in an implicit intent, will it trigger any component?

Options

1) Will pass the action test if intent-filter has at least one action.
2) Will pass the action test if intent-filter also doesn't have any action.
3) Will pass the test if intent is explicit. In case of explicit intent it will test for intent resolution.
4) Will pass the action test only if intent has at least one action.

Read Solution (Total 0)

Android Other Question

What is the importance of putExtra() method in Android? How is it different from setData()? Anyway both are passing data, then what is the difference?

Options
1) Both putExtra() and setData() are used for same purpose i.e. to pass data to other component.
2) setData() - is to pass data on which to take action. putExtra() - is to send extra information about this intent.
3) setData() - is to send extra information about this intent. putExtra() - is to pass data on which to take action.
4) Logically both are same, so one can omit setData(), and pass all data through putExtra only.
What will happen if an activity is started with implicit intent, and there is no matching intent-filter?

Options
1) Nothing will happen, but it will not launch any new screen.
2) Nothing will happen, some how how it launches target component
3) It will throw run time exception - activityNotFoundException, and crashes if it is handled properly.
4) Compile time error.