writeBitmapToShareableFile
Writes a bitmap to a shareable file in the cache directory and returns a shareable URI.
Uses a fixed filename so that only the most recent shared bitmap is kept in cache.
Return
A Result containing the Uri of the shareable file, or an error if the operation fails.
Parameters
context
The Android context.
bitmap
The bitmap to write.