Hi everybody,
I always have my same problem with the detection of the silent mode.
I tried the following mode by basing me on the documentation. But I have always the same result: "Speaker".
Have you an idea? How do you detect the silent mode?
Thank you for your help,
Matthieu
//Function for the test function audioTest(){ var type = Ti.Media.audioLineType; switch(type) { case Ti.Media.AUDIO_HEADSET_INOUT: return "headset"; case Ti.Media.AUDIO_RECEIVER_AND_MIC: return "receiver/mic"; case Ti.Media.AUDIO_HEADPHONES_AND_MIC: return "headphones/mic"; case Ti.Media.AUDIO_HEADPHONES: return "headphones"; case Ti.Media.AUDIO_LINEOUT: return "lineout"; case Ti.Media.AUDIO_SPEAKER: return "speaker"; case Ti.Media.AUDIO_MICROPHONE: return "microphone"; case Ti.Media.AUDIO_MUTED: return "silence switch on"; case Ti.Media.AUDIO_UNAVAILABLE: return "unavailable"; case Ti.Media.AUDIO_UNKNOWN: return "unknown"; } } //Test of the Audio Mode alert(audioTest());
1 Answer
it looks like it's been a bug for quite a while. You should report it on Jira.
Your Answer
Think you can help? Login to answer this question!