Class Storage#removeApplication
storage
- Defined in: storage.js
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Storage#removeApplication(successCallback, errorCallback, options)
Removes application stored in local or USB storage. |
Class Detail
Storage#removeApplication(successCallback, errorCallback, options)
Removes application stored in local or USB storage.
Current running application can't remove itself using this API.
(e.g. Application running from USB cannot remove itself using this API)
function removeApplication() {
var successCb = function (cbObject) {
console.log("Application removes successfully");
};
var failureCb = function(cbObject) {
var errorCode = cbObject.errorCode;
var errorText = cbObject.errorText;
console.log( " Error Code [" + errorCode + "]: " + errorText);
};
var options = {
to : Storage.AppMode.LOCAL
};
var storage = new Storage();
storage.removeApplication(successCb, failureCb, options);
}
- Parameters:
- {Function} successCallback
- success callback function.
- {Function} errorCallback
- failure callback function.
- {Object} options
Property Type Description Required to String Storage.AppMode required
- Since:
- 1.1
- Returns:
After the method is successfully executed, successCallback is called without any parameter. If an error occurs, errorCallback is called with errorCode and errorText.
- See:
- Storage.upgradeApplication()