Git Product home page Git Product logo

Comments (3)

jeromegamez avatar jeromegamez commented on August 25, 2024

I'm afraid these messages seem have been lost by firebase then - if the API returns a 200 code in return, we have to assume that the message has been successfully delivered, and there's not much we can do code-wise.

Is there a reason why you are sending the messages one by one instead of doing a multicast (https://firebase-php.readthedocs.io/en/5.8.0/cloud-messaging.html#send-messages-to-multiple-devices-multicast)?

from laravel-firebase.

wontone18 avatar wontone18 commented on August 25, 2024

I am also facing the same issue. Am not sure this package exactly working or not.

this is my test code

 $title = 'My Notification Title';
				$body = 'My Notification Body';
			//	$imageUrl = 'http://lorempixel.com/400/200/';

				$notification = Notification::fromArray([
					'title' => $title,
					'body' => $body,
				//	'image' => $imageUrl,
				]);

				$notification = Notification::create($title, $body);

				$changedNotification = $notification
					->withTitle('Changed title')
					->withBody('Changed body');
				//	->withImageUrl('http://lorempixel.com/200/400/');
					
					//return $notification;
					
					$topic = 'a-topic';

				$message = CloudMessage::withTarget('topic', $topic)
				->withNotification($notification) // optional
							//->withData($data) // optional
						;
                               $messaging->send($message);

from laravel-firebase.

jeromegamez avatar jeromegamez commented on August 25, 2024

Since you double-posted, let me double-answer 😅

#61 (comment)

I'm closing this now because this is most likely nothing that can be fixed from the side of the Laravel package or SDK, but feel free to add further comments or share your findings. 🤞

from laravel-firebase.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.