Start a new topic

Example with back button

Example with back button

3 people have this problem


I purchased the plugin and am experiencing your plugin, but I can not go back in the list of examples after they are entered in a page of world. I would like to add a button to make me go back to the list. How can I do. You could insert a back button in your examples . Thanks

Hi Marco,
I guess you're talking about the Wikitude iOS Cordova Plugin? The Plugin implements the standard iOS functionality 'swipe from the left edge into the screen' back gesture. So simply swipe from the left edge of the screen into the middle of the screen and the plugin will close itself. You can add a button in your architect world which then uses the architectsdk:// protocol to communicate with the Cordova application where you then can close the Plugin programatically. There is also knowledge base article available, which describes the mentioned communication in more detail.

Best regards

Andreas

Hello, thank for reply. But I just read all documentation and forum an your link without success. I have app for Android and IOS

My application as a base your example ... and when they are active on the screen with the camera I want to go back to  to list of example with a button in header .  >. I want uniform UI for all platform and in header I but button for back to list.

On the 'world /6_BrowsingPois_5_..../ index.html' of your example. I tried without success:

.....

<div id ="header-status" data-role="header" data-position="fixed" data-theme="b">

                <a href='#' onclick="closeWikitudePlugin()" >BACK</a>

                <a href="javascript: World.showRange();" >RANGE</a>

                <h1>POI</h1>

</div>

.........
<script>
......
function closeWikitudePlugin(){
document.location = 'architectsdk://action=closeWikitudePlugin'; 
document.location.href = '../../index.html'

} NOT WORK  

......

function closeWikitudePlugin(){
document.location = 'architectsdk://actionButton?action=close';
document.location.href = '../../index.html'

} NOT WORK  
......

function closeWikitudePlugin(){
app.WikitudePlugin.close;
document.location.href = '../../index.html'
} NOT WORK 
.......
function closeWikitudePlugin(){
window.history.back();
} NOT WORK 
</script>

Please help me.

Ok I find solution.

In script of main page (index.js) I have add :

 onUrlInvoke: function (url) {

----------

else if (url.indexOf('chiudiScreen') > -1) {

app.wikitudePlugin.close();

        }

--------- 

then in javascript of specific word

.......

var World = {

......

chiudiScreen: function chiudiScreenFn() {

  if (World.initialized) {

   document.location = 'architectsdk://button?action=chiudiScreen';

  }

 },

........

}

 

then html in button

........

<a href='javascript:World.chiudiScreen();' >Chiudi</a>

........

 

 

Ciao a tutti 

(y)

have fun using the Wikitude SDK and don't hesitate to asky any further question!

Best regards

Andreas

Hi Andreas,


I am new to this plugin. I have implemented with my license key in iOS. I am trying to implement customized back button in top of the AR world screen, incase swipe back is not working. Kindly please suggest me. It is important for my project.

Thanks.


Login or Signup to post a comment