Get a sneak peek at whats next for Permanent Hazards on our April 7th Office Hours!
These forums are specific to the Waze mobile app. Post here if you experienced a problem while using the app, have a question about the app functionality or a feature such as navigation or search.

Post Reply
Forum rules
Waze App Useful Resources

Android Waze Notifications

Post 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!
mwiz881
Posts: 13

POSTER_ID:4713217

1

Send a message

Post 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.
AndyPoms
EmeritusChamps
EmeritusChamps
Posts: 7223
Has thanked: 65 times
Been thanked: 990 times
Send a message
https://www.waze.com/wiki/images/f/ff/W ... 00k_6c.png
Waze Champ & Forum Moderator
USA Country Manager
Senior Area Manager: State of Connecticut
Wiki: Editing | Best Practices | FAQ

Post 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...
mwiz881
Posts: 13
Send a message

Post 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 ;)
pvaladares
Map Editor - Level 5
Map Editor - Level 5
Posts: 957
Has thanked: 74 times
Been thanked: 159 times
Send a message