iOS Question Automatic opening of the application when receiving a push

mehdipass

Member
How we can open app automatically when receive push? (App is close)
Is there such a possibility?
Sub:
Private Sub Application_RemoteNotification (Message As Map, CompletionHandler As CompletionHandler)
This sub raised when the user clicks on the notification or app is open.
 

Alexander Stolte

Expert
Licensed User
Longtime User
How we can open app automatically when receive push? (App is close)
Is there such a possibility?
I just call B4XPage.ShowPage in this event to show a special page if i click on a notification.

Some code:
B4X:
Private Sub Application_RemoteNotification (Message As Map, CompletionHandler As CompletionHandler)
B4XPages.ShowPageAndRemovePreviousPages("b4xp_main") 'shows the main page and close the previous page, if open

B4XPages.ShowPage("b4xp_notifications") 'Now i open the notification page
'if i now close the notification page, then i'm on the Main page again

CompletionHandler.Complete 'and i call this on the end of this sub
End Sub
 
Upvote 0
Top