-3

I am making an application for automating certain things, for example while having a 3rd party app open, my application, running in the background, would simulate a click on the screen, at given coordinates, which would look like a regular screen tap to the 3rd party app.

But I am stuck on the actual screen tap simulation, how can I achieve it with Xamarin for Android?

The app will have root privileges.

Thank you.

Askerman
  • 787
  • 1
  • 12
  • 31
  • This is a duplicate: https://stackoverflow.com/questions/14928197/how-to-simulate-touch-from-background-service-with-sendevent-or-other-way – Gusman Jun 13 '17 at 14:08

2 Answers2

0

I'm gonna make this as simple as possible. Also, this will be a good start for where you wanna start.

1- Your app must have root access.

2- Create an Activity with a service to sniff or clicks.

3- Recorde click points in an ArrayList, and reflect them back by feeding the touch event in android.

At the end, you shouldn't ask this kind of questions.

MohammedAlSafwan
  • 872
  • 1
  • 8
  • 25
  • 3
    Please explain what is wrong with his question - as I newish user he may not realise what is wrong and why he's receiving downvotes. – Sk93 Jun 13 '17 at 08:35
  • @Sk93 According to my thinking he haven't shared his effort, code, link or tutorial he followed etc. – Jawad Zeb Jun 14 '17 at 19:39
0

You can also Do this without root access. Sorry for the code because I don't have xamrin experience. however you can implement accessibility service to simulate button,textview...... clicks. you can check Grenify application for the example. Greenify app opens app info programitically and clicks on force close button programitically. even without root access Here is the application link. https://play.google.com/store/apps/details?id=com.oasisfeng.greenify&hl=en

Note: I have also read several posts which tell that it is not possible but I don't belive after using Greenify applicaction.

My Own Research about accessibility services (To monitor whatsapp messages for parental spy application project): using accessibility service I have monitored WhatsApp messages from thier textView.getText() function call. I can share My Android code for Help If needed. Thanks, Jawad Zeb

Jawad Zeb
  • 523
  • 4
  • 18