Difference between revisions of "NotificationManager:getPushNotifications"

From GiderosMobile
Line 8: Line 8:
 
  NotificationManager:getPushNotifications()
 
  NotificationManager:getPushNotifications()
 
</source>
 
</source>
 +
=== Examples ===
 +
'''Here is an example structure of returned table:'''<br/>
 +
<source lang="lua">Table {
 +
[2] => Table {
 +
{
 +
[message] => Do you see me?
 +
[title] => Test from Server1
 +
[id] => 2
 +
[number] => 0
 +
[sound] => "somesound.wav"
 +
}
 +
[10] => Table {
 +
{
 +
[message] => Do you see me?
 +
[title] => Test from Server2
 +
[id] => 10
 +
[number] => 0
 +
[sound] => ""
 +
}
 +
}</source>

Revision as of 11:38, 23 August 2018

Available since: Gideros 2011.6

Description

Retrieves the lua table of received push notifications. On Android all pushed notifications appear here, but on IOS only pushed notifications that user clicked on or that were received while application was in foreground appear here.

You must provide an ID on the server to identify your push notification in this list.

 NotificationManager:getPushNotifications()

Examples

Here is an example structure of returned table:

Table {
	[2] => Table {
		{
			[message] => Do you see me?
			[title] => Test from Server1
			[id] => 2
			[number] => 0
			[sound] => "somesound.wav"
		}
	[10] => Table {
		{
			[message] => Do you see me?
			[title] => Test from Server2
			[id] => 10
			[number] => 0
			[sound] => ""
		}
}