Howto launch application on HW button hold ?

Put your problem here if it does not fit any of the other categories.

Howto launch application on HW button hold ?

Postby miki » Mon Nov 08, 2010 3:58 pm

Hi,
I like to start my aplication when user holds hw button (green phone button) for few seconds.

Any ideas how to do it ?

Thanks for answer.
miki
miki
Once Poster
Once Poster
 
Posts: 1
Joined: Mon Nov 08, 2010 3:40 pm

Top

Re: Howto launch application on HW button hold ?

Postby Schermvlieger » Mon Nov 08, 2010 7:09 pm

Long-pressing this button causes the Android system to raise the following Intent:

act=android.intent.action.VOICE_COMMAND flg=0x10000000

So you want to put this intent into your Manifest and let the user choose your application as the default to handle this event.
Schermvlieger
Senior Developer
Senior Developer
 
Posts: 159
Joined: Fri Feb 26, 2010 1:37 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Google Feedfetcher and 10 guests