[Solved] Export Json file from an Android Emulator or a Real Phone ?

Hello, I recently try do make an editor mode in one of my prototype for making levels, I know how to save them and open them from the phone that I use to save the level, but I would like to export them in my pc. I’m not looking having a good security, It’s ok if everyone can access them. I’m using visual studio 2017.

Here is the code that I use to save my level. Important note : the name of the level is “test” (so it become ‘test.json"’), and for the moment I always pass the value “true” for the second parameter, so if any file with the same name exist, it erase it.

I try few scripts with different path :
You can see in orange where the level is save.


or

Then I try to import them on my pc, I try to use some tools like “Android Device Monitor” (I don’t have a lot of knowledge about it, so I do a lot a research… ), I try to access the file, but it look like I can’t access the file :

I also look in other folders, but nothing again.

Now the big question is : How can I import them on my computer. If you have any solution (like if something exist to throw it in a email or whatever), I take it.

I finally found a way to export json file from emulator by saving my json file in the sd card instead on the application path. I’m using “Android.OS.Environment.ExternalStorageDirectory.Path”, so now I can export the json on my pc because I have access to this part of the storage.

1 Like