Invoking firebase push messaging API upon submission of form component on AEM webpage.

Avatar

Avatar
Level 1
kushal_srivastava
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
kushal_srivastava
Level 1

Likes

0 likes

Total Posts

2 posts

Correct reply

0 solutions
View profile
kushal_srivastava
Level 1

03-03-2021

Hi everyone,

 

I have a HTML form component on my page (not by AEM form) , I want to invoke a firebase push messaging API upon submission of that form via a Servlet.

what would be the best approach for this and if there is any material regarding this.

 

Regards.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 500
MVP
Vijayalakshmi_S
MVP

Likes

586 likes

Total Posts

734 posts

Correct reply

246 solutions
Top badges earned
Boost 500
Give Back 50
Give Back 5
Ignite 10
Ignite 5
View profile

Avatar
Boost 500
MVP
Vijayalakshmi_S
MVP

Likes

586 likes

Total Posts

734 posts

Correct reply

246 solutions
Top badges earned
Boost 500
Give Back 50
Give Back 5
Ignite 10
Ignite 5
View profile
Vijayalakshmi_S
MVP

03-03-2021

Hi @kushal_srivastava,

When we want to include as part of AEM project : 

  • Firebase Admin Java SDK is available in maven central - Make use of this dependency and we are good to write desired functionality in Servlet. 
  • We need to make sure the dependency is available as OSGi dependency when deployed in AEM instance for it to resolve. 

High level steps for implementation:

  1. Firebase project and service account set up
  2. Make use of SDK in project and initialize by authenticating using service credentials created above
  3. Make use of desired functionality from the SDK - In this case, it is to send messages. 

Docs related to this for reference:

Please check and let know if you are looking for any specific information. 

Answers (1)

Answers (1)

Avatar

Avatar
Validate 1
MVP
Umesh_Thakur
MVP

Likes

154 likes

Total Posts

167 posts

Correct reply

55 solutions
Top badges earned
Validate 1
Applaud 25
Ignite 3
Ignite 1
Give Back 5
View profile

Avatar
Validate 1
MVP
Umesh_Thakur
MVP

Likes

154 likes

Total Posts

167 posts

Correct reply

55 solutions
Top badges earned
Validate 1
Applaud 25
Ignite 3
Ignite 1
Give Back 5
View profile
Umesh_Thakur
MVP

03-03-2021

@kushal_srivastava ,

I think approach should be totally based on your requirement. if there is not sensitive data you gona submit then take help from ajax or vanila js or if you are using any js framework then you can use that as well. but if you are accepting any secure info or data then you can take help from Sling model or Sling Servlet for this purpose but again performance of the site should also be considered because submitting  or consuming api from the backend is expensive on performance front.

I think those are some point should be taken care before taking decisions.

Hope this will help.

Umesh Thakur