Getting an Access of Android Java Code to a PhoneGap JavaScript.
PhoneGap Provides a standard set of functions available in PhoneGap docs to access the internal Device Details like the list of the phone numbers, access to camera etc. Apart from this standard functions, if our requirements extends then these available functions, then we need to create our own custom logical functions which access the internal device hardware details like 'imei' number etc or to apply some custom logic or validate the data and then make it available to PhoneGap, then this article helps to do the same. Though PhoneGap provides the 'imei' number through the standard function 'device.uuid' but in Android 2.1, it is still an issue. For such cases we need to take the help of the Native Android Java Code and then make it accessible to PhoneGap, here is how we will be doing the same. Following example is of getting the device's 'imei' number through the Android's TelephonyManager class and then make it available to Pho...