Overriding Home button for a Car Home replacement app

Posted by BigFwoosh on Stack Overflow See other posts from Stack Overflow or by BigFwoosh
Published on 2010-05-19T03:21:09Z Indexed on 2010/05/19 15:00 UTC
Read the original article Hit count: 308

Filed under:
|
|

I have been working on a replacement for the stock Car Home app for a bit, and I am completely stumped on how to override the Home button so that my app will be brought back to the foreground whenever the phone is docked. This is the way that Car Home works, so there must be a way.

It seems that BroadcastReceivers won't work, because the intent that is broadcast whenever the Home button is pressed will still cause the default homescreen app to launch; I cannot prevent it. I can override the Home button from within my app, but that does me no good since this needs to work when the user is outside my app. Car Home also does not do anything weird like set itself as the default homescreen app while it's running (I checked the logcat to make sure).

I've been really beating my head against the wall on this. Does anyone have any ideas, or can you at least point me in the right direction?

© Stack Overflow or respective owner

Related posts about android

Related posts about dock