Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to write an Android share "plugin"?

Tags:

android

I want to add my app into the share dialog in Android. So that the user can select an image and "share" it with my application, which would do some modifications before emailing it.

Any ideas how to where to start?

like image 758
Shachar Weis Avatar asked Jul 06 '26 01:07

Shachar Weis


1 Answers

You need to add an intent-filter to your application manifest, that allows it to handle objects of the MIME type image/jpeg.

Your application then receives a Uri to the file, and you can use that Uri to modify the image, as requested.

There's a lot about it on the Android developer site, including code samples: http://developer.android.com/guide/topics/intents/intents-filters.html

like image 194
Michell Bak Avatar answered Jul 08 '26 16:07

Michell Bak



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!