"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

Application closes!!!

Well I Read Ksiva's post.... It stated how to change texture on tapping the screen... Wel i hav in ImageTarget.cpp file----multiple targets loaded.... i.e I hav loaded mytaget1 with targetIndex= 0 as well as targetIndex=1 second mytarget2 with targetIndex=2... I hav added in Imagetarget.java the following code public boolean onTouchEvent(MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_UP ) { DebugLog.LOGI("swapping textures"); Texture temp = mTextures.elementAt(0); mTextures.set(0, mTextures.elementAt(1)); mTextures.set(1, temp); deinitApplicationNative(); initApplicationNative(mScreenWidth, mScreenHeight); // Run initRendering on the GL Thread mGlView.queueEvent(new Runnable() { public void run() { mRenderer.initRendering(); } }); } return true; } Well what happens is the target is displayed wel for both mytarget1 and mytarget2....It even swaps well and changes the texture for mytarget1 on tapping the screen... However when the mytarget2 is tracked the texture is displayed well but on tapping multiple times in short duration on mytarget2 the application closes!!! (IT WORKS WELL IF I TAP MYTARGET2 AFTER SOME SECONDS...) I taught it would work well as even if i tap on other target it would just swap the position of mTexture 0 and mtexture 1... The logcat also shows the log for swapping texture ...init deinitapplication native... AND NO ERROR IS DISPLAYED!!!

integration

Wed, 03/21/2012 - 09:56

I tried tapping multiple times on mytarget1 as fast as i can....and it worked perfectly.... I cant figure out whats the problem....som1 pls help..

integration

Wed, 03/21/2012 - 10:07

One possible solution which i can think off is the onTouchEvent is only invoked when that particular target is viewed by camera..... However i dont knw how to get id of the marker currently viewed by camera.... If i can get this by any means in Java i can easily play with the Texture being displa

integration

Fri, 03/23/2012 - 16:41

Hey Ksiva I am trying with the code mentioned in above thread... However i am getting following error while building native code in cygwin.. $ ndk-build Gdbserver : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver Gdbsetup : libs/armeabi/gdb.setup Gdbserver : [arm-linux-andro

Note the changes to the method signature: Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargetsRenderer_renderFrame(JNIEnv* env, jobject obj) The "env" variable is defined there. - Kim