Inject Code In Inapp Browser And Get It's Return Value In The App
I am writing a phonegap app, that's starting a web app inside an inAppBrowser. I would like to get certain feedback from this web app to use it further in my phonegap app. So the u
Solution 1:
Just a wild guess, but you're not executing this function...
{code: "var evaluateFeedback = function(){return 'Done';};evaluateFeedback();"}
or better: {code: "'Done';"}
Solution 2:
ref.addEventListener('loadstart', function(event){
//alert('start: ' + event.url);
});
ref.addEventListener('loadstop', function(event){
//alert('stop: ' + event.url);
});
ref.addEventListener('loaderror', function(event){
//alert('error: ' + event.message);
});
ref.addEventListener('exit', function(event){
});
Use above for events for taking return value back in the application
Solution 3:
check out this, it might be something you are looking for here
Solution 4:
In the code
string value, define a function and call it. The return value will come back in the callback's argument (or in ngCordova as the promise' resolved argument). Thanks to @Jonathan Adami for the suggestion.
Post a Comment for "Inject Code In Inapp Browser And Get It's Return Value In The App"