What device(s) are you experiencing the problem on?
HTC Desire A8183
What firmware version are you running on the device?
2.1-update1
What steps will reproduce the problem?
1. Create a Python script in Sl4Ar2 using python_for_android_r1.apk
2. Create and run the following script:
import android
import time
droid = android.Android()
print droid.pulseGeneratorIsPlaying()
droid.pulseGeneratorRun()
droid.pulseGeneratorSetHz(200)
droid.pulseGeneratorSetHzPercent(50)
time.sleep(2)
droid.pulseGeneratorStop()
What is the expected output? What do you see instead?
I am not 100% sure of the API, but I would expect that
droid.pulseGeneratorIsPlaying() would return False, and the rest would result
in noise being generated at 200Hz for 2 seconds.
What actually happens is that the calls to the pulseGenerator* methods return
the following errors:
print droid.pulseGeneratorIsPlaying()
java.lang.NullPonterException
Result(id=1, result=None, error=u'java.lang.NullPonterException')
droid.pulseGeneratorRun()
java.lang.NullPointerException
droid.pulseGeneratorSetHz(200)
com.googlecode.android_scripting.rpc.RpcError: Unknown RPC
droid.pulseGeneratorSetHzPercent(50)
java.lang.NullPointerException
droid.pulseGeneratorStop()
java.lang.NullPointerException
What version of the product are you using? On what operating system?
sl4a_r2.apk, python_for_android_r1.apk - both from
http://code.google.com/p/android-scripting/downloads/list
The OS is Android 2.1
Please provide any additional information below.
LogCat's output for the final pulseGeneratorStop() is attached
Original issue reported on code.google.com by rwallh...@gmail.com on 8 Oct 2010 at 6:03
Original issue reported on code.google.com by
rwallh...@gmail.com
on 8 Oct 2010 at 6:03Attachments: