ringgono / python-for-android

Automatically exported from code.google.com/p/python-for-android
Apache License 2.0
0 stars 0 forks source link

toggleVibrateMode() Broke Vibration on Phone and Doesn't Work #36

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I was trying droid.toggleVibrateMode(enabled, ringer) in the Python 
interpreter to get the hang of it before using it in a script.
2. I tried pretty every combination of True, False, and nothing for each 
argument.
3. I was also trying droid.toggleRingerSilentMode() at the same time, so that 
may or may not be relevant. I also tried all of the possible argument 
combinations for it.

What is the expected output? What do you see instead?
I expected vibrate mode to be turned on or off. Instead, nothing seemed to 
happen, but now when I get texts or other notifications, my phone doesn't 
vibrate. It is still capable of vibrating, because droid.vibrate() works.

What version of the product are you using? On what operating system?
I'm using SL4A r4 with Py4A r16 on Android 2.2 Froyo. My phone is a Samsung 
Vibrant (SGH-T959) with Samsung's OEM build UVKB5.

Please provide any additional information below.
The Android Dev reference for the method used in Py4A, 
AudioManager.setVibrateSetting(), says "This method should only be used by 
applications that replace the platform-wide management of audio settings or the 
main telephony application." Since Py4A and SL4A don't replace any part of the 
Android system, I'm wondering if this is what caused the problem on my phone.

Py4A source link (the method is in line 127):
http://www.google.com/codesearch#Jc73qKqsrJY/android/Common/src/com/googlecode/a
ndroid_scripting/facade/SettingsFacade.java&q=togglevibratemode%20package:http:/
/python-for-android%5C.googlecode%5C.com&l=127

Android Developer's Reference link:
http://developer.android.com/reference/android/media/AudioManager.html#setVibrat
eSetting(int, int)

Original issue reported on code.google.com by armadaje...@gmail.com on 9 Dec 2011 at 4:51

GoogleCodeExporter commented 8 years ago
This is an sl4a issue.
See: http://code.google.com/p/android-scripting/

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