For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 5 replies, 3 voices, and was last updated 14 years ago by
cng_1.
-
AuthorPosts
-
cng_1MemberIs there a coding standard for mobione about when to use javascript directly or use something in the mobione library ?
window.open vs phoneui.gotoURL is one in question. It looks like phoneui.gotoURL is doing some house keeping steps vs if you call window.open directly. Would calling window.open directly cause problems ?
Is there a difference calling these functions in phonegap vs the mobione app?Is there a reference document for mobione created functions and what they replace or when they should be used?
thank you.
July 21, 2012 at 12:10 pm #328382
cng_1MemberWaiting on reply from support please.
July 24, 2012 at 6:57 pm #328445
support-michaelKeymaster>Would calling window.open directly cause problems ?
Yes, as I recall that it is not supported consistently across devices. I don’t recall the details but there were some crazy quirks. For example iOS ipad2 gave us fits – the entire browser would crash in some situations. We originally used window.open but introduced the phoneui api to provide a higher layer for additional compatibility over time.
>Is there a difference calling these functions in phonegap vs the mobione app?
I will check with the dev team on if there are key differences. I do know that the phoneui api takes into account the environment of your app, e.g., native, webapp, running the test center…
>Is there a reference document for mobione created functions and what they replace or when they should be used?
No doc that describes the deep technical background behind some of the apis. Most of them were derived from school of hard-knocks as we have worked across different platforms and devices. It will continue to evolve as the platforms evolve.
We are planning to move much of this api to more formal programmer centric resources. Its a function of man-power atm and that we planning to introduce a full ui widget api.
August 5, 2012 at 9:50 am #328778
cng_1Member>Is there a difference calling these functions in phonegap vs the mobione app?
>>I will check with the dev team on if there are key differences. I do know that the phoneui api takes into >>account the environment of your app, e.g., native, webapp, running the test center…
Did the dev team say anything about this ? Should we NOT use window.open for now????
Thank you.
August 6, 2012 at 12:52 pm #328814
support-octavioMemberHi cng_1,
The dev team recommended using phoneui.showURL(“URL”, “_blank”) to open an external window and phoneui.showURL(“URL”, “_self”) to open a URL in the app window.
The reason is because:
1) window.open works differently across different platforms and between web apps and native apps. showURL works around these differences to provide a consistent set of behavior.
2) showURL works around some bugs that exist with opening sms:// and tel:// URLs on certain platforms.August 6, 2012 at 2:57 pm #328820
cng_1MemberThank you.
-
AuthorPosts
