"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Change action when pressing a virtual buttom

Hello. I'm trying to show a toast message (Android) when the user "press" a virtual button. I've been reading this post https://developer.vuforia.com/resources/dev-guide/open-web-site-and-display-toast-target-detection but I can´t do it. When I follow the instructions of that post I get an error in my Android project, here...:

 

public void displayMessage(String text)

    {

                 android.os.Message message = new android.os.Message();

                 message.obj = text;

                 mainActivityHandler.sendMessage(message); // Here is the error: The method sendMessage(Message) in the type Handler is not applicable for the arguments (Message)

    }

I've done everything as explained in the post, but doint it in the VirtualButtons sample instead of the ImageTargets sample, but I suppose that change shouldn't be a problem. 

Thank you very much

necronic007

Wed, 04/10/2013 - 16:53

I restarted Eclipse and I don´t get that error now, but I can´t show the toast message yet. I don´t know what to do to show a toast message when I press a virtual button.