T ThiagoRodrigues Member Licensed User Longtime User Nov 23, 2014 #1 Hello, I would like to know if it is possible to write an app that runs as a service (background) and simulates an input (keypress) in the current application, let´s say that it collects inputs from an external source (bluetooth joystick) and converts into local keypress. Regards,
Hello, I would like to know if it is possible to write an app that runs as a service (background) and simulates an input (keypress) in the current application, let´s say that it collects inputs from an external source (bluetooth joystick) and converts into local keypress. Regards,
DonManfred Expert Licensed User Longtime User Nov 23, 2014 #2 If your device is rooted then you can use this library. you then can use Code: Copy Dim rc As RootCmd If rc.haveRoot Then rc.execRootCmd("input tap 100 200") ' End If ' 'If you need also to simulate the "back" key: ' simulate tap on "back" key rc.execRootCmd("input keyevent KEYCODE_BACK") to simulate a tap or keyinput Upvote 0
If your device is rooted then you can use this library. you then can use Code: Copy Dim rc As RootCmd If rc.haveRoot Then rc.execRootCmd("input tap 100 200") ' End If ' 'If you need also to simulate the "back" key: ' simulate tap on "back" key rc.execRootCmd("input keyevent KEYCODE_BACK") to simulate a tap or keyinput
T ThiagoRodrigues Member Licensed User Longtime User Nov 27, 2014 #3 I see... well, the need to be rooted limits the solution... I wonder how those bluetooth joysticks that some companies sell for use with tablets and phones work with any device... Anyway, thanks for the tip. Regards, Upvote 0
I see... well, the need to be rooted limits the solution... I wonder how those bluetooth joysticks that some companies sell for use with tablets and phones work with any device... Anyway, thanks for the tip. Regards,
Erel B4X founder Staff member Licensed User Longtime User Nov 27, 2014 #4 It is not the same thing. The OS treats them like a keyboard not like a different app. Upvote 0
T ThiagoRodrigues Member Licensed User Longtime User Nov 27, 2014 #5 Right... I guess it is easier to work on the hardware level (use a bluetooth module used for portable keyboard), I mean, HID module... Last edited: Nov 27, 2014 Upvote 0
Right... I guess it is easier to work on the hardware level (use a bluetooth module used for portable keyboard), I mean, HID module...