Start a new topic

Phonegap Sample App does not open Wikitude functions

Phonegap Sample App does not open Wikitude functions


Hi,

I followed the steps in the Cordova documentation (https://www.wikitude.com/external/doc/documentation/5.3/phonegap/setupguidecordovacli.html#PhoneGapSampleApp) to create a cordova based app with the samples from Github wikitude-cordova-plugin-samples, from the SampleAppResources Folder into the project root/www. I entered the license in both WikitudePlugin.js files, and the app was created and looks fine.

Just when I choose one of the Samples, the Wikitude Mode does not start! Nothing happens. Hint: Strangely, the button Launch in the World URl field does work.

Last May I followed the same steps and the sample app worked just fine back then, but I cannot reproduce the same result. I have now upgraded Java, Android Studio, Wikitude, Cordova to the last versions. 

What might be the problem? 

Thank you and regards,

Laura

Hi, 

after 4 days debugging I found out that lines 83-87 from the index.js from the SampleAppResources folder would fix the issue. Apparently, since the last update from the plugin, "cordova.file.applicationDirectory + " is not needed and makes the paths go wrong. 


if ( example.path.length > cordova.file.applicationDirectory ) {
    if ( example.path.substring(0, cordova.file.applicationDirectory) != cordova.file.applicationDirectory ) {
        example.path = cordova.file.applicationDirectory + example.path;
    }
}

Does somebody know why this happens?

Best regards,

Laura

Hi, I not sure I understood what you did. Did you delete  lines 83-87?

ok, I tried both ways. I took out just "cordova.file.applicationDirectory + " and it didn't work. if you take al the lines 83-87 it crashes

Hi,

Since our Cordova example app update 3.3.0, we use the Cordova File plugin to determine the full path of examples. We do this so that developer see how to use the Cordova File plugin in combination with the Wikitude Cordova plugin to get accurate paths when launching Architect World from e.g. the document directory.


The Wikitude Cordova example app generation script should download and install the Cordova file plugin automatically.


Does both of you see the Cordova file plugin installed?


Best regards,

Andreas

Hi,

I just replied to someone else and figured that this might be interesting for you as well.

Are you using the PhoneGap Android/iOS application to run the Wikitude SDK? This one might not be updated with the latest Wikitude Cordova plugin, meaning that it might miss some functionality that is required.


So the best way to test it would be to create your own cordova/phonegap application on the command line and open/run it with Xcode/Android Studio.


Best regards,

Andreas

Login or Signup to post a comment