Log in or register to post comments

Adding text in camera scene

May 30, 2013 - 2:25am #6

Hi @AlessandroB,

Do you have any sample code or tutorials to show some text like "Please point the Camera device toward the Image target" in the camera scene when no image target pointed in the scene?

How to add that feature in ImageTargets sample app?

*I use Eclipse.

Adding text in camera scene

May 30, 2013 - 4:32am #5

Hi,

the following tutorial might be of help, as it shows how to show a message when a target is detected; you can probably start from it and adjust the logic to to achieve your goal (i.e. displaying the message when the target is not detected):

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

 

Adding text in camera scene

June 2, 2013 - 2:58am #4

Hi @AlessandroB

I follow that tutorial...
and I get error in 'ndk-build' like image below...
How to solve that?

AttachmentSize
Image icon displayToast.png65.8 KB

Adding text in camera scene

June 2, 2013 - 5:36am #3

Hi, that's because the article refers to the SDK 1.5 API;

you could adjust the errors by checking our migration guide, but the easiest is that you check this updated version of the article (which is based on the latest version of the API):

https://developer.vuforia.com/forum/faq/android-how-can-i-update-my-ui-response-tracking-events

 

Adding text in camera scene

June 15, 2013 - 9:45pm #2

The Tutorial is works..
I can can show the toast when the target is detected...
but, I still can't show message when the target is not detected..
coz I can't  find the parameter of undetected target.

I try

- if(!trackable)
- if(trackable == NULL)
- if(!trackable.getId() == NULL)

all of that is not working.

can you help me?

Adding text in camera scene

June 15, 2013 - 10:51pm #1

Hi, one way of doing that is by reetting the lastTrackableId to -1, e.g.:

if (state.getNumTrackableResults() == 0)

  lastTrackableId = -1;

 

for(int tIdx = 0; tIdx < state.getNumTrackableResults(); tIdx++)
    {

...

 

Then, you can call on Java method to hide the message instead of showing it

 

Log in or register to post comments