OK, I'm getting annoyed with it not being able to do something so simple. It seems like there's been so many requests with this and yet nothing has been done. First, does anybody have the source code for 3.5? I see the source for 2.4 up, but nothing for 3.x This makes things a little more complicated.
Second, it looks like the Waze team borrowed most of it's code from "Roadmap". Since this has been requested for ages and has yet been implemented, it makes me wonder how much coding experience the Waze team. In any case, my plan is to make a patch available that does this. Android documentation is here...
http://developer.android.com/training/m ... focus.htmlThe code in particular is...
- Code: Select all
// Request audio focus for playback
int result = am.requestAudioFocus(afChangeListener,
// Use the music stream.
AudioManager.STREAM_MUSIC,
// Request permanent focus.
AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK);
if (result == AudioManager.AUDIOFOCUS_REQUEST_GRANTED) {
// Start playback.
}
Now, I think one would have to add it to the "FreeMapNativeSoundManager.java" file, but not 100% sure yet. I don't have a whole lot of time today, but I hope to tackle this sometime next week. I may contact the Roadmap folks and see if they have a solution. I'd hate to reinvent the wheel when something else already exists...