I'm creating an Android app for a university project and I'm having some troubles with it.
Basically the app is a button box (going to add outgauge stuff if I can get basic button box working first), I want it to run for all sims (LFS, rF2, RACE07 etc.) so far I've been using a PC listener/server which takes the messages from the phone and puts them onto a keyboard key. This works in notepad and all windows applications but not in any of the above mentioned games.
It's all programmed in Java (only language I know well enough to do this).
I'm guessing (after much Googling) it's some form of protection to stop macro cheating - is there any way around this? So far the only solution I've come up with is to program the PC listener in C# and use DirectInput, but looking at tutorials to do it I'm completely baffled and don't want to waste time going into it if it doesn't work.
This is the switch statement I have in the listener which works in things like Notepad, web browser etc:
I am aware there are better and cleaner ways of doing this, I'm just after something that works for a project demo.
Basically the app is a button box (going to add outgauge stuff if I can get basic button box working first), I want it to run for all sims (LFS, rF2, RACE07 etc.) so far I've been using a PC listener/server which takes the messages from the phone and puts them onto a keyboard key. This works in notepad and all windows applications but not in any of the above mentioned games.
It's all programmed in Java (only language I know well enough to do this).
I'm guessing (after much Googling) it's some form of protection to stop macro cheating - is there any way around this? So far the only solution I've come up with is to program the PC listener in C# and use DirectInput, but looking at tutorials to do it I'm completely baffled and don't want to waste time going into it if it doesn't work.

This is the switch statement I have in the listener which works in things like Notepad, web browser etc:
Robot keyPress = new Robot();
if(Pattern.matches("[a-zA-Z]+", message)) {
switch (message){
case "ignition":
//MessageToLocalComputer("/press i");
keyPress.keyPress(KeyEvent.VK_I);
keyPress.keyRelease(KeyEvent.VK_I);
break;
...
I am aware there are better and cleaner ways of doing this, I'm just after something that works for a project demo.