#Where Are Files Managed by the Tauri Plugin Stored on Android?

1 messages · Page 1 of 1 (latest)

trail jetty
#

Where are the files manipulated by the Tauri plugin stored on Android? I'm having trouble finding the file path when trying to operate on the file using Kotlin. For example, even when I use the Store plugin with await load("cookie.json"):

val cookieFile = File(applicationContext.filesDir, "cookie.json")
println("cookieFileのpath: ${cookieFile.absolutePath}")
// /data/user/0/jp.takos.app/files/cookie.json
println("cookieFile exists: ${cookieFile.exists()}")
// 0

It appears that the file does not exist.

However, since the plugin is working correctly, the file must be saved somewhere.

Note: I translated the text, so there might be some inaccuracies.

graceful hearth
#

I'm in a similar situation.
Did you open the project in android studio? Or do you know how to?

trail jetty
#

I am running this on an actual Android device. I also checked with a file manager app, but it didn't exist either.

graceful hearth
#

if you use getStore does it return something even if you cant find the file?

#
const asd= await load('asd.json')
    asd.set('asd',1)
    asd.save()
    const b=await getStore('asd.json')
    console.log(await b?.get('asd'));

i did a quick test and yes the store works but the file is nowhere to be found

trail jetty
#

It's a bit forceful, but if the problem persists, perhaps manipulating files with Kotlin commands will solve the problem?

graceful hearth
#

well best of luck

graceful hearth
#

@trail jetty hey i found the file

#

you can see it in android studio device file explorer under data/data/<your app name>/

trail jetty
#

thank you!!!!!!

I've been searching for a solution for a while now.

Thanks for letting me know.

graceful hearth
#

👍