Error while copying a file from assets to device

That’s strange

/Boban

2 Likes

my guess is, this is because for the companion app Kodular unfortunately does not use the/AppInventor folder, but a /Makeroid folder?
see also

@Boban, are you saying, the Copy method works fine for you using the companion app of Kodular?

Taifun

3 Likes

the final blocks should look like this


important: share the file after it has been copied… to share it before it has been copied completely might be the issue you currently have…

Taifun

3 Likes

Yes it does, on Samsung Note8 Android 9

I can also test with my other phones/versions just to make sure it works even on them

/Boban

2 Likes

That makes a lot of sense!

The copy only works with the apk. I’ve tried soooo many times with the Companion and it never worked.

Oh, I’m using a Moto G Android 6.0

Alright, thanks!!!

That would be amazing!! Thanks a lot! :slight_smile:

Btw, I’m aware that I’m pretty new to this Kodular world and something might have slipped under my radar. I really hope I’m not doing some extremelly silly mistake and making you guys waste your time in here! :slight_smile:

I tested also an a Galaxy Note8 Android 9 and for me it does not work.
So I made some adjustments:


Yeah2.aia (61.1 KB)

see also here:

2 Likes

Don’t know why it doesn’t work for you, this is what I get

bild

Edit: Ignore my answers as I figured out why it works for me, a clue using multiple builders

/Boban

1 Like

Are you absolute sure that this folder / path does not exists on your device?
/mnt/sdcard/AppInventor/assets/

and also that this file does not exists:
/mnt/sdcard/AppInventor/assets/WooHoo.pdf

If this folder exists on your device, delete it and try again.

2 Likes

That’s what I wrote above

/Boban

1 Like

ok, I am too late

Never liked that folder change from AppInventor to Makeroid as you get so confused

/Boban

2 Likes

So, trying to summarize the whole thing: the copy will work fine with the APK but won’t with the Companion (because the folder new name).

That’s it?

No, it should also work with Companion the way I have shown, so test my aia: Yeah2.aia (see above).

1 Like

hmm
Didn’t work here.

But I have a ideia why your example isn’t working here:

2

It’s searching in the external card, right? I don’t use it.

no, this is the correct path for the Kodular companion app to find a file in the assets…
thank you @bodymindpower
so my guess was correct. I will add a note in the documentation of the file extension

exactly, that was a bad decision…

Taifun

2 Likes

Yes, but the wrong path for APK. I checked it again (only “//” work for APK):


Same thing on AI2.

Companion or APK?

1 Like

The AppInventor path is still working for me.

image

1 Like

you are correct (as always) :wink:
and your latest version of your blocks is the way to go in Kodular
Taifun

2 Likes

Thank you so much guys!
I will mark it as solved now!

1 Like

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