0

Is it possible to send a PWA installed on an Android phone push notifications with CRA?

Constraints:

  1. Create React App
  2. Registered service worker to turn into PWA
  3. PWA Installed on Android as a "fake/PWA" native app

1 Answer 1

2

You can send notifications to your service worker using push notification API . You can send notifications to a react app using the service worker mechanism. You can get a service worker pre-configured by generating the code with Create React App. More details about CRA service-worker here.

 `npx create-react-app my-app --template cra-template-pwa`. 

In order to add push notifications you will need to implement a listener inside your business logic that will trigger the notification (a processing result, a button push... etc) then you can trigger the notification as mentioned here.

check the documentation : https://developers.google.com/web/ilt/pwa/introduction-to-push-notifications

Sign up to request clarification or add additional context in comments.

2 Comments

While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
thanks mate I'm new here this is my very first answer

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.