Android Question Using Android share in B4A

shb777

Active Member
Licensed User
Longtime User
I'm writing a picture viewer, and I want to add the ability to print the pictures with my Brother wifi printer.
Other picture viewers have an icon with two lines at a 60 degree angle with dots on their ends, and pressing that allows you to print the picture with the brother software. How to I get that share icon to come up in B4A, and how to I handle sending it the file/path names? Steve
500_F_107620951_3khjilVjDc6RtdmBQL417guwZS6UNATH.jpg
 

shb777

Active Member
Licensed User
Longtime User
Sharing a file with FileProvider: https://www.b4x.com/android/forum/threads/share-txt-files.73166/#post-464921 (new requirement in Android 7).

Your example above, does what I want to do in your example, but when I insert it into my picture viewer, I keep getting this compile error

B4A version: 6.80
Parsing code. (0.11s)
Compiling code. Error
Error compiling program.
Error description: Unknown member: shared
Occurred on line: 2316
File.Copy(File.DirAssets, "b4a.png", Starter.shared, "b4a.png")
Word: shared

I don't know why. Steve

Ok I found the problem. I hadn't added the your code from the starter module to my starter module. now it's working
 
Last edited:
Upvote 0
Top