title: Sending push Notifications from Java Web Application
body: <p>I have a Java web application which needs to send manual and automatic notifications to the user. 
  This notification should go to the user's browser as well as the mobile devices (both iOS &amp; Android). 
  I found out there is no way to send notifications to mobile devices directly if there is no native application running on the mobile device. So my only option seems to be web push notifications. I went through a few articles and I found it very confusing. I don't know where to start.</p>
  
  <ol>
  <li>Can I send the notifications directly from Java Code? Or do I have to use FCM(Firebse)? If so can I call FCM directly from Java code, such as by calling it using Apache http client libraries?</li>
  <li>How does the FCM, client's browser and my application connect?</li>
  <li>I also found out that a service worker should run in the background to receive the notifications. How do I integrate it with the Java code? </li>
  </ol>