iOS Question send notifications question

ilan

Expert
Licensed User
Longtime User
hi

i am using firebase in my b4i app (also on all of my b4a apps) to send push notifications.

in b4a when a notification is arrived i get the text of the body and create the notification and show it. like this i can also dont show the notification if i want and still use the sent text to other purpose.

is it also possible in b4i? i want to use the text for something else and not show a notification when the app receives a specific text.

thanx
 

tufanv

Expert
Licensed User
Longtime User
hi

i am using firebase in my b4i app (also on all of my b4a apps) to send push notifications.

in b4a when a notification is arrived i get the text of the body and create the notification and show it. like this i can also dont show the notification if i want and still use the sent text to other purpose.

is it also possible in b4i? i want to use the text for something else and not show a notification when the app receives a specific text.

thanx

I couldnt exactly understand the uestion but do you mean the part where you can delete the msgbox line and just use the message for anything else ?

B4X:
Private Sub Application_RemoteNotification (Message As Map, CompletionHandler As CompletionHandler)
   Log($"Message arrived: ${Message}"$)
   Msgbox(Message, "Push message!")
   CompletionHandler.Complete
End Sub
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
No @tufanv i mean when the app is in background and i send to it a notification i dont want to show the notification i just want to use the text to a different use (only when app is in forground) so in forground there is no problem since no notification will be shown.

I guess i just need to remove app.registerforusernotofication (will try it when i am on my pc)

:)
 
Upvote 0

JanPRO

Well-Known Member
Licensed User
Longtime User
Upvote 0

tufanv

Expert
Licensed User
Longtime User
Yes deleting it will solve it . I had forgotten to add the line to my code so the notificaiton was only coming when the app is on foreground =)
No @tufanv i mean when the app is in background and i send to it a notification i dont want to show the notification i just want to use the text to a different use (only when app is in forground) so in forground there is no problem since no notification will be shown.

I guess i just need to remove app.registerforusernotofication (will try it when i am on my pc)

:)
 
Upvote 0
Top