You have to know that there are tons of different homescreens (aka Launchers) out there, and all have different features. While one might support that e.g. via Intents, others may not.
Here are your options:
- Build your own Launcher
- Simulate user input:
- Root your device
- Direct injection to /dev/input/eventX
- Using InputManager.injectTouchEvent()
- Using WindowManager.injectPointerEvent()
- Create an
AccessibilityService
. Notice that this is not guaranteed to work with all third-party apps.
- Root your device