Start a new topic
Solved

Ionic Angular Context Problem

So I have managed to write a wrapper for Ionic Capacitor (Angular flavor) , which makes the running of Wikitude Cordova Plugin possible.  The only issue right now is the 


 

AR.platform.sendJSONObject(markerSelectedJSON);

 


Because the function in Plugin 


 

WikitudePlugin.prototype.setJSONObjectReceivedCallback = function(onJSONObjectReceived) {
		cordova.exec(onJSONObjectReceived, this.onWikitudeError, "WikitudePlugin", "onJSONObjectReceived", [""]);
	};

 

works in a way that it passes a function   to the SDK , which is then executed on the page .



So if we have an angular page, where we start the sdk, I cannot pass to it some function which has like 


 

this.wikiSDK.close(); 

 Because this is undefined. 



Is there any way from withing the Architect World to tell the SDK to close itself ?



 



 

1 Comment

Seems the usage of new  sendJSONObject() function is useless when you use it in ionic/angular because you can just pass a javascript which runs somewhere out of context.

To have ability to close the Scanner we had to implement our own custom scheme logic .



Login or Signup to post a comment