Android Question How to get remaining time of battery in basic4android

Ramezanpour2

Member
Licensed User
Longtime User
I'm create an app to optimize battery and battery saver but have 2 problems

1.How to get remaining time of battery in basic4android

2.How to close app that running in background andget number of thisin basic4android
 

JTmartins

Active Member
Licensed User
Longtime User
You can't "guess" the remaining battery time, as that depends on the user activity.

A simple action from the user as increasing or decreasing screen bright or turning on or off WI-FI or data connection or even making a few calls, will be enough to increase or decrease the amount of remaining time.

You can extrapolate and try to guess, after analising for a few minuts of device operation, but will never be precise, or even close to that, unless the user leaves the phone still and does not touch it.
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
no dear i want a code for close the applications that running in backgruond
you haven't idea for calculate remaining tim of battery ????

We don't give away code, we try to help you to get YOUR CODE working.
READ the begginers guide, do some (re)search on the forum about your questions, TRY to get it working by yourself, and then, only then, if you can't get it working, ask for help WITH YOUR CODE.
Also, this is a community forum, apart from very specific B4A inner aspects questions, you should not direct your question to a single user!
 
Upvote 0
Top