This is a migrated thread and some comments may be shown as answers.

InAppBrowser Events Not Firing

5 Answers 250 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Tom
Top achievements
Rank 1
Tom asked on 30 May 2013, 02:42 AM
Hey,

Would you have any idea why the InAppBrowser events are not firing.  I tried the sample app (https://github.com/Icenium/sample-in-app-browser.git) and in my own.  I get the browser to pop up but events don't seem to fire.  Note I'm working in the Graphite Simulator.

From the InAppBrowser documentation at http://cordova.apache.org/docs/en/2.4.0/cordova_inappbrowser_inappbrowser.md.html
var ref = window.open('http://apache.org', '_blank', 'location=yes');
ref.addEventListener('loadstart', function() { alert('start: ' + event.url); });
ref.addEventListener('loadstop', function() { alert('stop: ' + event.url); });
ref.addEventListener('exit', function() { alert(event.type); }); Are you able to see the alerts? I may be a block head but I don't see how the loadstart would ever fire since it could have already fired before it is hooked up. I assume I'm missing something as this is straight from the docs. Thanks for the help, Tom

5 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 30 May 2013, 02:11 PM
Hello Tom,

In the current version of Icenium InAppBrowser is not supported in the simulator and you should run it on an actual device in order to see it in action. We're already working on adding its functionality to our simulator for the next version of the product.

Regards,
Steve
Telerik

Don't miss the Icenium May Release Keynote - sign up now!
Share feedback and vote for features on our Feedback Portal.
0
Tom
Top achievements
Rank 1
answered on 30 May 2013, 07:28 PM
Thanks for the update Steve.  Couple Things:

1) I may be doing something wrong, but the events don't fire in Ion either as far as I can tell.  I don't see the alert.
2) I discovered InAppBrowser from a post that said it did work including a video http://www.icenium.com/resources/forums/icenium-general-discussion/childbrowser-plug-in-how-to-use-it-#sJO-mpnKoEyZRuFE8B1kwQ  (In fairness the video did not show the events though)
3) If it is not supported in the Simulator, it would be really really appreciated if the demo apps could say that it is not supported in the simulator.  I'm wasting time trying to figure out if it is my issue, Iceniums, or the plugin itself.  I hope you understand.

Any ETA on when the next release with InAppBrowser will be available and working?

Thanks again, you guys are great!
Tom
0
Steve
Telerik team
answered on 31 May 2013, 03:33 PM
Hi Tom,

The problem is that the javacript from the Cordova documentation for v.2.4 is wrong, you can see the correct javascript should you open the documentation for Cordova v.2.6 (use the dropdownlist from the top right corner). The problem is that the function is missing the argument that is used in the alert and obviously iOS decided not to execute this broken js. Should you add the event argument, it would fire as expected.

Cordova plug-ins are not supported in the simulator and they would never be. We would add a warning to the simulator whenever an user is trying to utilize a plug-in, to avoid confusion and of course not to waste anyone's time.

We appreciate your feedback, do let us know if you notice something else!

Regards,
Steve
Telerik

Don't miss the Icenium May Release Keynote - sign up now!
Share feedback and vote for features on our Feedback Portal.
0
Venkat
Top achievements
Rank 1
answered on 21 Mar 2014, 05:31 AM
This still seems to be an outstanding issue - events not firing in Simulator.
Can somebody please confirm?
After a few hours of trying different things, i discovered this post. 
0
Venkat
Top achievements
Rank 1
answered on 21 Mar 2014, 09:41 AM
Just a quick feedback.. Seems to be working fine now
Tags
General Discussion
Asked by
Tom
Top achievements
Rank 1
Answers by
Steve
Telerik team
Tom
Top achievements
Rank 1
Venkat
Top achievements
Rank 1
Share this question
or