Using BlueStacks to run an app on my PC (and save data to the PC)

Works great but I want data to be saved on the PC and the "file" function doesn't work.
Could you advise?

please read this before making a new topic

Hello Sigal.

Bluestacks is an emulator. Bluestacks probably is not able to store data from the app to the PC. Bluestacks has no internal storage in itself as far as I can determine so there is no place you can send a file using the File control.

Here may be a way to transfer information without using the File control https://7labs.io/tips-tricks/how-to-access-your-computers-files-in-bluestacks-on-windows.html

If you run your app on an actual Android, does your code allow you to save it to the Android?

Why not share data with GoogleDrive ?

Thank you for your reply.
Yes, when I run it on Android, I get a text file with the data I wanted.
I'll try using the information on the link you sent. Will update if it works.
Thanks again.

Solved - found the data in BlueStacks media manager in the Explore tab and there's an option to Export to Windows.
Thanks for your help :slight_smile:

Hello, good day to anyone reading this.
I have made an app that reads information from a file thats being written by a Python code.
The python code extracts information from Google Calendar and then writes certain things to a regular txt file.
Now to run the Mit App i need an emulator for it to run on my laptop, but here comes the problem.
I can edit wthe file with Python no problem there BUT i do not know how I can make the app read that specific path to the file. I know where its located, i have found the sdCard folder but whenever i go into bluestacks i cannot find it when i check the internal memory. All i need is for the app to read an external file, thats located in bluestacks named 'test_text.txt' there is a shared folder with windows and in there i can see and edit the file in question. I just need the path to that file for the appmaker.
This is what it all looks like in the blocks


This is the bluestacks file location

and revisit Deleting text in a txt file without losing the file (using a Bluestacks emulator)

alternatively, you might visit a Bluestacks forum.

Iv looked everywhere on the forum and internet, cant find anything.
All i want is for the MIT app to read from the sharedfolder file in bluestacks from windows.
I use the regular file block to READ from an external file of the app itself.
There is a shared folder within bluestacks, in that folder is a txt file that i want to READ in the app.
How do you find that path to put into the app?
Everything i tried says that said directory doesnt exist

what result u got,path should not be /test_text.txt,it must be like
file://storage/emulated/0/test_text.txt?
or storage/emulated/0/test_text.txt


This is what i get, but the path i inserted has changed to this now

... and (for devices with Android ≥ 10) :

grafik

The app does what it needs to do, i just need to be able to read from a more specfic file, then /thisfile
but everytime i try a path that should lead to the shared folder it says that the file couldnt be created, i assume this is because the path is incorrect. When i do just /testfile it works just fine but i cannot find the path to the normal sd card interface for python


the last file you see n this list is the file that the app reads and edits.
I need that file path for python OR i need to be able to read from the shared folder in this menu

Show all relevant blocks.
Your posted blocks will not work. There are several mistakes.

Those are all the blocks i have, can you tell me why it wont work? it just needs to read from a file, delete said file and recreate that file in the same location

  1. To delete or save a file WRITE_EXTERNAL_STORAGE permission is needed, but this is asked after these commands are executed.

  2. Where does the directory and file come from? When and how are they created?

  3. Which Android version?

See also here:

So i need to ask permission when the screen is initialized? the very first thing it does.

The txt file is the file i imported to bluestacks SD storage so i could test it. The file i NEED to use is located in the shared folder of windows and bluestacks and is accesible through both. The file is already there by default and is deleted when i press button 1 and immediately recreated because i need that file empty.

This is the bluestacks version i use, google told me its the same as what android version

Android version 7.1.1, google lied to me

If this folder is actually there, it should work with Companion.
If not, the file component would return this error because it cannot create this folder.

grafik