Example usage:
This example demonstrates creating a call to the Alarm service to wake up your application after a specified interval:
this.alarm = new Mojo.Service.Request('palm://com.palm.power/timeout', {
method: 'set',
parameters: {
key: 'com.palm.app.news.update,
in: feedUpdateInterval,
uri: 'palm://com.palm.applicationManager/open',
params: {
id: 'com.palm.app.news',
params: {action: 'updateFeed'
}
}
},
onSuccess: this.onSuccessHandler,
onFailure: this.onFailureHandler
}
);
In this example, a new request object is created and stored in this.alarm. When the object is initialized, a service request is issued with the parameters provided.







0 Comments