02-07-2012 03:17 AM
My android app is using the function AudioManager.setRingerMode to set the phone/tablet to silent
The app basicly set the tablet to silent everynight (with AlarmManager) to prevent being disturbing by email or any sound. Every morning the app enables sound.
It seems like this function is not working with the playbook simulator.
Can you take a look ? http://developer.android.com/reference/android/med
02-22-2012 06:03 PM
Please reference the following document which outlines the Android API set which is unsupported.
BlackBerry Runtime for Android apps - API Support
The AudioManager.setRingerMode API is listed within the Unsupport Media APIs section.
02-23-2012 12:34 PM - edited 02-23-2012 12:45 PM
Thanks for your answer.
I am now using the function setStreamVolume of AudioManager which is not listed as incompatible.
Here is a sample of code:
AudioManager am = (AudioManager)context.getSystemService(Context.AUD
IO_SERVICE); am.setStreamVolume(AudioManager.STREAM_MUSIC, 0, AudioManager.FLAG_SHOW_UI);
If I test it in the simulator, the internal sound bar of android is showing inside my application (since I use "FLAG_SHOW_UI"). But if I go in the preference of the playbook simulator, "Master Sound" and "Audio Notification" does not change.
(I also tried it with STREAM_SYSTEM and STREAM_NOTIFICATION)
Is it a bug of the simulator? I don't have a playbook so I only can test it in the simulator.