@@ -22,6 +22,7 @@ public class AndroidTest : MonoBehaviour
22
22
private int _notificationExplicitID ;
23
23
private Button ButtonModifyExplicitID ;
24
24
private Button ButtonCancelExplicitID ;
25
+ private Button ButtonCheckStatusExplicitID ;
25
26
26
27
public int notificationExplicitID
27
28
{
@@ -32,6 +33,7 @@ public int notificationExplicitID
32
33
bool buttonsEnabled = _notificationExplicitID != 0 ;
33
34
ButtonModifyExplicitID . interactable = buttonsEnabled ;
34
35
ButtonCancelExplicitID . interactable = buttonsEnabled ;
36
+ ButtonCheckStatusExplicitID . interactable = buttonsEnabled ;
35
37
}
36
38
}
37
39
@@ -60,6 +62,7 @@ void OnNotificationReceivedHandler(AndroidNotificationIntentData notificationInt
60
62
. Properties ( notificationIntentData . Notification , 1 ) ;
61
63
if ( notificationIntentData . Id == notificationExplicitID )
62
64
{
65
+ AndroidNotificationCenter . CheckScheduledNotificationStatus ( notificationExplicitID ) ;
63
66
notificationExplicitID = 0 ;
64
67
}
65
68
}
@@ -119,6 +122,8 @@ private void InstantiateAllTestButtons()
119
122
//m_groups["Modify"]["Create notification preset"] = new Action(() => { });
120
123
m_groups [ "Modify" ] [ "Modify pending Explicit notification" ] = new Action ( ( ) => { ModifyExplicitNotification ( ) ; } ) ;
121
124
m_groups [ "Modify" ] [ "Cancel pending Explicit notification" ] = new Action ( ( ) => { CancelExplicitNotification ( ) ; } ) ;
125
+ m_groups [ "Modify" ] [ "Check status of Explicit notification" ] = new Action ( ( ) => { CheckStatusOfExplicitNotification ( ) ; } ) ;
126
+
122
127
123
128
m_groups [ "Send" ] = new OrderedDictionary ( ) ;
124
129
foreach ( AndroidNotificationTemplate template in Resources . LoadAll ( "AndroidNotifications" , typeof ( AndroidNotificationTemplate ) ) )
@@ -130,6 +135,7 @@ private void InstantiateAllTestButtons()
130
135
{
131
136
Title = template . Title ,
132
137
Text = template . Text ,
138
+
133
139
SmallIcon = template . SmallIcon ,
134
140
LargeIcon = template . LargeIcon ,
135
141
Style = template . NotificationStyle ,
@@ -236,6 +242,9 @@ private void InstantiateAllTestButtons()
236
242
ButtonModifyExplicitID . interactable = false ;
237
243
ButtonCancelExplicitID = GameObject . Find ( "Modify/Cancel pending Explicit notification" ) . GetComponent < Button > ( ) ;
238
244
ButtonCancelExplicitID . interactable = false ;
245
+ ButtonCheckStatusExplicitID = GameObject . Find ( "Modify/Check status of Explicit notification" ) . GetComponent < Button > ( ) ;
246
+ ButtonCheckStatusExplicitID . interactable = false ;
247
+
239
248
m_gameObjectReferences . ButtonGroupTemplate . gameObject . SetActive ( false ) ;
240
249
}
241
250
@@ -261,6 +270,13 @@ public void CancelExplicitNotification()
261
270
. Blue ( $ "[{ DateTime . Now . ToString ( "HH:mm:ss.ffffff" ) } ] Call { MethodBase . GetCurrentMethod ( ) . Name } ") ;
262
271
}
263
272
273
+ public void CheckStatusOfExplicitNotification ( )
274
+ {
275
+ m_LOGGER
276
+ . Blue ( $ "[{ DateTime . Now . ToString ( "HH:mm:ss.ffffff" ) } ] Explicit notification (ID:{ notificationExplicitID } ) status: { AndroidNotificationCenter . CheckScheduledNotificationStatus ( notificationExplicitID ) } ") ;
277
+
278
+ }
279
+
264
280
public void SendNotification ( AndroidNotification notification , string channel = "default_channel" , int notificationID = 0 , bool log = true )
265
281
{
266
282
if ( log )
0 commit comments