File Sharing help - issue with TaifunSharing extension

Hello, I am no longer able to share files. Even this old example no longer works. I have found that I am creating the file, and I can see it when I connect my phone to my computer. But I cannot get the path.
On my computer the path looks like this:
This PC\moto g pure (XT2163DL)\Internal shared storage\Android\data\edu.mit.appinventor.aicompanion3\files\data
The file read block works ok, but not sharing. The sharing appears to look for a different path than the file read function.
Any suggestions?

Hello Robert

A lot has been change by Google in the past year. There are strict rules as to which folders an App may access. See this guide by Power User Anke:

Some basics on Android storage system file read write

Hello Robert,

Can you please add a "dummy" label that is used for testing? After the image of the Camera component is taken, set the text of the dummy label to the image, and see what you get as the output of the label.

Well, if you are reading an image from the ASD, you get unlimited access.

Thanks Chris, I read that and it didn't help. I used those methods they were published in 2021/2022, and they worked then. Now the storage/emulated..... path no longer works. I want to know what is different between the file sharing block's method of accessing a file, and file read/write block's method. File read/write work fine, but sharing is apparently using a different method. I've read everything I could find on this subject, and one thing I read was a comment by Taifun that his file sharing would soon no longer work. Unfortunately so much of what I read is dated several years old and I have no way of knowing what is obsolete.

Like this?


It is being stored here.
T2163DL)\Internal shared storage\Android\data\edu.mit.appinventor.aicompanion3\files\Pictures
But the file share is looking for it in storage/emulated, etc....

I cant figure out the path to use with File Sharing to access this file.

File Sharing - context is important. File sharing on the same Android Device between Apps, that is different to sharing with a separate device, which I thought you meant. Yes, given the strict Android rules, file sharing as we know it may be obsolete - Google have changed a lot of things where we do not understand their intentions, texting being another area full of woe.

On the other hand Taifun may have meant that whatever his extension did that App Inventor didn't, is now covered by App Inventor. I don't know, so I will assign your Topic to Taifun and see if he can shed some light on the matter.

Thanks Chris!

The path is correct (regardless if using the Sharing component or TaifunSharing ext. But I get this message on Android 13 (despite storage permissions are granted for the Gmail app):

@Taifun

So use the Sharing component.

1 Like

I changed the topic.

Then the paths are the same but the difference is whether I am using the file internally or trying to export it to the outside world? But I don't get a "needs permission" error, it just says file file not sent. I can send a message OK, but not the file itself. I just get a "file not sent" message" after a minute.

Why not using the Sharing component?

I just swapped out the Taifun sharing for the standard sharing, and it worked.
I thought I already tried that but apparently didn't.
Thanks for the suggestion!

In this case, the user is using the ASD, so I believe it's not a problem.

Read my follow-up post Gordon.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

I now updated the extension to the current SDK31 and it is now working again... :partying_face:.

from the documentation at App Inventor Extensions: Sharing | Pura Vida Apps

Note: This extension is a modified version of the Sharing component.

Modifications:

  • For the default sharing methods always the App Chooser Dialog window should open.
  • You can adjust the app chooser default dialog text.
  • There is an extra method to share via Whatsapp, without opening the app chooser dialog.

Taifun