Simplified and added improved non-webOS fallback
diff --git a/cordova-js-src/webos/service.js b/cordova-js-src/webos/service.js
index 315cb4a..d3caf70 100644
--- a/cordova-js-src/webos/service.js
+++ b/cordova-js-src/webos/service.js
@@ -53,6 +53,10 @@
LS2Request.prototype.send = function() {
if(!window.PalmServiceBridge) {
+ this.onFailure && this.onFailure({errorCode:-1,
+ errorText:"PalmServiceBridge not found.", returnValue: false});
+ this.onComplete && this.onComplete({errorCode:-1,
+ errorText:"PalmServiceBridge not found.", returnValue: false});
console.error("PalmServiceBridge not found.");
return;
}
@@ -113,6 +117,6 @@
var req = new LS2Request(uri, params);
return req;
},
- systemPrefix: ((isLegacy) ? "com.palm." : "com.webos."),
+ systemPrefix: "com.webos.",
protocol: "luna://"
};