使用phonegap构建网站移动应用程序的最佳解决方案
我正在构建一个类似网站的论坛,并提供一个移动版本,它将检测用户代理并返回基于 jQuery mobile 构建的页面。然而,如果有适用于 iPhone、Android 和其他平台的移动应用程序,这样用户就可以使用手机上的相机和 GPS 来上传图片并确定他们的位置,这将是很棒的。因此,我转向了 PhoneGap。
我是phonegap的新手,我想做的是:
- 为了阅读我的论坛内容,我如何重用我的移动版本
由于跨域通信,我正在考虑JSONP。但重新制作页面有点浪费。 (我需要解析JSON,并动态创建DOM元素)由于我的移动版本的页面具有所有页面元素,我可以简单地加载页面吗?
或儿童浏览器?加载我的移动版本网站?今天刚听说Childbrowser,有谁能分享一下经验吗?
2.开发一个帖子表单页面。 我将使用phonegap 的相机API。该表单页面是否也可以远程加载?
I'm building an forum like website and also provide a mobile version, which will detect user agent and return page built on jQuery mobile. However, it will be great to have its mobile application for iphone, android and other platform so user can use their camera and gps from mobile to upload picture and determine their location.Therefore, I turned into phonegap.
I'm new to phonegap and what I'm trying to do is:
- for reading my forum content, how can I reuse my mobile version
Due to the cross domain communication, I'm thinking JSONP. But it's kind of waste to re-produce the page. (I need to parse JSON, and dynamically create DOM element) Since my mobile version's page has all page elements, can I simply load the page?
or ChildBrowser? to load my mobile version website? Just heard Childbrowser today, can any one share experience?
2 . develop a post form page.
I'm going to use phonegap's camera api. is it possible for this form page also load remotely?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的第一个建议是查看提供的文档
http://docs.phonegap.com/
phoneGap 的 Google 群组非常棒,而且非常活跃
http://groups.google.com/group/phonegap
您应该能够阅读您的论坛内容创建一个允许从phoneGap应用程序进行AJAX调用的API
我不相信您会在phoneGap应用程序内部遇到跨域问题
非常彻底 相机演示
我在 上发布了一些与 PhoneGap 相关的内容我的博客
My first suggestion is to look at the documentation provided
http://docs.phonegap.com/
The google group for phoneGap is great, and very active
http://groups.google.com/group/phonegap
You should be able to read your forum content is you create an API that will allow for AJAX calls from the phoneGap Application
I do not believe you are going to have a cross-domain issue from inside the phoneGap Application
Pretty thorough Camera Demo Here
And I have posted some PhoneGap related stuff on my blog