I'm running a Python script on my phone through QPython. The title pretty much explains the question. I basically need to check if the script is running on an android device. I've tried os.name
, sys.platform
and platform.system()
but those just return various kinds of "Linux" or "Posix", which is not specific enough (as far as I know - maybe I am missing some relevant information here).
I considered trying to import the android
module, and then use the success or failure of this to determine if the OS is Android. I don't really need the android
module though, so this seems a bit excessive.
0 comments:
Post a Comment