I am new to android application development. I was wondering if it is possible for an application to send information to an external application and that external application understands how to handle the input. For example, say my application wants to send some text to a specific text field of a web site with multiple text fields. Is there a certain way to customize the information sent in an intent to let the web site know which field I want the text to be inputted to? I also don’t want it to be limited to just websites but maybe other 3rd party android applications.
Share
Intents are Android specific and can only be used to communicate data to other Android components.
If you want to ‘send’ data to a website you would typically use an HTTP POST approach.
As for communicating with 3rd party apps, yes, this is common use for Intents but the 3rd party app needs to be able to ‘understand’ what you’re sending it. Using an Intent to send the URI of a photo to a Text Editor app, for example, will make no sense. Similarly sending ‘text’ to a Photo Viewer makes no sense.
Further more, when communicating with 3rd party apps, it is generally not the case that you would pick (target) a specific app. In most cases you would create an Intent with an ‘action’ such as ACTION_VIEW together with the data (text, image etc) then let the Android system choose a suitable app to perform the action (or provide a ‘chooser’ to allow the user to select the app).