diyDevApp
diyDevApp copied to clipboard
Cordova Plugin Inappbrowser Giving Errors on run
App is built , cordova plugin has been added. But, when the inappbrowser is called, it is giving the following error
ReferenceError: cordova is not defined
at openBrowser (http://10.90.84.82:8100/js/services.js:101:7)
at http://10.90.84.82:8100/js/services.js:322:22
at http://10.90.84.82:8100/lib/ionic/js/ionic.bundle.min.js:162:305
at m.$eval (http://10.90.84.82:8100/lib/ionic/js/ionic.bundle.min.js:176:467)
at m.$digest (http://10.90.84.82:8100/lib/ionic/js/ionic.bundle.min.js:174:47)
at b.$apply (http://10.90.84.82:8100/lib/ionic/js/ionic.bundle.min.js:177:249)
at HTMLButtonElement.
Good one!
I think the injection plugin does inject cordova.js in the new window
I can look at it next week probably but likely needs some investigation with the plugin itself
kool thanks..kindly keep me posted. Great Work by the way, Its way more flexible and easy to work with
i think the issue is with deviceready not being fired before the browser is called.
Ok. So consider closed? Otherwise plse post the code u use
No, please dont close it. I don't have the solution, i just found a probable cause. In my current app, the inappbrowser is called for oAuth authorization in the start, which might not be working for DevApp context. So now i will try to create another client app where i call inappbrowser inside a button or something and will see what happens.
Thanks
Nope, inappbrowser not opening at all. Although, deviceready is being fired due to which i am not getting Cordova Not Defined error.
Created a simple project with a button to open the browser https://github.com/thesourav123/devapp_testing .
ok. will test myself next week.
Can't reproduce with your repo - the button click does not trigger event (even after fixing small syntax issue on line 31 of app.js). Iam not into angular v1 to check how to get event handling done.
Mine seems to work: https://github.com/Tommertom/inappbrowsertest
After adding inAppBrowser to diyDevApp: ionic cordova plugin add cordova-plugin-inappbrowser