Topic locked

Trouble getting started with image targets

April 3, 2014 - 10:26am #1

Hi
First off, I have no experience with Android development and that might be why I seem to be missing some essential basic knowledge that perhaps everyone else has? ;)

In either case I'm experiencing great difficulties with figuring out how to integreate the functionality of ImageTargets into our Android app.

We have a very basic Android app with some buttons and such, developed in Eclipse, native I think is the term.

I am able to run the VuforiaSamples app, I have not succeded in setting up Cygwin so I can't go into the C++ files, but that shouldn't be a problem as I udnerstand.

 

My tactics at the moment is to set the Vuforia Samples App as library, then with MyApp I set the Vuforia Samples App as the library. I've imported everything that ImageTargetRenderer.java also does, I¨ve done this in MainActivity.java. But I can't import everything.

The closest I've found to help me is this: https://developer.vuforia.com/resources/dev-guide/image-targets-feature
But I lack the basic understanding of how to integrate Vuforia to my app, what should I import where? How do I set up so it can begin to track?

All I want it to do is to track an image target and tell the rest of our app the distance to that target (the distance calculation I did get to work with some help :) ).

Trouble getting started with image targets

April 4, 2014 - 12:53am #6

You're welcome. Happy learning :-)

Trouble getting started with image targets

April 4, 2014 - 12:52am #5

Haha yea I realise that, finally ;)
I have experience with programming in multiple environments and I thought that it where sufficient, perhaps not.
Anyway, my main problem has been to get the overview and understand where to look for help, which I think you have provided me now so thank you :)

Trouble getting started with image targets

April 3, 2014 - 12:25pm #4

Hi Aske,

First off, I have no experience with Android development and that might be why I seem to be missing some essential basic knowledge that perhaps everyone else has? ;)

Thanks for letting us know :-) Well, of course being able to code a Vuforia application with the Android SDK does require some knowledge and skills with Android programming; that's "by definition", I would say.

What you are trying to do is not too complex, however it requires anyway that you can correctly setup a Vuforia-Android app, including:

- correct initialization of Vuforia

- initialization of the Trackers

- loading the Trackers data (datasets for Image Targets, for instance)

- initialization and starting of the Camera

- initialization of the OpenGL view used by Vuforia

- deinitialization of targets and camera

- deinitialization of Vuforia

All these steps must also be correctly integrated with the Activity life-cycle of your Android app; the VuforiaSamples provide an example of how all of the above can be done, in a correct technical way. So, the correct approach (or at least, the best way to my knowledge) of learning how to develop an app with Vuforia and Android, is to study the sample code and understand what it does;  in doing so, you will also find that reading the developer guide at the same time will help in this learning task.

There is no shortcut to the learning process. Your best bet (as a startig point) is to install, compile and run the samples as it is explained here:

https://developer.vuforia.com/resources/sdk/android

 

 

 

 

Trouble getting started with image targets

April 3, 2014 - 12:12pm #3

Thank you for your help but it was not exactly what I was looking for.

I do not know how to get my own app to make use of Vuforia. I'm not interested in using the sample app, I'm looking for how to get the functionality into an existing app.

Maybe it's because I don't understand how to use APIs in general? I'm really lost in regards to where to look for what. I've searched all through Vuforia's own documentation and have not found anything useful in that regard.

Trouble getting started with image targets

April 3, 2014 - 11:07am #2

Here's a couple articles that might help:

Getting custom image targets into ImageTargets sample app:

https://developer.vuforia.com/forum/faq/android-how-do-i-replace-dataset-image-targets-sample

Here's an article that describes how to get camera location and which could be used to calculate distance to image target:

https://developer.vuforia.com/resources/dev-guide/getting-camera-position

For getting Cygwin setup:

https://developer.vuforia.com/resources/dev-guide/step-1-setting-development-environment-android-sdk

 

 

Topic locked