MFile - a modified version of Sunny's `EFile` extension - Shared folders - storage permissions - Android 11+

After you have imported an extension, disconnect the companion by Connect > Reset connection. The companion should then automatically exit. If it doesn't, exit the companion and connect again.

I have no issues with that, regardless of which version I chose first.

That is because Frank imported the extension after he connects to the companion. When you scan the QR code to connect, the computer sends all extensions and assets to the companion, but it shouldn't send extensions during the connection.

Take a look (connected with Companion):

Hmm...that's interesting. One of my found errors was resolved by restarting the companion because the user upgraded the extension but did not restart it.

I find this in Taifun's webpage:

While starting the companion app, all necessary assets and also the imported extensions of your project will be copied to your device. So in case the no such class error shows up, the extension code to run the extension is not available on your device. Without that code the companion app is not able to execute methods from the extension.

and:

After importing an extension, please restart the companion app.

2 Likes

Yes, that can happen occasionally. That's why I often delete the assets folder from Companion.

@ All
Thank's for the Tipps.
I will continue to test and report.

Frank

Does it work for you now with the new version (created using Rush)?

Yes, Version 2 created using Rush works.

Thank you, Anke.

Frank

I'm trying to compile this block on android 11, but I'm receiving an error message

blocks

Usually set and coerce property error occurs if you empty sockets/slots in your Screen1 blocks. Check warnings or errors in Screen1, fix them and try again

image

1 Like

Now compiled, but I can not read the file, my screen is blank, no errors

Probably you didn't grant read storage permission.

before being able to read it (in Screen.Initialize) you first should save the file
or: only read the file if it already exists
Taifun

The file allready exist, the project runs well with companion, I'm wondering why I should use this extension instead of using file component

Post the aia. Which Android version?

... and read this:

on first run of the app the file can't already exist in event Screen.Initialize
and if it exists, then it was not created by your app...
in this case you only can use SAF to read it...see again the overview by @Anke

Taifun

I'm wondering why I should use this extension instead of file component with Android 11
Shared_Mfile.aia (40.1 KB)

because of the bugs in the file component, see the first post in this thread

If you are asking for help, I recommend you to make it as easy for others to be able to help you ...
You probably will get more feedback then...

which means in your case post a screenshot of your relevant blocks...

To download the aia file, upload it to App Inventor, open it, do some bug hunting for you, etc... this takes time, and most people will not do that...
Thank you.

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

1 Like