Andrei Marinescu
Andrei Marinescu

Reputation: 21

intel xdk augmented reality

I want to make an app, using HTML and Intel XDK. It's not rocket science, you just put the final html pages there, in the www folder of the project and that's it, you can make the app. Now, I want to implement this: https://github.com/krisrak/html5-augmented-reality-app The problem is that this app with AR MUST stay in www folder, and it has a index.html page to work. I already have my index.html for my 'app/html site'. If I rename the AR's index to something else, like AR, it won't work. I will get the text from < body> part, but nothing else, no active script, no back camera activated, nothing. Does anyone knows how can I point to AR.html insted of index.html for it to work? Or any other solution?

THanks,

Andrei

Upvotes: 0

Views: 815

Answers (1)

xmnboy
xmnboy

Reputation: 2310

Building a multi-page hybrid HTML5 app is complicated. You're better off sticking to a single-page app. See this well-hidden doc page from the Cordova CLI docs for some of the reasons why. Essentially, you lose JavaScript context when you switch pages and you must reinitialize the underlying native platform code. Try building your app as a single-page app instead.

If all you're trying to do is load an external page inside your app, they try the inAppBrowser plugin: https://github.com/apache/cordova-plugin-inappbrowser/blob/master/doc/index.md -- this plugin is available in the Intel XDK (because the XDK supports Cordova plugins).

Upvotes: 0

Related Questions