Page 1 of 1
[solved] Is it possible to import and show the battery percentage of your phone?
Posted: Fri Oct 05, 2018 5:19 pm
by Nanahs
There's a real time clock on my game (for mobile).
I was wondering if I could also import and show the phone's charge percentage like that (the 49%):
So that the person can be aware of the status.
I'm not sure if Renpy can do that.
Thanks
Re: Is it possible to import and show the battery percentage of your phone?
Posted: Sun Oct 07, 2018 2:28 pm
by PyTom
You can get it using:
Code: Select all
pygame_sdl2.power.get_power_info().percent
Re: Is it possible to import and show the battery percentage of your phone?
Posted: Mon Oct 08, 2018 10:21 am
by Nanahs
PyTom wrote: ↑Sun Oct 07, 2018 2:28 pm
You can get it using:
Code: Select all
pygame_sdl2.power.get_power_info().percent
Thank you so much! I couldn't make it work (cause I'm still learning what those things mean and how to place them hah). But thank you anyway. I'll study more
Re: Is it possible to import and show the battery percentage of your phone?
Posted: Thu Nov 08, 2018 4:12 am
by Imperf3kt
Re: Is it possible to import and show the battery percentage of your phone?
Posted: Thu Nov 08, 2018 5:44 pm
by Nanahs
Oh! Thank you so much! This is exactly what I was looking for. Thanks for sharing