Topic locked

Can we open a activity when image is recognized in vuforia?(Android)

March 20, 2014 - 8:58pm #1

Hi, 

I followed this guide https://developer.vuforia.com/resources/dev-guide/open-web-site-and-display-toast-target-detection and then I changed opening the launch browser to start an activity inside my application.Then the apllication become unresponsive when image is detected.Can you please give me a sample code to satrt a activity inside your app when image is detected?

 

thnak you

Can we open a activity when image is recognized in vuforia?(Andr

March 23, 2014 - 8:22am #4

Can you please tell me where to put this intent start code to run every time image is detected.thank you..

This is already answered in detail in the article you were referring to:

https://developer.vuforia.com/resources/dev-guide/open-web-site-and-display-toast-target-detection

as explained there, you need to hook into the code in which the for loop with the state.getNumActiveTrackables() is used, and then determine the target detection with some simple logic as explained there (e.g. using a lastTrackableId variable);  then, you should trigger a call to code to start the Intent using a Handler, so that the call is executed on the main UI thread of your Android app.

 

Can we open a activity when image is recognized in vuforia?(Andr

March 23, 2014 - 7:14am #3

Thank you.There was a probelm in AndroidManifest file.But when I cann the Intent inside onresume() method it will only work for one time.Can you please tell me where to put this intent start code to run every time image is detected.thank you..

 

Can we open a activity when image is recognized in vuforia?(Andr

March 21, 2014 - 1:30am #2

That tutorial already has the code you need.

But you might have done something wrong in your implementation.

For example, you migth have forgotten to add your second Activity to the AndroidManifest.xml   (and you could verify that by looking at the error logs).

what are the error logs showing ?   have you debugged the application code by stepping in the code with the Debugger or by Logging messages at the various steps of your code, in order to narrow down the scope of the issue ?

 

Topic locked