pilot51 / voicenotify

Android app that speaks notifications
https://voicenotify.app
Apache License 2.0
152 stars 54 forks source link

Changing headset detection method #20

Closed pugwonk closed 10 years ago

pugwonk commented 10 years ago

Now using AudioManager's methods to detect presence of headset - isBluetoothA2dpOn() and isWiredHeadsetOn(). These are marked as deprecated in the Android API documents, but is suggested for use by Google's own docs (http://developer.android.com/training/managing-audio/audio-output.html).

Manifest modified to increase the Android version required from 4 to 5, and add the permission MODIFY_AUDIO_SETTINGS which is apparently required for isWiredHeadsetOn() to work.

I also added a .gitignore for Android.

pilot51 commented 10 years ago

Thank you! I'll test it out through to this weekend and if it checks out, I'll merge it in.

pugwonk commented 10 years ago

Replacing this with a nicer pull request.