I am using the Android-Sharing-Extension-ANE.
How to share an image as result from my application code?
This code does not work
var bitmap:Bitmap = ...;
// encoding image by native encoder (availible on FP 11.3/AIR 3.3 or newer)
var bitmapBytes:ByteArray = bitmap.bitmapData.encode(new Rectangle(0, 0, bitmap.width, bitmap.height), new JPEGEncoderOptions(70)));
var file:File = File.documentsDirectory.resolvePath("image_for_share.jpg");
var stream:FileStream = new FileStream(); // write file to local memory
stream.open(file, FileMode.WRITE);
stream.writeBytes(fileBytes);
stream.close();
SharingExtension.shareImage(file, "Choser title", "Message"));
From the "Read Me" of that ANE:
Since it's not clear what your exact problem is (because not enough information given)...
(1) Did you import the required Class files?
(2) Did you add (connect) the ANE to your project (in Settings)?
Read this for advise on adding an ANE:
https://www.adobe.com/devnet/air/articles/using-ane-in-flash.html