I'm using PushWoosh services for handling push notifications on my PhoneGap based app.
But i have a problem with handling native push messages.
If i send the push notification over PushWoosh API or Management Panel it comes to device like this:
{"title":"test message","collapse_key":"do_not_collapse","from":"400481817113","onStart":false,"foreground":true,"p":"["}
But if i send the push notification via Google Native Push Services with this payload:
{"title":"test title"}
It comes to device as:
{"message":"{\"title\":\"test title\"}","collapse_key":"do_not_collapse","from":"400481817113","onStart":false,"foreground":true}
So this cause the title not shown on the notification ğanel if i send the push message over Google Services.
Here's my question: How can resolve this? What is the best way to show title on notification panel with sending message via Google?
Edit:
I found the problem on myself :) My code was using json_encode as twice to encode the message. I remove one of them and the problem was
resolved.
Related
I have a net core Back-End (3.1).
I created a page in which admin should enter title and description and pick a user to send a notification.
I want to send notification payload to Apple devices and not to an android device similar to a custom notification.
there is a platform-specific notification in Firebase Cloud Messaging documentation .
However, I was not able to implement it .
If you wanna only send the notification to Apple devices only. Then APNS Push notification push gateway will be suitable for you. See here
Certainly, FCM can also deal with this issue. You need to add the ApnsConfig to your request and send it to the FCM server.
If you cannot implement it, you need to mention more detail about your issue (trace log, exception info, etc.)
We have an app built in React which uses OneSignal via a PHP API to send push notification. Everything looks to be working according to the OneSignal dashboard however no notifications are being received on the device. However we can manually send a test from OneSignal and it comes through to the device.
We have been through the troubleshooting and FAQs on OneSignal but nothing seems to help.
OneSignalMessage::create()
->subject($subject)
->body($this->message->content)
->setData('to', $this->message->chat->makeUrl($notifiable->club))
->setParameter('ios_badgeType', 'Increase')
->setParameter('ios_badgeCount', 1);
One nuance: "Delivered" refers to the notification request being delivered to Apple and Google. It does not confirm that the device itself received it. Please contact our support channel at OneSignal.com for further support.
I am developing a Cordova app having a Java backend. I want to know if it's mandatory to use GCM service in order to show a push notification in Android/iOS (in notification tray)?
I am using Apache Kafka, MQTT brokers in my backend. Is it possible to show push notification using these solutions, i.e. using completely self defined solutions?
Using MQTT & other brokers I am able to send realtime data to users but how to show those message as native notification in notification bar is my problem.
Yes, you will need to use GCM to send push notifications to Android devices. You can even use GCM to send push notifications to iOS devices (GCM makes request to APNS (Apple push notification service) to make it work).
But GCM for iOS isnt trusted much.
You can use any backend to send push notification to your devices. You just need to make a request to GCM/APNS.
This is the cordova plugin for push notification.
Integrating with GCM is damn easy, but it takes a little effort with APNS.
Most people use third party paid services like Pushwoosh to implement their push backend because its convenient. There is a free alternative OneSignal but it tracks your usage.
Follow this guide to setup push for APNS. (You can just use the Setup certificate part from this guide, since you are not using C#)
To receive push you need use/implement GCM(and actually FCM, because of GCM deprecation)
To show notification from app it is unnecessary to implement GCM/FCM
I'm trying to figure out a way to send data from a server to a particular android device having my app.so i came across Google cloud messaging service. i wanted to know if its possible to directly send information to my application on a phone from a php web application without showing a notification in the status bar? from all the examples Ive seen, it looks like a push notification is always sent. i would just like my app to directly receive the data without showing any push notification.is it possible? any help is gratefully accepted.
Yes, you have 100% control over what your application does upon receiving a push message. Looking at the sample receive message code, you can see that the GcmIntentService they build to handle the message can run any code you'd like - including or not including sending a notification.
I'm using Urban Airship to handle the push notifications (for Android) and I know they have inbox functionality but it works only for rich push notifications. I'm trying to get it work for all the notifications (so that all the notifications received by the phone to be in the inbox). But I couldn't get it to work because I figured the Rich Push notifications inbox has its own library. But if the Urban Airship has its notification history stored in their webpage, so it is also possible to get the notification history in the inbox (which I don't know how). I've also searched but haven't been able to find anything about it. Anyone can help?
I don't believe UA API has access to the message "history" at this time. It's part of their proprietary messaging tool.
I think the only way to accomplish a poor push inbox would be to implement your own push portal, that basically throws requests to the UA API.