How to fire deviceready event in Chrome browser (trying to debug phonegap project)

前端 未结 9 423
太阳男子
太阳男子 2020-12-23 16:09

I\'m developing a PhoneGap application and I\'d like to be able to debug it in Chrome rather than on the phone. However, I do the initialization of my code in an onDeviceRe

9条回答
  •  [愿得一人]
    2020-12-23 17:00

    Enhancing Chemik suggestion. The following code uses navigator.userAgent string to generically determine if the client browser is on a mobile platform.

    The purpose of the separation from desktop browsers is to allow code verifying prior to compiling/installing android apk, etc. It is much faster to make a quick code change, refresh desktop browser vs. compiling in eclipse and loading on android. Another added bonus is the ability to use weinre in one tab & the index.html from android assets in another tab (and use firebug).

    PS: weinre code is excluded since it has my private VPS info & UUID.

    thx!

    
    
    
    
    
    
    
    
    
    
    
    
    

提交回复
热议问题