Start a new topic

Example with backbutton

Hi Wikitude team,


I have purchased license for the plugin after successful trial,


As per client request i just need to add back button functionality on custom click. I have trying to implement from Marco cecchenni's comment. I just need to know what exactly index.js from his comments. Kindly please help me with this. I am trying this functionality from past month. I am struck with client too.


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 


Hello,


Could you please provide following details:

  • Which version of the SDK are you using?
  • Are you working with the JS API or the Native API?
  • Are you using Cordova?
  • Do you have a crash log?
  • Can you provide steps to reproduce the crash - ideally with the SDK sample app?


Thx and greetings

Eva

Hi Eva,


Thanks for your reply.


Please find following details:

  • Wikitude plugin version 9.5.0.
  • Using JS API with Ionic Angular.
  • Yes using cordova for both Android and iOS.
  • No crash has occured.
  • Same as no crash occured
Actually i am trying to implement custom button in JS which will be called from  WikitudePlugin.loadARchitectWorld(success,error,ArchitectreferencePath)
ArchitectreferencePath   refers to custom Index.html with js and jquery files.
I have added custom button in index.html and wrote function for the same in JS.Here what i need is to close the architect world on clicking custom button with suggested code app.WikitudePlugin.close() but it is throwing app is not defined. It is not recognizing the app since it is in different path to plugin path and app.WikitudePlugin.close() is in jasvacript code but in typescript. Now i need to close the with custom button. I have tried different solutions but nothing works. Kindly please help me with this.

 

Login or Signup to post a comment