1
purist
4y

Any way to run some python code in android without losing my mind !? It is just a code which queries a simple api once a minute and logs it into a sqlite db. I want to use my phone as a substitute for a server instance, cos i dont have the monies to buy one..😬.. SL4A aint working.. P4A webview isnt working for some reason.

Comments
  • 2
    At least you can install a python package with termux
  • 0
    @electrineer does it keep running in the background !?
  • 2
    @purist yes, you can acquire a wakelock for it
  • 0
    @electrineer whoo.. nice let me try that..
  • 0
    @electrineer You are awesome. It is absolutely mindblowing that you can run a linux box inside a android phone.. wow.. also ubuntu.. cant even fathom how..
  • 0
    @electrineer The fact that i can install jupyter notebook in it.. and access it in my computer.. is for some reason absolutely hilarious to me..
  • 0
    If it's just going to be a server, perhaps you could just install Linux?
  • 0
    @ScriptCoded i am already on linux. But i just dont wanna keep my laptop on throughout the night and day for this small thing.
  • 2
    It might be a good idea to limit charging level to somewhere around 50% because the battery may start bulging soon if its always sitting in charger at 100% and heats up. I'm not sure if there are ways to do that without root, but you can get Advanced Charging Control as a Magisk extension.
  • 0
    @purist I'm talking about the phone
  • 0
    @ScriptCoded lol. Install linux and lose the ability to do anything i normally do with my phone ? Also.. i couldnt even install lineage os in this.. which is supposed to be straightforward.

    And anyway.. i just wanna do something very small.. and that too just for fun. I definitely dont want to migrate mobile OS for this thing.
  • 0
    @electrineer compute wise what i am doing is pretty much nothing. It waits for a minute queries an api.. and reads some 1000 character worth of reply.. and updates the db and sleeps. So it shouldnt take much charge. But i get that i cant run it through the night regardless.. have to think of a workaround. Or just drop the idea of running it throughout the night.
  • 0
    @purist I don't think it's a problem otherwise, but the battery will last much longer if you limit its charge to a low level.
  • 0
    @electrineer Are you a fan of mrwhosetheboss ? I came to know about the stuff you are mentioning from that. But have no idea how to do that..
Add Comment