Frage

I'm quite new to Android programming and was wondering is there any way to make an app, that would make the device automatically cycle trough the pages of the Home screen? If it is possible, could someone point me in the right direction here? I simply don't know where to start.

Also, if it is not possible/is really difficult to do, maybe there are some other methods you could achieve this?

War es hilfreich?

Lösung

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.
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top