Android Question Library similar to SendInput

Elyza

Member
Hi, I'm looking for an identical library like SendInput - Emulate user input within your app which is able to simulate a tap in a range of coordinates but unfortunately after i updated to android 13 is not working anymore. I can't find anything similar on the forum Accessibility Services (assisting users with disabilities, automation etc) a part, but there is no example to simulate a user tap.

Is there anything else? thanks
I like to use something similar. Maybe i have an answer:

adb shell input tap x y

With this command You can simulate tap with adb manager, maybe wey can use this with cmd Shell.
 
Upvote 0

Elyza

Member
I like to use something similar. Maybe i have an answer:

adb shell input tap x y

With this command You can simulate tap with adb manager, maybe wey can use this with cmd Shell.
Sub SimularTap(x As Int, y As Int)
Dim shell As Shell
shell.Initialize("shell")

' Prepara el comando para simular el tap
Dim comando As String
comando = $"input tap ${x} ${y}"$

' Ejecuta el comando
shell.Exec(comando, Null, 0)
End Sub

' Evento de respuesta del Shell
Sub shell_Result(Success As Boolean, Result As String)
If Success Then
Log("Comando ejecutado correctamente")
Else
Log("Error al ejecutar el comando: " & Result)
End If
End Sub

' Llama a SimularTap con las coordenadas deseadas
Sub Activity_Create(FirstTime As Boolean)
SimularTap(100, 200) ' Cambia las coordenadas según
tus necesidades
End Sub
 
Upvote 0
Top