1. There is often a cache clearing operation in the app, as follows
1. Get the cache size
apiready = function() { api.getCacheSize(function(ret, err) { // size: // The size of the cache, the unit is Byte, the number type. (-1: no storage device, -2: preparing USB storage device, -3: storage device cannot be accessed) var size = parseInt(ret.size/ 1024 ) + ' KB ' ; var cacheSize = $api.byId( ' cacheSize ' ); cacheSize.innerHTML = size; }); };
2. Clear the cache method
function clearnCach(){ api.clearCache(function() { api.toast({ msg: ' Clear complete ' }); }); api.getCacheSize(function(ret, err) { var size = parseInt(ret.size/1024) + 'KB'; var cacheSize = $api.byId('cacheSize'); cacheSize.innerHTML = size; }); };
2. Make a phone call
// make a call function takePhone() { api.call({ number:'029-83670111' }); };