Question

I have Samsung Galaxy S2 and here I can double click Home button to run an app (i.e. Voice Talks)

I wonder if it is possible to create an application (broadcast or activity with Intent Filters) which will capture double click on home button?

Was it helpful?

Solution

I am not sure if there is default functionality for capturing double click of home button, but you can try this

  1. Capture home button click
  2. Start a timer on first home button click for a fixed period (say 2 seconds)
  3. Wait for the time period, and listen for next home button click
  4. If second click is observed in given time period, do the double click functionality else stick to default functionality of home button
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top