Back to Top

stop capturing headset button when app is in background

12 posts / 0 new
Last post
deerain
Offline
Last seen: 12 years 9 months ago
Joined: 06/17/2010 - 09:50
stop capturing headset button when app is in background

Could you make it so when you come out the app it will not start on the headset button, I only want it to happen when the program is running in the foreground as I have made a running app that uses the headset button but this app steals the button press so then I have to start you app up then go into the settings to turn it off and I have a HTC magic and its slow enough as it is :)

eric
Offline
Last seen: 2 years 11 months ago
Joined: 11/06/2008 - 22:02
Android 2.2

That's going to happen when you get the update to 2.2. There are some facilities built into 2.2 that enable devs to do just what are talking about.

theukrainian
Offline
Last seen: 6 years 1 month ago
Joined: 02/04/2010 - 12:21
Maybe an option? :) I

Maybe an option? :) I actually actively want DC to capture buttons *if* it was the last app used. If I used Music last, I want that to keep capturing. Reboots, connect/disconnects should not matter. In the ideal world, and then what the API will actually let you do :)

eric
Offline
Last seen: 2 years 11 months ago
Joined: 11/06/2008 - 22:02
Good idea

I'll give it a shot. I might be tricky to have behavior that is consistent between pre 2.2 devices and 2.2 devices but I'll see what I can do.

jjmartin
Offline
Last seen: 3 years 3 weeks ago
Joined: 12/10/2008 - 12:17
Issues with the button on 2.2 (FRF 72)

I am literally updating my nexus to FRF85B right now, but I wanted to describe some experiences I have been having with the button and DC for the last few days on FRF72.

The button seems to work as expected, but occasionally DC will stop playing (i also think there may be a change in screen too). At this point if I try to hit the button, it will start playing from the music player. I can stop that, start DC playing again and then I think the button will go back to DC. The multiple apps fighting over the button seem like a big wreck. It seems like the OS should just let you pick a default app or at least see the status of it at any given time.

eric
Offline
Last seen: 2 years 11 months ago
Joined: 11/06/2008 - 22:02
2.2

Yep, there are some changes to 2.2 that are causing this. There are also some new api's that we can use to handle it better. I've got an issue for this that should be in the release after next.

http://mantis.snoggdoggler.com/view.php?id=522

amh15
Offline
Last seen: 8 years 7 months ago
Joined: 01/11/2011 - 13:04
not working right on Froyo, Desire

Cycling home today I had Doggcatcher running as well as google maps satnav. These two coexist mostly well. Ran out of podcasts. Switched to HTC music player. It stopped playing every time I was given directions and would not respond to the headset button, even if I disabled headset features in Doggcatcher and told it to edit the app.

HTC music player used to work with the headset... any ideas if Doggcatcher could have broken it?

Thanks

Alan

eric
Offline
Last seen: 2 years 11 months ago
Joined: 11/06/2008 - 22:02
Headset

DC should be passing along the button presses to the other apps. There are other few other apps that for sure do not pass along the button presses. One way to know for sure is to do a DC backup in the DC menu, uninstall DC, then test it out. When you're all done, re-install DC, and do a restore in the DC menu and you'll be back where you started without losing anything.

You are the first person that I have heard of that is using DC with the Desire. Everyone else reported failures with audio not being heard. Have you had any problems like that?

Thanks for posting.

amh15
Offline
Last seen: 8 years 7 months ago
Joined: 01/11/2011 - 13:04
continued

Hi Eric

No problems with audio not being heard. 2 things that might be related...

1. Whenever DC is busy updating feeds, I get audio pauses. I suspect different tasks are competing for access to SD. The SD is class 6. I don't think I used to get this with Listen. I also get these momentary pauses in the music player when DC is updating. Maybe occasional pauses in DC when another app is busy too... not quite so sure about that one.

2. Recently I've had quite a lot of downloads that won't play. When I redownload, often they are fine. This might be bad files in the feed but I suspect DC's failed-download-recovery might play a part, perhaps sometimes creating unplayable files?

Cheers

Alan

eric
Offline
Last seen: 2 years 11 months ago
Joined: 11/06/2008 - 22:02
Probs

1 - I've got the priority on the feed updates set to the absolute minimum and the priority of audio play should be very high, so what's you're saying about the SD could be a possibility.

2 - I'm pretty interested in tracking this down if you are interested but it's a little painful. I'd like to get a copy of the bad file so I can compare it to a good file. The tricky part is finding the media file on the sd card because it will be in a folder that looks like this /sdcard/doggcatcher/episodeenclsoures/[some number]. If you can dig out the bad file and send it to me. Also I'll need the feed so I can get the valid file. A comparison should tell me when the bad one is completely wrong or has some bad sections (which could indicate a resume problem). It's cool if you don't want to go through this though.

Thanks for posting.

amh15
Offline
Last seen: 8 years 7 months ago
Joined: 01/11/2011 - 13:04
sent

Hi Eric. I've emailed you a file. Alan

eric
Offline
Last seen: 2 years 11 months ago
Joined: 11/06/2008 - 22:02
HTTP error

That's exactly what I needed Alan. There are some cases where the server returns an error and DC saves the error page as the media file.

I created an issue for this...it should be resolved quickly.

http://mantis.snoggdoggler.com/view.php?id=837

You're welcome to join the beta if you want to test it out. If so, just let me know and I'll get you set up.

Thanks for posting.