HTML5中的iOS/Android开发,我们可以访问硬件吗?
我们必须为 iPhone 和 Android 创建一个应用程序作为学校作业。我们都没有构建 iPhone 应用程序的经验。我们希望使用 HTML 和 Javascript 创建应用程序。是否可以使用 JavaScript 访问硬件?我们是否必须分别构建 Android 和 iPhone 应用程序,以便我们有另一个基础可供构建?
因为我在 Youtube 上看到了一个教程,其中您使用 Eclipse 来制作 Android 应用程序,就像您总是使用 R.view 方法和相关方法一样。
您不是导入 XML,而是导入 HTML5 和 CSS,但我们担心我们无法访问任何硬件,例如相机或加速器。
We have to create an application for iPhone and Android as a school assignment. None of us have any experience with building an iPhone app. We want to create the app with HTML and Javascript. Is it possible to access the hardware using JavaScript? Do we have to build an Android and iPhone app apart from each other so we have another base to build on?
Since I saw a tutorial on Youtube where you use Eclipse to make an Android app as you would always do with the R.view method and related methods.
Instead of importing XML you import HTML5 and CSS but we are afraid we can't access any hardware such as the camera or acceleration.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
原生 html 应用程序无法直接访问手机硬件,但您可以使用 phonegap。它充当手机操作系统和 HTML 应用程序之间的中间层。
Native html app can't access mobile's hardware directly, but you can use phonegap. It works as intermediate layer between phone OS and HTML app.