In my android app, I have a bitmap (say b) and a button. Now when I click on the button, I want to share the bitmap. I am making use of the below code inside my onClic
Quoting the documentation:
A content: URI holding a stream of data associated with the Intent, used with ACTION_SEND to supply the data being sent.
b, therefore, is not supposed to be a Bitmap, but rather a Uri pointing to a Bitmap, served by a ContentProvider. For example, you could write the Bitmap to a file, then use FileProvider to serve it.