Paulo Miranda
Forum Replies Created
-
Forum: Plugins
In reply to: [FCM Push Notification from WP] Plugin is not working as expectedHI,
You need to include this setting
<meta-data android:name=”com.google.firebase.messaging.default_notification_channel_id” android:value=”app_channel”/>After the application tag
Forum: Plugins
In reply to: [FCM Push Notification from WP] Plugin is not working as expectedHI,
these are the settings i use
The key I get in the firebase configuration
https://ibb.co/RzPwgFy
https://ibb.co/1X5X3rBChannel Configuration
https://developer.android.com/training/notify-user/channels
https://firebase.google.com/docs/cloud-messaging/android/client?hl=pt-BrMy configuration in AndroidManifest.xml (I use flutter)
<meta-data android:name=”com.google.firebase.messaging.default_notification_channel_id” android:value=”baruksoft_channel”/>
Forum: Plugins
In reply to: [FCM Push Notification from WP] the plugin is not working for meHI @11meg,
I replied in the thread you created
Forum: Plugins
In reply to: [FCM Push Notification from WP] Plugin is not working as expectedHI,
the plugin needs to return in this format on the test page:
{“headers”:{},”body”:”{\”message_id\”:3863910649008513237}”,”response”:{“code”:200,”message”:”OK”},”cookies”:[],”filename”:null,”http_response”:{“data”:null,”headers”:null,”status”:null}}
This is the code that sends the notification, it just needs the key and topic
$args = array(
‘timeout’ => 45,
‘redirection’ => 5,
‘httpversion’ => ‘1.1’,
‘method’ => ‘POST’,
‘body’ => $payload,
‘sslverify’ => false,
‘headers’ => array(
‘Content-Type’ => ‘application/json’,
‘Authorization’ => ‘key=’ . $apiKey,
),
‘cookies’ => array()
);$response = wp_remote_post($url, $args);
return json_encode($response);
The topic is in payload
$post = array(
‘to’ => ‘/topics/’ . $topic,
‘collapse_key’ => ‘type_a’,
‘notification’ => $notification,
‘priority’ => ‘high’,
‘data’ => $notification_data,
‘timeToLive’ => 10,
);$payload = json_encode($post);
Review the plugin configuration, it can be the topic name with space. Search uses a topic name in this pattern: topicname
Forum: Plugins
In reply to: [FCM Push Notification from WP] the plugin is not working for meHI,
Do you have an example application on github that I can test?
How was this configuration done?
HI,
The fix is ??in version 1.9.0, about the character encoding issue
I did some testing and didn’t send a second notification after editing a post that had been scheduled and sent
Thanks for using the plugin.
HI,
Your code was included in version 1.9.0
Thanks for using the plugin.
Forum: Plugins
In reply to: [FCM Push Notification from WP] Return Custom Fields in bodyHI,
Thanks for the sugestion. The feature was added in version 1.9.0
Thanks for using the plugin.
Forum: Reviews
In reply to: [FCM Push Notification from WP] No Clue!Plugin description
Notifications for posts, pages and custom post types.
Works with scheduled posts.
Send notifications to users of your app from your website using Google’s service, Firebase Push Notification.
The notification sent includes the block with the data message to be handled by the application, even when it is in the background.
My comment
This plugin serves to send notification to Android and IOS applications
The key you create in Firebase console <-> https://console.firebase.google.com
Firebase console: https://firebase.google.com
Any doubts I am available
- This reply was modified 2 years, 11 months ago by Paulo Miranda.
Forum: Plugins
In reply to: [FCM Push Notification from WP] Plugin not working anymoreHI,
I tested it on my website, WP 5.8.1
Activate the logs in the plugin (fcm-dp-push-notification.php file) and see if there are any errors in your installation.
The log file (debug.log) is generated in the wp-content folder
To write to the log: $this->write_log(‘your text here’);
`API Return
{“headers”:{},”body”:”{\”message_id\”:7592770531357352034}”,”response”:{“code”:200,”message”:”OK”},”cookies”:[],”filename”:null,”http_response”:{“data”:null,”headers”:null,”status”:null}}
Send again
FCM Options
Forum: Plugins
In reply to: [FCM Push Notification from WP] Open post in AppHI,
Thanks for the feedback.
My code was very out of date. So I upgraded to Flutter 2 and redid the push notification routine.
I used this article.
https://blog.logrocket.com/flutter-push-notifications-with-firebase-cloud-messaging/
Explains how to work with notification when the app is closed. When the application is in memory or when it has already been terminated.
See section “Handling background notifications”
The plugin sends the data part of the notification: article title and a part of the text
line: 358
file: fcm-dp-push-notification.phpForum: Plugins
In reply to: [FCM Push Notification from WP] LimitationsHI,
The plugin sends the notification to the topic.
The limitation is not the number of devices, but the number of messages sent to each device, as I understand
https://firebase.google.com/docs/cloud-messaging/concept-options
Maximum message rate to a single device
You can send up to 240 messages/minute and 5,000 messages/hour to a single device. This high threshold is meant to allow for short term bursts of traffic, such as when users are interacting rapidly over chat. This limit prevents errors in sending logic from inadvertently draining the battery on a device.Upstream message limit
We limit upstream messages at 1,500,000/minute per project to avoid overloading upstream destination servers.We limit upstream messages per device at 1,000/minute to protect against battery drain from bad app behavior.
Topic message limit
The topic subscription add/remove rate is limited to 3,000 QPS per project.For message sending rates, see Fanout Throttling.
HI,
Blz, thanks for using the plugin and for your feedback.
Forum: Plugins
In reply to: [FCM Push Notification from WP] Send Notification to more than one topicHI,
The alternative would be to submit to the category, but I don’t have a plan to implement this feature
Forum: Plugins
In reply to: [FCM Push Notification from WP] Api returns reponse with 200HI,
is correct
messages sent via api are not saved in firebase
and the plugin does not record any logs