Topic has a solution and is locked
Log in or register to post comments

Sample App needs a Licence key?

March 25, 2015 - 3:15am #1
Topic solved

I'm trying to get the sample apps running but it keeps asking for a license key. I ended up generating one but nowhere on your site is it mentioned where you're supposed to enter this key. So, where DO you enter this damn key?

Sample App needs a Licence key?

July 25, 2018 - 3:09am #18

This thread helped me avoid a lot of pain debugging the issue. All I had to do was create a license key and paste it in code as suggested. Thank you!

Sample App needs a Licence key?

May 10, 2018 - 9:24am #17

Christ, all these responses to the OP are so disappointing, albeit on-par for the community and it's documentation practices.

So I dug around all over the example files until I found what you all were apparently too afraid to document.

For reference (something none of you apparently believe in) I am in Android Studio 3.1.1, and have downloaded from https://developer.vuforia.com/downloads/samples?d=windows-31-22-6820&retU the 'vuforia-samples-core-android-7-1-34', and from within that, have the project 'VuforiaSamples-7-1-34' open in Android Studio.

Once the project is (hopefully) loaded in, in the Project tab of Android Studio, make sure you're in the Android view (unless you've configured your Android Studio otherwise, this should be like it by default. So if you're unsure, it's probably in its default setup.) Here's the folder hierarchy for getting to the file that has the bit of code in it that everyone's hinting at.

app > java > com.vuforia.samples > SampleApplication

Inside of SampleApplication, there is a file titled SampleApplicationSession.java (the .java obviously doesn't appear in the Project tab, a blue 'C' icon should be next to the file title though.)  Inside that file down on line 370 (yes, line number referencing is a bit jankie, so a more universal way to find this would be to search within that file for the following: doInBackground) is the line 'protected Boolean doInBackground(Void... params)'. A few lines below that (for me it's on line 375) is the fabled bit of super top secret code.

Vuforia.setInitParameters(mActivity,mVuforiaFlags, "");

From here my assumption would be that you paste the license key that you made on https://developer.vuforia.com/targetmanager/licenseManager/licenseListing into the double quotes in that line of code.

 

For the record, I have not tested whether this solves any problems for me. It just irked me so much that multiple people were posting the supposed answer, with absolutely zero reference/record of how to actually do the fix. Hopefully this will help some poor soul in the future.

Sample App needs a Licence key?

March 14, 2018 - 2:47am #16

License ket to be added at below location.

SampleApplicationSession.doInBackground()....

Vuforia.setInitParameters(mActivity, mVuforiaFlags,s: "YOUR LICENSE KEY generated in vufpria.developer.com")

Sample App needs a Licence key?

January 24, 2018 - 12:56am #15

Have you solved this issue? If yes, then please post how.

Sample App needs a Licence key?

October 12, 2017 - 4:38pm #14

The code is now changed and the class doesn't even extend AsynkTask() anymore. What is the solution now to this same issue? I am unable to run the sample on any device.

Sample App needs a Licence key?

July 12, 2017 - 6:59pm #13

Thanks for your reply.

We are using Android Studio 2.3.3 on win7 machine. We are using vuforia-samples-core-android-6-2-10.

We have performed the following steps :

- We imported vuforia sample in Android Studio.

- Generated license key

- Pass the license key in the following function :

   Vuforia.setInitParameters(mActivity, mVuforiaFlags, "myLicenseKey");

- Build the apk

- Installed the apk on Nexus 10(Android version 5.1.1)

- Run the application

- Select "Image Targets" on "Veforia Samples" screen

- Click on "Start" button.

- A black screen is displayed for a fraction of second and "Vuforia Samples" screen displayed again.

 

 When we try to debug the application, on click of "Start" button the application is closed. Last call reached to the mentioned function.

- Kruparth Rana

Sample App needs a Licence key?

July 12, 2017 - 8:50am #12

Are you still seeing the error message saying "Missing Vuforia License Key" or are you seeing a different error?

Thanks,

-Vuforia Support

Sample App needs a Licence key?

July 12, 2017 - 5:04am #11

I have generated license key and used it as mentioned in the article for android.

https://library.vuforia.com/articles/Solution/How-To-add-a-License-Key-to-your-Vuforia-App

It is not working. Is there anything else to do?

Sample App needs a Licence key?

January 24, 2017 - 3:24am #10

Yes you are right. They don't provide the license key for the sample projects. Why should we have to create one for sample apps?

 

To answer your question of "So, where DO you enter this damn key?" 

First you need to drag in an ARcamera into scene then select it and on the right inspector menu under "Vuforia Behavior script" click on the "open Vuforia configuration"

and there you will see a textarea to paste in your license key.

 

Still need that answer of why the sample apps doesn't come with license keys?

Sample App needs a Licence key?

December 28, 2016 - 6:19pm #9

See this article:

https://library.vuforia.com/articles/Solution/How-To-add-a-License-Key-to-your-Vuforia-App

Sample App needs a Licence key?

December 28, 2016 - 9:15am #8

Thank you for providing the answer in this post because there is no indication in the code comments or variable names as to where the license key goes. Something so basic should be included in a quick setup readme.

Vuforia seems like a promising platform but the poor documentation is a turn-off.

Sample App needs a Licence key?

September 24, 2015 - 7:19am #7

Please tell us where exactly to put it if you found it.

Sample App needs a Licence key?

September 24, 2015 - 7:03am #6

HI,

if you found it WHY you don't say Where to put it??? 

 

 

please

Sample App needs a Licence key?

July 3, 2015 - 3:53pm #5

If you have successfully created license key. then follow these steps.

 

. copy the license key.

. Open SampleApplicationSession.java file.

. Look into InitVuforiaTask asycTask Class.

. Pase your license key as the parameter in Vuforia.setInitParameters.

example Vuforia.setInitParameters(mActivity, mVuforiaFlags, "<pase your license key here>")

 

Sample App needs a Licence key?

April 9, 2015 - 12:25pm #4

Able to figure out.

I need to copy the key from license manager into the <License Key> argument in the below function call in my app.

Vuforia.setInitParameters(mActivity, mVuforiaFlags, <License key>);

Sample App needs a Licence key?

April 8, 2015 - 12:35pm #3

Can you please post the solution? I have generated the key but don't know where to enter in Android Studio or manually to the code.

Sample App needs a Licence key?

April 8, 2015 - 5:45am #2

How did you resolve this problem?Thanks

Log in or register to post comments