Phonegap web app in regular desktop browsers

前端 未结 18 1926
深忆病人
深忆病人 2020-12-08 02:27

If I develop a web app in phonegap, can the same web app be made to run in regular desktops/laptops inside a browser?

18条回答
  •  佛祖请我去吃肉
    2020-12-08 02:46

    As Remy said, most of the standard stuff you write will be fine, but you'll need to wrap certain methods that use the camera/accelerometer to see if you're in an app or not.

    Athough a better solution is to use feature detection, as you can upload pictures and use the camera with the HTML input in a mobile website, I'm pretty sure you can access the web cam in certain versions of Desktop Chrome now.

    If you want to build a properly universal app, you'll need to use lots of feature/device detection, or have a central core product, and use something like Git Submodules to include and extend it as a Phonegap app.

    There is no single, easy, standardised way of doing it.

提交回复
热议问题