IOS push notification banner - php

I am working in PHP. Now I want to send a notification that banner must not show on ios device but payload received by IOS device. This push notification will be sent from PHP.
Now I simply send the push notification in such a way that IOS device receive paylod only but must not show the banner and also not produce sound
{"aps":{"alert":"","badge":69,"sound":"","content-available":1,"mutable-content":1},"data":{"id":xxxxx,"badge":69,"type":"chat_message","message":"post.lambda sent you a message","content":"dmdnZ2c=","status":"S","sent_at":"2020-01-29T12:25:22Z","is_mute":true,"post":null}}
Above code that I write when I send this payload to IOS device then IOS device receive badge but not perform any other operation after receiving the notification
I did not found any solution that work perfectly in my case.

Related

what is the proper way to save a firebase push notifications sent

I'm using firebase push notifications php api with android...
When I send a notification from firebase API, to android device, I also make a MySQL input, to register one copy of that, and work!
but...
What happen when the API sends too many push notifications?
There is no problem with my shared server?
I'm worried that my server will collapse for too many records for each push.
Right now It work like this...
Firebase API PHP send notification -> MySQL register that notification in one table -> Android Device recieve the notification.
but I don't think this is the right way...
so... the question is...
what is the proper way to save a firebase push notifications sent...?

Telegram bot api: disable push notifications for sendMessage

I use telegram bot api to send messages to a channel. I need to disable push notifications for Android and IOS, but when I pass disable_notification = true, I don't get notifications for my desktop client, but my Android and IOS devices get push notifications (without sound).
Is it possible to disable push notifications for Android and IOS for telegram bot api and method send message?
P.S: I use PHP for sending messages to telegram.
No, the user should mute the bot.
disable_notification is only for channels.
From Bot API:
Sends the message silently. Users will receive a notification
with no sound.
The link refers to the channels
Now it's possible to pass disable_notification to sendMessage method -- https://core.telegram.org/bots/api#sendmessage
bot.sendMessage('chat_id', 'text', {disable_notification: true}

Notification from web site (HTML Table) to Android application in real time without using GCM

I am developing an android application and website as well, in this i want to send notification in real time from Admin panel to specific android application user. The main problem is that using GCM (Firebase CM) there is a token generated from android application and stored it in the database, using this token we can send message from admin panel to android application user. Is there is way that we can receive/send notification without using "token" because e.g. "Teacher send notification to students from Website to Student android application teacher just select the registration name or section and just type what he want to send and click send button. Notification should receive to that particular user.
How we can do it? Can any body help me?
Use Android service and call API as a background and check new entry in notification table, if found new entry display it as a notification
Without Device Token you can not send any notification from Admin Panel to Android App. To send notification FCM needs a unique ID that is Device Token.
To resolve your query:
You can use Alarm Manager or a Background Service that will call your API to check have any new message of teacher in your DB, if have any new message then generate a notification with that message.
Only Background Service is not a complete solution, it will only call your check new message API.
Your Alarm Manager that will trigger at any given time duration e.g. 30 sec and call your Background service.
That can help you without token.

Update passes of passbook

How to update passes of passbook by push notification. I get the pushtoken by webservice url. but i don't know how to update passes through push notification.
i am using simple php file for push notification.
check this, I use this code to send push notification to iOS, but I still finding for android
PHP Apple Enhanced Push Notification read error response

Apple Pushnotification Issue

I am new for apple push notification. I am currently working on ios app with chat funcationality. For this app, web-services are built in PHP.
There is a functionality, when user send a chat message to another user that time we send a push notification through PHP that web-service to message receiver user.
Notification working fine that I have checked.
Now issue is, sometimes push notification works fine but sometime its not.
So I want to know when ios push notification fails to send.
I have put write to log and log shows notification sent successfully.
Thanks in advance :)
You can use the Feedback service to get information about failed push notifications via APN:
https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/CommunicatingWIthAPS.html#//apple_ref/doc/uid/TP40008194-CH101-SW3
Looks like the link doesn't anchor to the section - so you will need to search for the entry
:( sry.
Hope that helps

Categories