1

I do NOT want this to be a camera detection program. This is a program that will detect the passing of a color on the screen in an application.

What I want to do is detect when the color black, bigger than a 5x5 px, passes through a defined area of space on the screen. I thought about using one big area to stretch the entire width, but I think that might be improbable. So I figure that I will have to do it between 4 individual areas and detect which one is getting the passing of a black color.

I have been very unlucky in finding what I need in Google. So if anyone has any pointers to a good example, tutorial, or has done something like this and can show me the way, I will be greatly appreciative.

If I need to add something to this request, comment what I need to add.

Edit: see the second comment (mine) for more clarification.

CodeMonkey
  • 1,136
  • 16
  • 31
  • I must apologize, I gave you the wrong impression. The app I am making is being designed to "cheat" as you could call it, at the game 'Don't Touch the White Tile'. Basically I am running a service to display objects to interact with to get the program going. The program is to detect the color black, the tiles to press, and simulate the touch event. The program is mearly a learning experience that I hope to share with others to learn from. – CodeMonkey May 24 '14 at 05:08
  • 1
    Actually it was my fault, I didn't read through your entire project description. – Stephan Branczyk May 24 '14 at 19:50

1 Answers1

1

You've picked a very difficult problem for yourself.

If I were you, I'd try using a translucent activity, and I'd forward the touches to the underlying activity. See this other question on StackOverflow which only solves a small part of your problem: How can I interact with elements behind a translucent Android app?. I believe that's what is being used for this application (although, that's just a guess on my part).

Then, I suppose I'd try taking a screenshot of my activity programmatically, to see if it successfully captured the image of the underlying application/activity. Once you can do it for one, I suppose you could capture a new screenshot each second, or each half a second.

(I'm running low on battery, I'll be back later...)

Community
  • 1
  • 1
Stephan Branczyk
  • 9,363
  • 2
  • 33
  • 49
  • I'll have to build and verify a workable test program where i can get this to my required needs for running this over other apps and such. If i get that to work, i'll mark as the answer. – CodeMonkey May 30 '14 at 16:48