【发布时间】:2009-08-01 06:55:13
【问题描述】:
如何在我的 Palm-Pre 应用程序中获得仪表板通知?
【问题讨论】:
-
感谢您提出如此清晰、详细的问题。我相信它会得到可能有用的答案......或者不是......
如何在我的 Palm-Pre 应用程序中获得仪表板通知?
【问题讨论】:
仪表板通知只是应用程序中的另一个视图。仪表板面板包含在 http://developer.palm.com/index.php?option=com_content&view=article&id=1632 的 Mojo SDK 文档中。
【讨论】:
调用 this.notify() 并声明 notify() 如下
YourAssistant.prototype.notify = function(custom,event) {
console.log("################# NOTIFY ############")
var target = custom;
var appController = Mojo.Controller.getAppController();
this.controller.commitChanges();
var bannerParams = {
soundClass: '',
soundFile: '',
icon: '',
messageText: 'hahaha hahaha'
}
appController.showBanner(bannerParams, {banner: this.message});
}
【讨论】: