문제

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?

도움이 되었습니까?

해결책

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.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top