10-23-2012 05:33 AM
Solved! Go to Solution.
10-23-2012 06:53 AM
I did manage to find the solution. Just go through this link & you are done:
Sorry to bother you all !
10-23-2012 08:41 AM
Note: You may discover as I did that these two interfaces are a bit limited in what you can send through them. They even appear to have different limitations. For example, in one of the directions, you can't send anything that contains embedded double-quotation marks, as I recall!
What you can do, if you don't want to be limited to simple strings or similarly primitive data, is encode the data before sending, and decode it upon receiving. There are routines that work on both sides for doing this.
In the WebView, you can use the global (i.e. on the "window" object) btoa() and atob() routines to encode to base64 before sending, or decode received messages that were base64-encoded in the QML side.
In QML, where we don't have the global window object, we do have the global Qt object, which has atob() and btoa() routines to match.
10-25-2012 07:09 AM
Thnaks buddy that was a pretty good description. and yeah, I found it a bit limited indeed.
Is there any api to create custom signals like messageReceived() signal for WebView? I need to insert data, update data etc in db when clicked on certain buttons in HTML. I want to create different interface for them.
var boolVar = navigator.cascade.createTable();
I guess single navigator.cascades.onmessage handler would make quite complicated.
10-25-2012 09:34 AM
10-25-2012 10:01 AM
Right now I did the way you suggested only. Still It would be better if we had different handler & could have been simpler to create cross applications. Anyways thanks a ton for replying