Question: =+Usually, you use the setData() method to set the data on which an Intent object is going to operate, such as passing a URL to
=+Usually, you use the setData() method to set the data on which an Intent object is going to operate, such as passing a URL to an Intent object so that it can invoke a web browser to view a web page.
(For more examples, see the section “Calling Built-In Applications Using Intents,” later in this chapter.)
To retrieve the data set using the setData() method, use the getData() method (in this example data is an Intent object):
//---get the result using getData()---
Toast.makeText(this, data.getData().toString(), Toast.LENGTH_SHORT).show();
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
