Push Notifications Dependency

Why I have repeated this post

I know I have already made a post on it Push Notifications using Firebase but many people faced difficulties in it because I hadn’t provided proper instructions and there were some mistakes in my code as well. So this time, instead of an Example App to take reference from, I have made this available as a proper dependency

I thought about merging this post into the Original Topic but that would have made things messy since it has more than 30 replies and this post would have been buried under all of it.

By the way I tried deleting the original post but apparently I don’t have permission to do it?


If you wish to keep your users informed with Push Notifications, you can do that for your Anvil App as well! This Dependency will allow you to easily send Push Notifications to your users using Firebase Cloud Messaging (FCM). The best part is that it works even in background so even if Users have closed your Anvil App, they can still receive notifications.

To enable Push Notifications for your Anvil App, visit https://push-notifications.anvil.app/ (Sorry for the bad designing)


And if you are wondering why there is no Clone link here, that’s because when you will visit the site and fill the details there, the code will be modified for your needs and a personalized .yaml file will be generated which can be imported as an Anvil App (Tried something new this time :wink:)

If you encounter any problems, feel free to tell me about it.

8 Likes

Certainly a novel idea for sharing code! I like it a lot and it’s very well designed!

1 Like

Awesome, a lot to a beginner like me, but very well documented and please keep this live so that I can always come back to learn it later :slight_smile:

1 Like

error

Hello !!

I get this error when calling

token=firebase.request_push_notifications()

On the client side.

I tried looking at the firebase docs, but no solution found. Do you know how can I solve this security issue?

UPDATE:

After further digging, ended up discovering it was a Firefox issue. Ended up deleting all firefox add-ons and worked.

3 Likes

14 posts were split to a new topic: Push Notification Dependency - using device token

Awesome, so much for a beginner like me, there’s more I would like to learn here in this thread. please keep it live so I can always come back to learn it later.

Added new features to the dependency. Now you can customise your notification with lots of new options and there are also some fixes

Check it out at https://push-notifications.anvil.app/

If you were already using the previous dependency in your app and wish to use the new features, you can remove the existing dependency and generate a new one for yourself from the website.

PS: I tried using the Material Design 3 theme for the first time in a project and it indeed gives what it promises - much prettier apps without making too much changes to CSS.