android – Corona sdk显示多行通知

我在Corona有一些通知.问题是,文本太大,我需要显示更大(多行)的通知,例如Gmail应用程序.以下是通知现在的样子:
enter image description here

这是我的代码:

local notificationOptions =
{
  alert = text,
  badge = 2,
  sound = "alarm.caf",
  custom = { foo = "bar" }
}

 local notification = notifications.scheduleNotification( nextScheduleTime +  ( day + math.floor(day/7)) * 24 * 60 * 60, notificationOptions )

知道怎么做吗?

默认情况下,通知不提供多行.

要使用多行,必须使用Java(sample)中的NotificationCompat.BigTextStyle()或使用自定义或本机自定义视图(example).

不幸的是,我还没有找到如何触摸默认视图以覆盖

手册:
https://docs.coronalabs.com/daily/guide/events/appNotification/index.html#TOC

和这里:
https://docs.coronalabs.com/daily/plugin/notifications/scheduleNotification.html

在第二个链接中,您可以看到只使用了以下属性:

alert (optional) String. The notification message to be displayed to
the user. If the application is not currently running, a system alert
will display this message. badge (optional) Number. The badge number
to be displayed on the application icon when the scheduled
notification triggers. This replaces the last badge number that was
applied. Set to 0 to omit the badge number. This option is not
supported on Android. sound (optional) String. Name of the sound file
in the system.ResourceDirectory to be played when the scheduled
notification triggers. This sound is only played if the app is not
currently in the foreground. On iOS, there are limitations on the
kinds of sound that can be played (consult Apple’s documentation for
more details). custom (optional) Table. A table that will be delivered
with the notification event. This allows you to pass custom
information with the notification.

总之,现在没有适当的方法来做到这一点.

转载注明原文:android – Corona sdk显示多行通知 - 代码日志