question

Mattias Pettersson avatar image
Mattias Pettersson asked

Referring to testing with Pandora

Hi guys,

We are desperately trying to fix an issue with our app that seems to have an issue with: "App makes use of the Media Buttons but fails to prevent other applications in the background from using them as well, resulting in conflicting inputs"

The process then explains that we should install Pandora along side our app to test it. Now, I'd love to. Only it's not available outside of USA, Australia or New Zealand and unfortunately we are not in any of those countries.

To be able to reproduce a problem is kind of a good thing to be able to do to be able to fix an issue. We are trying hard and re-submitting on a daily basis more or less and nothing we do works - but then again, we can't actually test it.

So is there any other APP that could emulate the same problem as Pandora has. We've tried Rdio and a few others and the problem isn't reproducible.

Please advise. (or give me a sideloadable Pandora for FireTV so we can actually test it)

fire tvsubmission testing distribution
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Jon R. Helms avatar image
Jon R. Helms answered

I had the same problem, do you have iHeartRadio or any other streaming music app? You just need an app that continues to play music after hitting the home button on the remote, then when you go into your app it will continue to play music.

To gain audio focus:

int result = audioManager.requestAudioFocus(afChangeListener, AudioManager.STREAM_MUSIC, AudioManager.AUDIOFOCUS_GAIN);
		   
if (result == AudioManager.AUDIOFOCUS_REQUEST_GRANTED) {
    audioManager.registerMediaButtonEventReceiver(new ComponentName(getPackageName(), Watch.class.getName())); 
}

You have some other audio stuff you probably should look into, but with this code you should be able to track down some fairly complete samples of how to manage all the audio. Be sure that your app also releases audio focus (gets quieter) when the audio search is used or they will fail it for that too.

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.