Start a new topic

Issue with Camera initialization

Issue with Camera initialization


Have been trying really hard on running the phonegap wikitude app recently and facing a wierd issue for which there is no solution available so far.

Before I detail out the problem, would like to update with the versions I am using for my development.

I am using

(1) cordova 3.5.1

(2) phonegap 3.5.1

(3) wikitude plugin from git repository


I have created the app using the phonegap cli for android platform and then added the phonegap plugin into the app.

Then the app is being imported into the eclipse and then I am running it from the eclipse on a samsung galaxy s2 device.

Now coming to the problem.

My AR world gets intialized on the ondevice ready function of the phonegap event.  The javascrip and html also gets executed as per the alerts set.

Howeve, the html content is not shown on the app and the camera also doesnot get intialized.

Can someone please suggest as to want is going wrong and what is it that I have missed.

Attaching the config.xml and manigest.xml file for reference.




Thank you for your feedback.

The latest phonegap plugin has some issues we are already aware of, we are working on that.

An updated version of the phonegap plugin will be online soon.

In the meantime, you can solve the problem by downloading the official Android SDK 4.0.1 and replacing the wikitudesdk.jar file inside the plugin directory with the file inside the official SDK package.


Thanks for the update and yes the solution worked by downgrading the Wikitude SDK and the camera is visible.

However, there is another problem that I would like to bring to your notice.

On device with Android version 4.2.2 the following code never gets executed.

AR.context.onLocationChanged = function(lat, lon, alt, acc) {

     alert('lat : '+ lat+'   lon : '+lon);



When observed closely, came to an understanding that none of the objects are created or executed in the js file that is included in the AR World .html file.


alert(;  //returns true;


but the above code at the same level doesnot show the alert.



Please help.




The above code works fine on Android version 4.1.2


The new version has passed internal test and is now available for download.

About the location change event: could you please write some additional information about the device you are testing? Maybe the location service is not active, or it doesn't get any location update? What happens if you click on the "i" symbol on the bottom of the screen? Do you get any error message?

Thanks Gabriele for the update.

Will download the latest build and try it out.  Just to verify, this is to be downloaded from the github page, right.


Device Detail(s):

Samsung Galaxy S4, Model: GT-I9500

Android version: 4.2.2

If there is anything specific required other than this, please let me know.


The location service is active and tested.  I have also tried by hardcoding the passed location (lat & lon info) to the AR world js and html.  The js doesnot get executed as expected.

One point to be confirmed at this stage.

The js files included in the AR World .html is doen similarly as it would be done any html page.

Attaching the sample js and html file for your reference.


I donot think that there is any issue with the html and js because the same app runs absolutely fine on Samsung Galaxy S2 Model : GT-I9100  with Android Version 4.1.2 installed on it.
Login or Signup to post a comment