PhoneGap API Framework Not Invoked on Device

On iOS devices, there is no error message, but the PhoneGap framework API is not invoked.

On Android devices, you may receive the error Error:Can't find the variable:device.

Explanation: The PhoneGap APIs cannot be accessed successfully until certain initialization has taken place. If you make calls to the PhoneGap API from the customAfterShowScreen function, they should occur only after the PhoneGap subsystem is initialized and ready to execute these calls. For more information, see http://wiki.phonegap.com/w/page/36868306/UI%20Development%20using%20jQueryMobile#HandlingPhoneGapsdevicereadyevent