dya2 / android-scripting

Automatically exported from code.google.com/p/android-scripting
0 stars 0 forks source link

About SL4A API #662

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I run this Program:

import android
droid=android.Android()
name=droid.batteryGetHealth()
print name
print name.result

The results are:

Result(id=1, result=None, error=None)
None

I see batteryGetHealth() from API

Returns the most recently received battery health data:
1 - unknown;
2 - good;
3 - overheat;
4 - dead;
5 - over voltage;
6 - unspecified failure;

Displayed clearly wrong.

Similarly, I changed the name = droid.getPackageName ("com.abc.a") return is on 
top of those results, Which know how this is going?

Original issue reported on code.google.com by pis...@gmail.com on 29 Sep 2012 at 6:04

GoogleCodeExporter commented 9 years ago
Same on sprint galaxy note 2, android 4.1.1, SL4A 6:

In [40]: android.checkScreenOn()
Out[40]: Result(id=35, result=False, error=None) # many calls work

In [41]: android.batteryGetHealth()
Out[41]: Result(id=36, result=None, error=None) # battery ones don't

Original comment by drewpca on 16 Dec 2012 at 7:06