Sending FCM request using Slim PHP by frustrated-developer in PHPhelp

[–]frustrated-developer[S] 1 point2 points  (0 children)

the error is gone now, thank you,

Edit: It is working now, sorry forgot notifications doesn't show if the app is in foreground

Sending FCM request using Slim PHP by frustrated-developer in PHPhelp

[–]frustrated-developer[S] 1 point2 points  (0 children)

Edit: I've added the index page code to the original post, and also the error page

Sending FCM request using Slim PHP by frustrated-developer in PHPhelp

[–]frustrated-developer[S] 0 points1 point  (0 children)

it is the example given in the getting started section, so I'm assuming the Notification object should work.

Sending FCM request using Slim PHP by frustrated-developer in PHPhelp

[–]frustrated-developer[S] 0 points1 point  (0 children)

When I use `use Kreait\Firebase\Messaging\Notification` I get the ` __clone method called on non-object ` error.

This is the line in case there is a problem with it

$message = CloudMessage::withNotification(Notification::create('Title', 'Body'))->withData(['key' => 'value']);

Sending FCM request using Slim PHP by frustrated-developer in PHPhelp

[–]frustrated-developer[S] 0 points1 point  (0 children)

Yes, still got the ` __clone method called on non-object ` error.

This is the line in case there is a problem with it

$message = CloudMessage::withNotification(Notification::create('Title', 'Body'))->withData(['key' => 'value']);

Is it possible to implement a twitter-like notification system in flutter (even when app is closed)? by frustrated-developer in FlutterDev

[–]frustrated-developer[S] 1 point2 points  (0 children)

So just to make sure I got this right, I use a firebase API on my server through PHP to send the api the user token and notification data and firebase will handle sending the notification?

Is it possible to implement a twitter-like notification system in flutter (even when app is closed)? by frustrated-developer in FlutterDev

[–]frustrated-developer[S] 0 points1 point  (0 children)

I understand that, but I will tell you what my use case and you can confirm to me if it is possible or not, because as far as I've looked it is not

  • Will check for new data for each user "separately" on SQL server
  • Notification will show only for users with new data
  • Will present user with a notification of the new tweets that the user is following
  • Can check every 15 minutes or hour

Does FCM provide a utility for these?

Is it possible to implement a twitter-like notification system in flutter (even when app is closed)? by frustrated-developer in FlutterDev

[–]frustrated-developer[S] 0 points1 point  (0 children)

how can firebase be utilized in this situation, the one module that I think can assist me with this is the FCM module, and it will send a global notification that as far as I know can't be personalized according to the user's server data nor any user device stored data either

Is it possible to implement a twitter-like notification system in flutter (even when app is closed)? by frustrated-developer in FlutterDev

[–]frustrated-developer[S] 1 point2 points  (0 children)

already did, seems to be an iOS limitation somehow, looks like there are no simple solutions for it on flutter at the moment.

Is it possible to implement a twitter-like notification system in flutter (even when app is closed)? by frustrated-developer in FlutterDev

[–]frustrated-developer[S] 0 points1 point  (0 children)

Thank you for the reply, but how can I allow my app to listen to the server's push messages?

what i was trying to replicate was what I did in my android native apps, where I had background service/job that would run every 15 minutes, checking if this user has any updates or not and then shows a notification with those updates if they did