Android Share App Data (ACTION_SEND)Android uses ACTION_SEND event of android.content.Intent class to send data from one activity to another and from current activity to outside the application. Intent class needs to specify the data and its type which is to be share. Most commonly, ACTION_SEND action sends URL of build-in Browser app. While sharing the data, Intent call createChooser() method which takes Intent object and specify the title of the chooser dialog. Intent.createChooser() method allows to display the chooser. Example of ACTION_SENDIn this example, we are going to share plain text which is a URL of browser. activity_main.xml File: activity_main.xml Activity classFile: MainActivity.java Output Next TopicAndroid Fragments |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India