I'm making an app of auto-changing wallpaper.
Now, I want to add a function that changes wallpaper by double tapping the home screen.
I did some searches, but only found information about implementing double tap on app screen, not device's home screen.
Can someone tell me how to get listener of double tap event on device's home screen? Or at least how to get listener of just tap on device's home screen?
Asked
Active
Viewed 500 times
0

Ddophi
- 1
- 1
-
Write your own home screen. – CommonsWare Nov 14 '20 at 14:59
1 Answers
0
Your wallpaper is your app screen, you can handle touch events on its SurfaceView
like you do with any View
. Here's an answer about it:
How to implement double tap for surface view in android
Just bear in mind that if you're using a GlSurfaceView
it runs on its own thread, so you need to handle events like this. And the launcher app sits on top of your wallpaper, so you can only handle touch events it allows through.

cactustictacs
- 17,935
- 2
- 14
- 25