I would like to allow users to highlight text and post it to my web site. Is there a way to create an Android Intent running as a service which will show up on the social media / share list that appears in the Android system?
You know, when the user selects a picture and then the three dotted share icon appears and gives a list? How can I get my application's intent and icon added to the list just as the Twitter, FB etc. ones that show up?
To receive data from an external application in your application vis
Sharefunctionality, you need to create an activity in your application which will accept the incoming data. Add the following details inAndroidManifest.xmlfor the Activity which will accept the data:So , now if any application, shares a single image, your application will be visible in the list, and if the user selects your application,
ui.MyActivityactivity will be launched. You can change or add multiplemimeTypeas per your requirement.Also, you can add/change
actionasMULTIPLE_SENDto receive multiple shared files.Once this is done, in
onCreate()method of your activity, you can fetch the data in the following manner:You can get more details regarding this, in the Official Documentation