Coder Social home page Coder Social logo

Comments (5)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
Same on Click (HTC Tattoo), only tested the battery status.

Original comment by [email protected] on 2 Jun 2011 at 10:10

from python-for-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
Try monitoring your battery prior to getting it's stats:

In [63]: droid.batteryStartMonitoring()
Out[63]: Result(id=2224, result=100, error=None)

In [64]: droid.batteryGetLevel()
Out[64]: Result(id=2225, result=100, error=None)

In [65]: droid.batteryGetLevel()
Out[65]: Result(id=2226, result=None, error=None)

In [66]: droid.batteryGetLevel()
Out[66]: Result(id=2227, result=100, error=None)

In [67]: droid.readBatteryData()
Out[67]: Result(id=2228, result=100, error=None)

In [68]: droid.readBatteryData()
Out[68]: Result(id=2229, result=100, error=None)

In [69]: droid.batteryStopMonitoring()
Out[69]: Result(id=2230, result={u'status': 2, u'temperature': 270, u'level': 
100, u'battery_present': True, u'plugged': 2, u'health': 2, u'voltage': 4200, 
u'technology': u'Li-poly'}, error=None)


Original comment by [email protected] on 29 Jun 2011 at 10:21

from python-for-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
In this case the monitoring does not work like above:

>>> droid.batteryStartMonitoring()
Result(id=0, result=None, error=None)
>>> droid.batteryGetLevel()
Result(id=1, result=100, error=None)
>>> droid.batteryStopMonitoring()
Result(id=5, result=None, error=None)

Original comment by [email protected] on 29 Jun 2011 at 10:45

from python-for-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
Try to do this:

import android
droid = android.Android()

print droid.sensorsReadAccelerometer()


It returns:
java.lang.NullPointerException
Result(id=1, result=None, error=u'java.lang.NullPointerException')

___

HTC WildFire

Original comment by [email protected] on 9 Jul 2011 at 2:54

from python-for-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
This is an sl4a issue.
See http://code.google.com/p/android-scripting/


Original comment by rjmatthews62 on 3 Apr 2012 at 2:16

  • Changed state: WontFix

from python-for-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.