I save a number from a apk in a file but i want dont delete file when i uninstall apk

I save a number from a apk in a file but i want dont delete file when i uninstall apk.

image

Then save and read it like this:

/madhi

This will save the file to the root of your sdcard (/sdcard/emulated/0) which will survive an uninstallation of the app

hi ,when i reinstall app ,can not find file.i use noxplayer emulator.

The root directory of the External Storage is:
/storage/emulated/0/ or
file:///storage/emulated/0/ or
file:///mnt/sdcard/

See here:

Did you change:

mahdi

to

/madhi

(note the forward slash before the word madhi)

1 Like

ýou might want to test this on an Android device
Taifun


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

Hi.Ok.thats right.thanks

image

Hi.thanks.

Hi.Ok.thanks.

i want read file when exist .how i can understood file exist or no??

Use Taifun's File extension: App Inventor Extensions: File | Pura Vida Apps

grafik

1 Like

hi.thanks.but i dont see this blocks.

hi i dont see this block.

As I said before

Hi thanks.

Hi .i add Taifun,s file extension to my project.i want when screen initialize,check do file exist?if exist ,read file.


is below block correct?
image

this seems to be correct...
what about trying it yourself?
see also tip 2 here App Inventor: How to Learn | Pura Vida Apps
Taifun

Hi thanks. i will do .

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