Start a new topic
Solved

Configure wikitude on Phonegap

Hi guys,


I am trying to configure Wikitude in Phonegap and when I tried to simulate it on my android phone I got the error below:

image


Please notice that I replaced [ENTER-YOUR-KEY] tags with a trial one.

BTW I faced the same issue with the sample app.


Here is what I used in my JavaScript:

 

loadARchitectWorld: function() {
		
	  alert(cordova.file.dataDirectory);
		app.wikitudePlugin = cordova.require("com.wikitude.phonegap.WikitudePlugin.WikitudePlugin");
        app.wikitudePlugin.isDeviceSupported(function() {
            app.wikitudePlugin.loadARchitectWorld(function successFn(loadedURL) {
                }, function errorFn(error) {
                    alert('Loading AR web view failed: ' + error);
                },
                cordova.file.dataDirectory + 'www/wiki/index.html', [ '2d_tracking' ], { camera_position: 'back' }
            );
        }, function(errorMessage) {
            alert(errorMessage);
        },
        [ '2d_tracking' ]
        );
    }

Please assist.

Thank you in advance.


Kind Regards,

Nicholas.


Hi Nicholas,

Thank you very much for posting here the solution so that other users can benefit as well.

Eva

 

Hi,


After discussions with PhoneGap team, the solution was easy:


 

If you are doing your own build of the app and trying to get the Wikitude experience working, the path should just be: www/wiki/wiki.html. Don't worry about the cordova.file.dataDirectory part.
For more info: http://www.wikitude.com/external/doc/documentation/latest/phonegap/setupguidecordovacli.html#setup-guide-cordova-cli

If you are trying to load the experience from the PhoneGap Developer App, then the path will be: cordova.file.dataDirectory + 'www/wiki/wiki.html.


Regards,

Nicholas.

Hi Daniel, No. Trial is not my problem. The app is working when I simulate it through PhoneGap app. It does not work when I build and use the Android app. It seems that I am missing some configuration?! Cam starts but an error is raised that file not found ..wiki/index.html Kind regards, Nicholas

Good morning,



if you are using a trial license key, the trial overlay is expected and intended to be displayed. If you would like to get rid of the trial watermark, you will have to purchase an actual license.


Is this what you were asking? I'm not sure I understood the problem correctly as the answer seems to be quite obvious.



- Daniel


Hi Alex,


Now PhoneGap is working (I use the trial key) but when I build the apk & do the actual installation I get the exact same message (background is ok now - displaying TRIAL).


Kind Regards,

Niholas.

Hi Nicholas


I believe you are also having the same problem as I am. I've posted about it here - https://support.wikitude.com/support/discussions/topics/5000084915 - Andreas from Wikitude is aware of this issue, and will be getting in contact with PhoneGap to investigate the problem.


Hopefully it is something that can be resolved soon.

Login or Signup to post a comment