"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

Overlaying Android Interface Objects

Hello everybody, I' am fairly new to developing Apps for Android, so please excuse my question if it is to simple. I like to develop an AR App in whitch the user gets information depending on the tracked image. Therefore I don't nees any 3D-Model or somthing like that. Furthermore the user should be able to interact whith the overlaying interface (for example a button for more information). The hole handling of the Data-Logic (getting the right information, handle touch, etc) should done in java. Do anybody have an idea? Thanks for your help

This is possible but somewhat tricky. If you're new to Android, you may want to start by creating the user interface without the Augmented Reality SDK, to learn how the Android UI works. Then, I suggest copying the ImageTargets sample project as a starting point for an AR application.

Can you try debugging your code to figure out which step is breaking? First, check to see if the displayMessage Java method is successfully called from native. In Eclipse, add a breakpoint to this method. Check the contents of the message, then step into the mainActivityHandler sendMessage call.

I'm not sure if you can concatenate jstrings... I would just do this using C string functions, and then pass the finished string to the new jstring. You can use something like strcat (do a search online for how to use it), or my preference is sprintf.

No, the handler gets created in the onResume method, but isn't run until someone sends it a message. Here's the issue: we have two threads in play, the UIThread and the GLThread.


Thu, 08/25/2011 - 21:31

I am using the latest sdk of qualcomm and i am having problem doing the changes you mentioned. After i did changes in ImageTarget.cpp file i ran into terminal and ran ndk-build but it wouldnt let me compile.


Tue, 11/15/2011 - 08:31

Hi Kim, The given code detects the trackable image only for one time, if i put the camera again to detect the image, it does nothing. I have tried, but could resolve the issue. Please help me. Regards Rahul

Try resetting the lastTrackableId variable when there are no trackables in view: [CODE] if (state.getNumActiveTrackables() == 0) { lastTrackableId = -1; } [/CODE] - Kim


Fri, 12/23/2011 - 05:17

Hello Kim, sorry to bother you, I am new to AR development. I tried to run the sample of ImageTargets as you described to display the message on trackables (Chips & Stones) but nothing happened.

Make sure you are rebuilding the native code using "ndk-build" when you make changes. Then refresh the project in Eclipse (right-click in the Package Explorer and choose Refresh). Try adding a LOG message after calling CallVoidMethod in native.