How to copy file?

for APK:
grafik

for Companion:
file:///storage/emulated/0/Makeroid/assets/image1.jpg

i don’t understand what you mean ?

what changes i need

Now it’s working fine.

i try this but not working

need label or text box text

images copy success but image not show in my gallery

You have to use the galleryrefresh block from this extension.
https://puravidaapps.com/tools.php

2 Likes

component_method

how to i set this block in this blow block

Why not try for yourself and see what works and not. That is the fun of learning.

2 Likes

i try this but not working ?
file copy is work but its not work

put the galleryresh block behind the copyasyncblock.

File copy work fine but not show in gallery

it does not make much sense to refresh a file, which is still in the process of copying…
what about using the Copied event, which will be fired after the file has been copied successfully and use the GalleryRefresh method there?

Taifun

2 Likes

Brain fart. It is a asyncblock. :crazy_face:

1 Like

try this and check if it works for you …
copyFromAssets_via_ListViewSelection.apk (5.1 MB)

@bodymindpower this looks good…
but would look better, :wink: if

  1. you add the GalleryRefresh method in the Copied event
  2. also the Exists method does not really make sense to use here… the file will be there after it has been copied successfully, i.e after the Copied event fired… remember, CopyAsync is an anynchronous method… for larger files this takes a few milliseconds…

Taifun

You are correct as always! :wink:

but .GalleryRefresh has no effect on displaying the image in the gallery.

use Do it to debug your blocks… :wink:
there should be only one slash…


Taifun

1 Like

Eagle eye :smile:
(I copied & pasted too much)

copyFromAssets_via_ListViewSelection2.apk (5.1 MB)
copyFromAssets_via_ListViewSelection2.aia (66.0 KB)

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