Log in or register to post comments

Using Virtual Buttons like Android Buttons

January 29, 2012 - 2:23pm #1

Is there any way that virtual buttons can be used in a similar fashion to button widgets in Android. I would like to use a virtual button to trigger the creation of a new activity. Thanks.

Re: Using Virtual Buttons like Android Buttons

March 30, 2012 - 6:06pm #6

Perhaps you're missing a call to set the texture unit:

glActiveTexture(GL_TEXTURE0);

Do that just before binding the texture.

- Kim

Re: Using Virtual Buttons like Android Buttons

March 30, 2012 - 1:31pm #5

I have the version released prior to the current one. I have developed a workaround for this issue with a couple of timers to throw away frames. I noticed that the newer version has conflicts with functionality present in our current application. However...

I do have another question though. This does not happen with all phones, but currently we are seeing an issue with HTC phones. Our application creates planes and binds 2d images to the planes. For my Samsung Nexus S, I have no issue in that when a trackable is detected I will see a 2d image that I am supposed to. However, with the HTC phones we find that when the trackable is detected we'll see the geometric plane and instead of the image we'll see a plane that just shows what the camera is seeing. It's a bit of a strange issue but basically in place of the image you'll see a smaller version (rotated 90 degrees) of what the camera is all ready seeing. i.e if you put your finger in the camera's view you'll see your finger appear in that geometric plane. I have no idea how to fix this issue. Any insight on this?

Re: Using Virtual Buttons like Android Buttons

March 29, 2012 - 3:34pm #4

Are you using the 1.5 version of the SDK? Android, iOS, or Unity?

You may need to throw out the first few frames after returning to the AR activity, although I thought this issue was fixed in 1.5.

- Kim

Re: Using Virtual Buttons like Android Buttons

March 28, 2012 - 9:35pm #3

So I have had this working but i'm trying to debug a certain issue. If I start an activity from a virtual button press and then I hit the back button the application still thinks i am pressing the virtual button and i'm immediately sent back to the activity I came from. Any insight on this issue?

Re: Using Virtual Buttons like Android Buttons

January 30, 2012 - 6:28pm #2

Sure. Start with the VirtualButtons sample and find the button handling code in VirtualButtons.cpp. It's in the renderFrame method.

From there you can call a Java method using JNI. See this thread for some guidance: http://ar.qualcomm.at/node/2001096

- Kim

Log in or register to post comments