Document Viewers
Applications can use the Application Manager's open method with a target URI that points to a file encoded in a supported file format to view common office files from the /media partition. Several common office file formats are supported. For a full list of file formats, see Resource Types.
Examples
luna-send
luna://com.palm.applicationManager/open '{ "target": "http://www.somewebsite.com/InApp.jpg"}}'
{ "processId": "success", "returnValue": true }
Enyo
. . .
{
name: "openDocViewerCall",
kind: "PalmService",
service: "palm://com.palm.applicationManager/",
method: "open",
onSuccess: "openFinished",
onFailure: "openFail",
onResponse: "gotResponse",
subscribe: true
},
. . .
openFinished : function(inSender, inResponse) {
enyo.log("Open success, results=" + enyo.json.stringify(inResponse));
},
openFail : function(inSender, inResponse) {
enyo.log("Open failure, results=" + enyo.json.stringify(inResponse));
},
openDocViewer : function(inSender, inResponse)
{
this.$.openDocViewerCall.call({"target": "http://www.palm.com/us/support/handbooks/800W_Sprint_Datasheet.pdf"});
}
Mojo
this.controller.serviceRequest('palm://com.palm.applicationManager', {
method: 'open',
parameters: {
target: "http://www.palm.com/us/support/handbooks/800W_Sprint_Datasheet.pdf"
}
});
this.controller.serviceRequest('palm://com.palm.applicationManager', {
method: 'open',
parameters: {
target: Mojo.appPath + 'documents/Welcome_to_webOS_development.doc'
}
});