[android-developers] Generate keypress when moving phone

2011-12-12 Thread Charly Pierre
Hello all, I want to generate a presskey when i move my phone. i try with that but it doesn't work = crash x = values[SensorManager.DATA_X] * 9; if (x =45 ) { SimulationKey.PressTheKeyRIGHT(); } // in Simulation class public static void pressTheKeyRIGHT() { Instrumentation i = new

Re: [android-developers] Generate keypress when moving phone

2011-12-12 Thread TreKing
On Mon, Dec 12, 2011 at 4:01 PM, Charly Pierre charlypierr...@gmail.comwrote: My program detect the movement and print a message (when i replace SimulationKey.PressTheKeyRIGHT(); by a message), but crash when call the function to do a keypress Any idea ? Debug your app. At least post a