Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Silent push notification in android

I've been used urban airship for notification and it's working. Now client's requirement has been, he want to update a specific data (ie: current location) for client once any silent notification(no status bar notification) received. Could any one help me on this. Thanks

like image 399
Pankaj Avatar asked May 09 '26 18:05

Pankaj


1 Answers

There is a couple of ways to send a silent notification to android devices. If you are using the built in notification builders, the notification will return null when the alert is empty. If you are using a custom one, just make sure its returning null when the alert is empty.

Then, send a notification with an empty alert. It will still come through on the push broadcast receiver.

like image 69
ralepinski Avatar answered May 12 '26 09:05

ralepinski



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!