iOS Question About remote notifications

mauro vicamini

Active Member
Licensed User
Longtime User
Hi,
I've an application that could recive remote notifications: if I open the notification the app is started and the notification is read and registered, but if I recive the notification and I open directly my app (without touching the notification) the notification is not read and not registered.
How could I do to discover if I've recived a remote notification opening directly my app and not touching the notification?
I call CheckForPushMessage in my Application_Start sub, and CheckForPushMessage is defined so :

B4X:
Private Sub CheckForPushMessage
   If App.LaunchOptions.IsInitialized And _
     App.LaunchOptions.ContainsKey("UIApplicationLaunchOptionsRemoteNotificationKey") Then
     Dim data As Object = App.LaunchOptions.Get("UIApplicationLaunchOptionsRemoteNotificationKey")
     Dim no As NativeObject = App
     no.GetField("delegate").RunMethod("application:didReceiveRemoteNotification:", _
       Array(App, data))
   End If
End Sub

But also with this code I don't get the notification.

I hope to have been clear enough.

Thanks a lot
 
Top