Tag: mobile

Default Phonegap way of interacting with the Native code is to initiate a plugin request from Javascript, process in the Native code and reply the result with data which can be used in Javascript again. However many times it may require to update Javascript values or HTML DOM elements without initiating any plugin call from Javascript. Below code snippet uses a Plugin method as a gateway to call a Javascript method from Native Android code.

Example with full source code for Android is available here

By default PhoneGap File API creates only one directory at a time and the developer has to write the additional code in case nested directory structure is required. Below is an example of a small utility method which creates the nested directory structure based on the given path.