ALL ABOUT BATTERY INFO (MIT AppInventor 2)

1,176 views
Skip to first unread message

Иса Ахматов

unread,
Jun 18, 2016, 4:30:52 PM6/18/16
to MIT App Inventor Forum

Shows information about the battery status...


1) 


2) 


3) 


4) 




BatteryInfo.aia

Иса Ахматов

unread,
Jun 18, 2016, 4:50:24 PM6/18/16
to mitappinv...@googlegroups.com
Help me...!!! In As ActivityStarter (App inventor 2) to show the battery level as an integer percentage of the total capacity in ...?


DDTnet

unread,
Jun 19, 2016, 3:02:01 AM6/19/16
to MIT App Inventor Forum
Does anyone know how to do it? Help me! I did not understand. Here's the link (additional manual): http://beta.appinventor.mit.edu/learn/reference/other/activitystarter.html

DDTnet

unread,
Jun 19, 2016, 3:41:15 PM6/19/16
to MIT App Inventor Forum
Super! I found the solution! How clever of me! Friends, here is the solution. No need to thank me. Not worth applause. :)))

1) 


2) 


BatteryInfo_2.aia

ScottFerguson

unread,
Jun 19, 2016, 6:43:46 PM6/19/16
to MIT App Inventor Forum
I tried a few different things but with no success.
I don't know how you found the solution, but I congratulate and applaude you.
Great job!

Taifun

unread,
Jun 19, 2016, 6:51:11 PM6/19/16
to MIT App Inventor Forum
that solution uses an external app, see here https://play.google.com/store/apps/details?id=com.papatita.batterylib
without that external app, this solution will not work

the better solution would be to create an extension to get the battery information
more information about how to create an extension see here https://groups.google.com/d/msg/mitappinventortest/Ip2AX036d0U/5NJlAEbFCgAJ
however that will be more advanced and will require some Java skills...

Taifun

Trying to push the limits of App Inventor! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun. 


DDTnet

unread,
Jun 20, 2016, 3:08:34 PM6/20/16
to mitappinv...@googlegroups.com
 ScottFerguson

I think that Taifun is right, because when I removed the external app "Battery Lib"... My app caused an error 601... So that even before I applause. :(
But, I'll find a solution... I will deserve the applause... :) So leave this topic open, it is not complete...

Taifun

Thank you very much for the help... It's an interesting idea... I Hope for Your help in the future when creating extensions for App Inventor 2...

Taifun

unread,
Jun 20, 2016, 5:48:09 PM6/20/16
to MIT App Inventor Forum
I meanwhile created a Battery Manager extension, for more information see here https://puravidaapps.com/battery.php. Enjoy!
Taifun


DDTnet

unread,
Jun 21, 2016, 7:16:58 AM6/21/16
to mitappinv...@googlegroups.com
 Taifun, thank You very much! You are a good and kind person. As a Chechen, I sincerely thank You.

Shamanth K S

unread,
Nov 22, 2019, 10:56:30 PM11/22/19
to MIT App Inventor Forum
Hi. I wanted the battery percentage to be sent to Arduino via bluetooth. Can you please help me with the blocks?

SteveJG

unread,
Nov 23, 2019, 8:00:18 AM11/23/19
to MIT App Inventor Forum
@ Shamanth

Assuming you already know how to communicate with your arduino, just send the arduino the   level   from Taifun's extension to it as text.

If you do not know how to communicate, see the Forum discussions about  arduino and bluetooth  https://groups.google.com/forum/#!searchin/mitappinventortest/send$20text$20to$20arduino%7Csort:date    ; perhaps this specific Forum discussion might get you started https://groups.google.com/forum/#!searchin/mitappinventortest/send$20text$20to$20arduino%7Csort:date/mitappinventortest/P-_TVzj7KSc/DifLpkyFBAAJ
Reply all
Reply to author
Forward
0 new messages