Page 1 of 1

Android Waze Notifications

Posted: Fri Nov 09, 2012 6:31 pm
by mwiz881
Hi!

I'm using Waze while Doggcatcher is playing in the background. Doggcatcher has the ability to utilize the API to pause the playback during notification sounds. I know this works because Google Maps/Navigation works fine with this.

When using Waze, it seems like it doesn't do this, and just plays "on top of" the playing podcast. Is there a way to make Waze use "Notifications" so that Doggcatcher can pause the playback? Here's the URL for Doggcatcher that talks about this...

http://www.doggcatcher.com/node/2579

Thanks!

Re: Android Waze Notifications

Posted: Sun Nov 11, 2012 11:36 pm
by AndyPoms
mwiz881 wrote: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.
Waze stopped being Open Source with the release of version 3.

Re: Android Waze Notifications

Posted: Sat Nov 10, 2012 3:58 pm
by mwiz881
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.html

The 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...

Re: Android Waze Notifications

Posted: Sun Nov 11, 2012 11:23 pm
by pvaladares
mwiz881 wrote: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
Android APK file is just like a ZIP file ;)