Skip to content

Commit

Permalink
Updates Cordova sample app to use Wikitude SDK 9.2
Browse files Browse the repository at this point in the history
  • Loading branch information
pnagele committed Jul 9, 2020
1 parent 8b95c2e commit 42ffe4e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions SampleAppResources/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ var app = {
app.continueLoadingExampleARchitectWorld(example);
},
function() {
alert("Failed to get the current device position.");
app.wikitudePlugin.showAlert("Failed to get the current device position.");
});
} else {
app.continueLoadingExampleARchitectWorld(example);
Expand Down Expand Up @@ -108,7 +108,7 @@ var app = {
},
architectWorld.requiredFeatures);
}, function(errorMessage) {
alert(errorMessage);
app.wikitudePlugin.showAlert(errorMessage);
},
architectWorld.requiredFeatures);
},
Expand All @@ -126,7 +126,7 @@ var app = {
}
}, function errorFn(error) {
app.isArchitectWorldLoaded = false;
alert('Loading AR web view failed: ' + error);
app.wikitudePlugin.showAlert('Loading AR web view failed: ' + error);
},
architectWorld.path, architectWorld.requiredFeatures, architectWorld.startupConfiguration
);
Expand All @@ -137,16 +137,16 @@ var app = {
if ( jsonObject.action === "capture_screen" ) {
app.wikitudePlugin.captureScreen(
function(absoluteFilePath) {
alert("snapshot stored at:\n" + absoluteFilePath);
app.wikitudePlugin.showAlert("snapshot stored at:\n" + absoluteFilePath);
},
function (errorMessage) {
alert(errorMessage);
app.wikitudePlugin.showAlert(errorMessage);
},
true, null
);
} else if (jsonObject.action === "present_poi_details") {
var alertMessage = "Poi '" + jsonObject.id + "' selected\nTitle: " + jsonObject.title + "\nDescription: " + jsonObject.description;
alert(alertMessage);
app.wikitudePlugin.showAlert(alertMessage);
} else if (jsonObject.action === "save_current_instant_target") {
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(fileSystem){
fileSystem.root.getFile("SavedAugmentations.json", {create: true, exclusive: false}, function(fileEntry){
Expand All @@ -173,10 +173,10 @@ var app = {
}
},
saveError: function(error) {
alert("Could not save the current instant target.");
app.wikitudePlugin.showAlert("Could not save the current instant target.");
},
loadError: function(error) {
alert("Could not load instant target, please save it first.");
app.wikitudePlugin.showAlert("Could not load instant target, please save it first.");
},
onRuntimeError: function (error) {
if (error.code == 960) {
Expand All @@ -196,7 +196,7 @@ var app = {

app.wikitudePlugin.getSDKBuildInformation(function(buildInformationJSON) {
var buildInformation = JSON.parse(buildInformationJSON);
alert(
app.wikitudePlugin.showAlert(
"Build configuration: " + buildInformation.buildConfiguration + "\n" +
"Build date: " + buildInformation.buildDate + "\n" +
"Build number: " + buildInformation.buildNumber + "\n" +
Expand Down
2 changes: 1 addition & 1 deletion SampleAppResources/world/ade.js

Large diffs are not rendered by default.

0 comments on commit 42ffe4e

Please sign in to comment.