02-07-2012 03:17 AM
Hello,
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
There is only 3 possibilities RINGER_MODE_NORMAL, RINGER_MODE_SILENT, or RINGER_MODE_VIBRATE so it should not be too complicate to link to blackberry framework.
Kind regards
02-16-2012 10:47 AM
Well, setRingerMode does not work at all.
Sad, my app just got denied because of that..
02-22-2012 06:03 PM
Hello lplsoft,
Please reference the following document which outlines the Android API set which is unsupported.
BlackBerry Runtime for Android apps - API Support
https://bdsc.webapps.blackberry.com/android/apisup
The AudioManager.setRingerMode API is listed within the Unsupport Media APIs section.
02-23-2012 12:34 PM - last edited on 02-23-2012 12:45 PM
Hello jdreher,
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.AUDIO_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.