diff --git a/lib/apploader.js b/lib/apploader.js index d29a15f..0080fe3 100644 --- a/lib/apploader.js +++ b/lib/apploader.js @@ -26,6 +26,15 @@ var apps = []; var device = { id : DEVICEID, appsInstalled : [] }; var language; // Object of translations +/* This resets the list of installed apps to an empty list. + It can be used in case the device behind the apploader has changed + after init (i.e. emulator factory reset) so the dependency + resolution does not skip no longer installed apps. +*/ +exports.reset = function(){ + device.appsInstalled = []; +} + /* call with { DEVICEID:"BANGLEJS/BANGLEJS2" VERSION:"2v20"