0

I want to scroll any app that's ope when a user hits a particular overlay button that will lie on the top of the screen. I can't figure out how I could scroll any given screen programatically. Is that possible? If yes, how do I go about doing it?

  • Needs more information. What do you mean by "screen". Most (if not all) scrollable Views in Android can be programmatically scrolled. So it really depends on what you mean. – Knossos Apr 23 '15 at 13:26
  • For example, can I scroll a facebook feed using the buttons I provide on the top of the screen as an overlay? –  Apr 23 '15 at 13:29

2 Answers2

3

This is not possible with standard Android-API.


Furthermore if this was possible, any app (your's for example) could modify the state of any other app. Thats a high grade security risk. You could easily trap passwords or user information this way from other apps and this should not be possible at all.

There might be a chance using root privileges. You could for example send fake user inputs to scroll in another app, or even modify it's memory region and call the correct Java functions on it.

But to be honest, there is no real chance.

bricklore
  • 4,125
  • 1
  • 34
  • 62
0

You can try to make a fake fling event which usually instantiates scroll. You can find some info how to do that in this question.

Community
  • 1
  • 1
Victoria
  • 198
  • 1
  • 12