Can i still use my own jsscript even if I use InAppBrowser plugin?

32 visningar
Hoppa till det första olästa meddelandet

StefDelDestino

oläst,
27 juli 2016 11:34:132016-07-27
till phonegap
Hi,

We are making an app. We load pages from our responsive website. However I'd like to test the network informationvia the network plugin. If there is connection, no prob. If there is not or phones lose internet connection, i'd like to launch a " custom no connection webpage".

However if I do 
window.open(urlOfRedirection, '_self ', 'location=no');
My script oaded from index.html of Cordova is not in action anymore.

Should I use an Iframe or am I missing something?

Thanks,

Stéphane.

Kerri Shotts

oläst,
28 juli 2016 11:54:482016-07-28
till phonegap
My guess is that you're wrapping a web site. Don't do that, because you'll have the problem you're trying to solve: what if the user has no (or a bad) network connection?

Keep your UI code local and let it load your data via XHR. At that point you can determine how to handle the case of a non-existant or bad network connection gracefully (including using cached data, displaying a friendly error message, retrying a few times, etc.)

If you want to update outside of the app store review process, that's fine, but you can do so using code pushes. Microsoft has one that seems to be really good: http://microsoft.github.io/code-push/



On Wednesday, July 27, 2016 at 10:34:13 AM UTC-5, StefDelDestino wrote:
...

jcesarmobile

oläst,
29 juli 2016 14:48:282016-07-29
till phonegap
And if you don'tfollow Kerri's advice (you should),if you want to use cordova plugin APIs when you are loading an external website, you have to upload the cordova.js and some other files to your server, and each OS need a different cordova.js

James Henderson

oläst,
9 nov. 2016 09:25:242016-11-09
till phon...@googlegroups.com
@ jcesarmobile, yes, I achieved this before (by putting various cordova js files on the server), but I am having trouble, please can someone help with a working example?

On 29 July 2016 at 19:48, jcesarmobile <jcesar...@gmail.com> wrote:
And if you don'tfollow Kerri's advice (you should),if you want to use cordova plugin APIs when you are loading an external website, you have to upload the cordova.js and some other files to your server, and each OS need a different cordova.js

--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en

For more info on PhoneGap or to download the code go to www.phonegap.com
---
You received this message because you are subscribed to the Google Groups "phonegap" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phonegap+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Svara alla
Svara författaren
Vidarebefordra
0 nya meddelanden