Windows phone 8.1 javascript+html本地吐司通知
Windows phone 8.1 javascript+html local toast notification
我想在使用javascript和html构建的wp8.1应用程序上显示本地toast通知。我发现如何用c#和xaml做到这一点,但找不到任何地方如何用js和html做到这一点。它可以直接显示Hello world,稍后我会自己解决
我明白了。
是显示toast的消息。在manifest中,你必须启用toast通知。
function toast(message) {
document.getElementById("klik").innerHTML = "bla";
var toastTextElements = toastXml.getElementsByTagName("text");
toastTextElements[0].appendChild(toastXml.createTextNode(message));
var toastNode = toastXml.selectSingleNode("/toast");
toastNode.setAttribute("duration", "long");
var audio = toastXml.createElement("audio");
toastNode.appendChild(audio);
var toast = new notifications.ToastNotification(toastXml);
var toastNotifier = notifications.ToastNotificationManager.createToastNotifier();
toastNotifier.show(toast);
}
相关文章:
- Firebase2(Firebase.google.com)推送通知-从外部管理
- 无法在窗口内使用rootScope.通知
- JS,用于播放提示音以通知未按预期工作
- 单击Chrome通知后,转到已打开的选项卡
- Windows Azure通知中心错误
- Meteor应用程序上的警报/通知不会出现
- GCM推送通知,如果应用程序在手机中关闭(Phonegap Android)
- 在通知点击时使用Ion中的OneSignal插件路由到应用程序中的状态
- PHP/JS-EchoJs函数PHP curl发布后的通知
- 将属性设置为未定义时未通知观察者
- Acync JS HTTP请求通知请求
- 在渲染骨干视图时获得通知
- 是否可以使用推送通知Windows 8 Metro应用程序's使用Javascript
- 如果没有互联网连接,我想显示吐司,不知道该怎么做
- 在具体吐司中设计通知/警报的干净方法
- 吐司通知'覆盖'
- 只有当应用程序被激活时,吐司通知才会弹出
- Windows phone 8.1 javascript+html本地吐司通知
- 吐司机:吐司顶部居中;t第一次点击按钮就不会被应用
- 吐司在煎茶触摸中的实现