TobiasBuchholz / Plugin.Firebase

Wrapper around the native Android and iOS Firebase Xamarin SDKs
MIT License
220 stars 49 forks source link

[Plugin.Firebase]: Couldn't attach image to push notification #123

Closed iwontknow closed 1 year ago

iwontknow commented 1 year ago

Hey there, i tried to implement this Plugin in my MAUI project. When i send an push notification (topic based) via my server, it always tells me, even though i dont even have an image attached. [DOTNET] [Plugin.Firebase]: Couldn't attach image to push notification: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference Maybe im just slow or confused but it wont receive the notification due to that.

Side Note: Receiving Notifications via Token is working.

tranb3r commented 1 year ago

I'm having the same issue. The workaround consists in using the NotificationBuilderProvider and setting your own builder according to your needs. https://github.com/TobiasBuchholz/Plugin.Firebase/blob/81fdff2e38f9d9529ee7ecc676dab2408b19fea5/src/Android/CloudMessaging/FirebaseCloudMessagingImplementation.cs#LL24C73-L24C100

TobiasBuchholz commented 1 year ago

See https://github.com/TobiasBuchholz/Plugin.Firebase/issues/156#issuecomment-1498107791