>Debug your app.
huuuum... I never thought about that... really thanks !

for the stack trace i don't have it cause i can't test movements on
computer :$... i just have the message "fermeture soudaine de
l'application... merci de réessayer" => "sudden closure of.... thank
to retry" on my phone...
i try with :
                public static void PressTheKeyRIGHT() {

                        Instrumentation i = new Instrumentation();
                        i.sendKeyDownUpSync(KeyEvent.KEYCODE_DPAD_RIGHT);

                }
and
                public static void PressTheKeyRIGHT() {
                        new
Instrumentation().sendKeyDownUpSync(KeyEvent.KEYCODE_DPAD_RIGHT);
                }

and again

                public static void.PressTheKeyRIGHT() {

                        Instrumentation i = new Instrumentation();
                         new Thread(new Runnable() {
                                  public void run() {
                                   new
Instrumentation().sendKeyDownUpSync(KeyEvent.KEYCODE_DPAD_RIGHT);
                                  }
                                 }).start();

                }

but nothing to do, nothing work...

on my computer i use (and for my computer), i use

public static void.PressTheKeyENTER() {// example with ENTER on
computer
Robot robot = new Robot();

                robot.keyPress(KeyEvent.VK_ENTER); // example with ENTER on 
computer
                robot.delay(Delay);
                robot.keyRelease(KeyEvent.VK_ENTER);// example with ENTER on
computer
                robot.delay(Delay);
}

but Robot class doesn't exist for android...

Have u ideas (other than "Debug your app.") ?
Thx



On 13 déc, 00:38, TreKing <[email protected]> wrote:
> On Mon, Dec 12, 2011 at 4:01 PM, Charly Pierre 
> <[email protected]>wrote:
>
> > 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 stacktrace if you expect help with "a
> crash".
>
> -------------------------------------------------------------------------------------------------
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to