I am using kivy to create an android app. However some important pieces of code are based on the python os module. Now since the os is supposed to be system-dependant, i was wondering if it would work on a mobile device running android. If it doesn't work is there some other way to achieve the same results?
Also, the app needs to save and retrieve data based on the user's actions. Currently, i am reading and writing to plain .txt files to achieve that, but will it work on an android device? Is there a more flexible alternative?
Yes, It'll work. os works on windows, linux and mac and android is well.. linux. If python runs on it, os will too.
For simple storing you can use os.path.dirname(os.path.abspath(__file__)) and it'll store data in your data/<app>/ or data/data/<app>/ on android, so common user will not access it. Of course if your app is built that way. It's nice to make yourself a folder for such files, because it can become messy when you use too much files.
If it's built the way it will use sdcard, it'll place data to your sdcard/<app>/ if I remember correctly.
Will python os module work on android?