android - Cordova 通知中的多行消息

标签 android ios cordova notifications cordova-plugins

我想通过使用带有多行消息的 Cordova Notification 插件在 Intel XDK 中显示通知,例如:

  • 第 1 行
  • 第 2 行
  • 第 3 行

我四处搜索并尝试使用“\n”或“\r\n”或“\n”之类的解决方案,但它们都不起作用。

我应该如何解决这个问题或 Cordova Notification 插件不支持多行消息?

最佳答案

这行不通

navigator.notification.alert("break<br>the line",null,"Test","OK");

这行得通

navigator.notification.alert("break \r\n the line",null,"Test","OK");

关于android - Cordova 通知中的多行消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31107363/

相关文章:

javascript - 从模板生成的列表中获取 html 数据 - JQuery

android - iOS 中的 "Library projects"

android - Activity 在切换到黑暗/夜间主题之前快速闪烁白色

android - 为什么 "tcsetattr(fd, TCSANOW, &cfg)"总是失败?

ios - heightForHeaderInSection 中的未捕获异常

android - 在 phonegap/cordova 应用程序中设置 Android 6.x (Marschmallow) 上的应用程序权限

c# - Azure 网站的 VS2013 Cordova 插件和 X-Frame-Options header 问题

javascript - Android webview加载本地javascript

ios - 多个整数——它们不同时工作(Obj-C)

ios - 如何检查是否安装了特定应用程序?