QPython3 on Android read and write txt file - android

I am writing a little python textbased game on my android phone with qpython3.
Now I want to store the highscores in a txt file but I can't find out how I can realize this. I know how I can do it on windows but it doesn't work on android.
Hope anyone has an idea.
Krowit

After testing on my device, it appears that QPython has blocked write permissions from the application. Here's a way of getting a version which allows for it*:
Download SL4A, and install it. This is what launches the Python script.
Download PY4A, this is the Android version of Python. You can download both 2.x and 3.x from here.
You'll need a text editor now. DroidEdit is my personal favourite, and you can launch a script straight from the app.
Then you can write in your code, save it, and run it!
Of course, there's no real substitute for a real desktop, at least in my opinion, but this is (again, in my opinion) the best setup I've found so far.
*I don't know where the files are saved, but you can read and write from them, wherever the saved file's directory may be.

Related

Where is the .exe in flutter?

I am new to programming my own apps, since I used to work on old programs on the pc. Is there a file like the .exe in my old programs? Little backround information: I need to execute the app on a phone without a physical connection and without the typical appstores. In my imagination I can store something like the release file online and my users can download it?
Thanks for teaching me.
Hello and welcome to the community! On Android, the file you are looking for is called an APK, you can take that file and install it on other devices easily. For iOS it's a bit more complicated and you can't share the IPA files and install them as for android, you are confined to using a physical device or sending it over using testflight, which is provided by Apple for testers.
You can find those APK files inside your project's folder in the following path:
build/app/outputs/flutter-apk

Android APK using external data

Hi i am looking into an android development , as we all know when we build the project it makes an APK that is the whole program. but is it possible to make a an android project / APK that would be able to use external files to include more info into the project.
like say for example i have a list commands or functions in my list , but i dont want it to be added into my APK build , is it possible to use it externally?
i was curious because something like COC and other games after downloading it , then downloads extra data from the net , more into updates for the whole game.
how is this possible or is it possible to do , and use functions or source codes externally and not include it into the APK , and also the proper usage of it
Any Android App can connect to the Internet and save downloaded data files to use as they need, without requiring to include them inside the APK. Indeed, for many games (and other Apps having large data sets), it's a sensible option.
There are a couple of things to be aware of:
Android restricts where (on the filesystem) you can save files. And no matter where you save the files, the user can delete them at any
time. Your App should be able to cope with this.
The files should only ever be data files - not executable code. Attempting to
execute downloaded files is likely to put your users at risk
(depending on the permissions your App was installed with) and is also likely to get your App marked as malware.
You should read the Android documentation on Data Storage to learn a bit more about it.

How to put file from android app to pc in LAN network

I have a little problem with my android app. I'm developing an android app that should read .txt file from PC, and path is "E:/Sharing/hello.txt". I already shared that folder on PC. How can I get that file and read it on my android app. Is there any solution, or someone have example how to do that?
It can do in many ways here:
You need to write 2 app, one in android [as client], another on in desktop [as server]
this way, you need to connect your android to server app, and let server app handle all about find files and transfer to your android app
Easier way, you just need to use some Data's storage service, such as Google Drive, Dropbox, Microsoft OneDrive, etc.
to let them auto sync all your file and put it in their site, then, you just need to (install their app in your android or) download your file directly from their site.
Easiest way, from your desktop, just send file to your android's register email. after that just download it from Google Gmail
I suggested, 2 and 3 (even if it doesn't relate to programming) because it is easier than 1 alot, and many
people also accepted to used it in real-life

Android app, want to write a text file accessible to Eclipse

I need to write a text file from my app, when running within or under Eclipse, which
I can then access with a text editor on the development system (windows 7) so I can print it out.
Initially I was hoping to write a file into the RAW directory, because that is directly
accessible inside Eclipse, but I have read that is not possible. I would like to do
something like that though. Run my app, use eclipse to view the written file.
Is there a readily available way to do this,
thank you

Can't find eReader_android_1.0.39.apk file to install to emulator

Looking to replace a ZIRE31 Palm device I need a PalmReader equivalent for Android. Not having a new device yet (although thinking about the Archos43 model) I am running developer.android.com's SDK which has an emulator in it. Using the emulator I would like to try out ereader.com's application called "eReader_android_1.0.39.apk" from their site. But the download link they supply is actually a ZIP file with lots of little files. I need the simpler APK file to install with the 'adb' command. Does anyone know where I can find it?
I bought a SmartQ V5-II ($130 + $30 shipping from ALLPMP) in early December. It has Linux and Android OS's on it. I have concentrated my development on the Linux OS and have no need to try out the eReader_android_1.0.39.apk application anymore. Under Linux I found the V5-II has the FBReader application which supports the reading of e-books in the EPUB format as well as many others. I have learned enough about EPUB format to convert the text file I wish to read on my V5-II into EPUB. Problem solved!

Categories

Resources