AudioManager returns wrong RingerMode
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Domain
- audio-video-rtc, mobile
Research direction
Start with the AudioManager API entry points shown in the report: getSystemService(Context.AUDIO_SERVICE) and getRingerMode(). Reproduce the sound-profile behavior on Android 6 and compare it with Android 9 and 10; done requires establishing whether the differing silent/vibrate value is an app issue or an Android platform behavior, since no repository file or test is named.
Written by the indexing model from the issue text.
Description
Android OS : 6.0
Device : Moto-G 2nd Gen
While using the AudioManager API to get the Phone ringer mode, the value return only for the mute/sleep is wrong, it returns the RINGER_MODE_VIBRATE instead of RINGER_MODE_SILENT on Android 6, where as the values returned correctly on Android 9 and 10.
Code is:
AudioManager am = (AudioManager)getSystemService(Context.AUDIO_SERVICE);
switch (am.getRingerMode()) {
case AudioManager.RINGER_MODE_SILENT:
Log.i("MyApp","Silent mode");
break;
case AudioManager.RINGER_MODE_VIBRATE:
Log.i("MyApp","Vibrate mode");
break;
case AudioManager.RINGER_MODE_NORMAL:
Log.i("MyApp","Normal mode");
break;}
Ringer mode are set through phone sound/mute/vibrate profiles.
How to get correct value for silent mode?
- Dominant language
- Kotlin
- Stars
- 1.4k
- Forks
- 777
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from android/media-samples
-
Difficulty 5/5 Over a week Newbie friendliness 10/100
android/media-samples#117 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
android/media-samples#116 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 15/100
android/media-samples#112 ·
-
بانلبرلبتOpen
Difficulty 5/5 Over a week Newbie friendliness 1/100
android/media-samples#111 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
android/media-samples#97 · 3 comments · 2 reactions ·
All issues in android/media-samples
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
MetrolistGroup/Metrolist#5426 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
🐛 Type:Bug 📥 State:Awaiting Assignment 🚨 Priority: P0 - Critical
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
micronizationlab/glafira-ai-hub#785 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sorsama/deepseek-harness-mobile#154 ·
Maintainers usually reply within 1 day
-
0. Needs triage enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day