Initializing the PhoneGap Library for the Windows Mobile Hybrid Web Container

You must initialize the PhoneGap library before using it.

  1. Open the HTML file for the Hybrid App for editing.
  2. Add this code.
    <Html>   
    <script>   
    Function onLoad(){   
                    try   
                    {    
                                   
            cordova.require('cordova/channel').onDOMContentLoaded.fire();   
                                   
            cordova.require('cordova/channel').onNativeReady.fire();   
                                    _nativeReady = true;   
                    }   
                    catch(e)   
                    {   
                                    alert("Initialize
            phonegap error:" + e.message);   
                    }   
    }   
    </script>   
    <body onload=”onLoad();”>   
    </html>   
  3. Save the file.
  4. Regenerate the Hybrid App package.