{"id":6161,"date":"2020-08-14T16:55:43","date_gmt":"2020-08-14T11:25:43","guid":{"rendered":"https:\/\/www.innovationm.com\/blog\/?p=6161"},"modified":"2020-08-14T16:55:43","modified_gmt":"2020-08-14T11:25:43","slug":"send-push-notifications-from-spring-boot-server","status":"publish","type":"post","link":"https:\/\/www.innovationm.com\/blog\/send-push-notifications-from-spring-boot-server\/","title":{"rendered":"Send push notifications from Spring Boot server"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">This blog is about to send push notifications with spring boot and FCM. I will tell you how to send push notifications from the server.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">What is FCM?<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Firebase Cloud Messaging (FCM) is a cross-platform messaging solution that lets you reliably send messages at no cost.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">How FCM work<\/span><\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone wp-image-6162 size-full\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2020\/08\/Fcm-confg.png\" alt=\"\" width=\"966\" height=\"494\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2020\/08\/Fcm-confg.png 966w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2020\/08\/Fcm-confg-300x153.png 300w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2020\/08\/Fcm-confg-768x393.png 768w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2020\/08\/Fcm-confg-624x319.png 624w\" sizes=\"(max-width: 966px) 100vw, 966px\" \/><\/p>\n<ol>\n<li style=\"font-weight: 400;\"><b>Registration: <\/b><span style=\"font-weight: 400;\">When application gets installed it registers with FCM.<\/span><\/li>\n<li style=\"font-weight: 400;\"><b>Token: <\/b><span style=\"font-weight: 400;\">FCM returns token to app.<\/span><\/li>\n<li style=\"font-weight: 400;\"><b>Receive token: <\/b><span style=\"font-weight: 400;\">\u00a0Frontend send token information to backend and backend save token in database.<\/span><\/li>\n<li style=\"font-weight: 400;\"><b>Trigger FCM service layer : <\/b><span style=\"font-weight: 400;\">Trigger the REST API from backend to this particular service layer in the FCM.<\/span><\/li>\n<li style=\"font-weight: 400;\"><b>Trigger Notification: <\/b><span style=\"font-weight: 400;\">FCM will intern trigger the push notification to mobile apps.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">Start from the FCM integration.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">We have to generate our own Firebase SDK admin key.It\u2019s a JSON file with your Firebase project credentials.<\/span><\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-6163 size-full\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2020\/08\/firebase-sdk-json-generation.png\" alt=\"\" width=\"958\" height=\"692\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2020\/08\/firebase-sdk-json-generation.png 958w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2020\/08\/firebase-sdk-json-generation-300x217.png 300w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2020\/08\/firebase-sdk-json-generation-768x555.png 768w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2020\/08\/firebase-sdk-json-generation-624x451.png 624w\" sizes=\"(max-width: 958px) 100vw, 958px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Go to Firebase Console Project Settings to Service Account and Generate new private key and save file. We\u2019ll use it in the next step.<\/span><\/p>\n<p><b>Spring Boot Application<\/b><\/p>\n<p><span style=\"font-weight: 400;\">First of all, add a field in <\/span><i><span style=\"font-weight: 400;\">application.properties<\/span><\/i><span style=\"font-weight: 400;\">. I added a new key\/value pair containing a file path.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">#put the path of FireBase-adminsdk file<\/span><\/p>\n<p><span style=\"font-weight: 400;\">app.firebase-configuration-file=resources\\push-notifications-example-firebase-adminsdk.json.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Now we\u2019ll need to add maven dependencies of Firebase in the pom.xml file.<\/span><\/p>\n<pre class=\"lang:default decode:true\">&lt;dependency&gt;\r\n\r\n&lt;groupId&gt;com.google.firebase&lt;\/groupId&gt;\r\n\r\n&lt;artifactId&gt;firebase-admin&lt;\/artifactId&gt;\r\n\r\n&lt;version&gt;6.15.0&lt;\/version&gt;\r\n\r\n&lt;\/dependency&gt;<\/pre>\n<p><span style=\"font-weight: 400;\">Now we have to initialize our Firebase application. This is the time to use our app.firebase-configuration-file. I used @Value annotation to inject the path value to the String field.<\/span><\/p>\n<pre class=\"lang:default decode:true\">public class FCMInitializer {\r\n\t@Value(\"${app.firebase-configuration-file}\")\r\n\tprivate String firebaseConfigPath;\r\n\t@PostConstruct\r\n\tpublic void initialize() {\r\n\t\ttry {\r\n\t\t\tFirebaseOptions options = new FirebaseOptions.Builder()\r\n\t\t\t\t.setCredentials(GoogleCredentials.fromStream(new ClassPathResource(firebaseConfigPath).getInputStream())).build();\r\n\t\t\tif (FirebaseApp.getApps().isEmpty()) {\r\n\t                \tFirebaseApp.initializeApp(options);\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t            e.printStackTrace()\r\n\t\t}\r\n\t}\r\n}\r\n<\/pre>\n<p><b>Send Notification<\/b><\/p>\n<p><span style=\"font-weight: 400;\">I created a PushNotificationRequest class to add some mandatory fields.<\/span><\/p>\n<pre class=\"lang:default decode:true\">public class PushNotificationRequest {\r\n\tprivate String title;\r\n\tprivate String message;\r\n\tprivate String token;\r\n\r\n\tpublic String getTitle() {\r\n\t\treturn title;\r\n\t}\r\n\tpublic void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}\r\n\tpublic String getMessage() {\r\n\t\treturn message;\r\n\t}\r\n\tpublic void setMessage(String message) {\r\n\t\tthis.message = message;\r\n\t}\r\n\tpublic String getToken() {\r\n\t\treturn token;\r\n\t}\r\n\tpublic void setToken(String token) {\r\n\t\tthis.token = token;\r\n\t}\r\n}\r\n<\/pre>\n<p><span style=\"font-size: 1rem;\">Next step is to prepare for our FCMService class.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In this class we completed\u00a0 Android configuration and Apple Push Notification service (APNs) configuration.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Sending push notifications with payload data.<\/span><\/p>\n<pre class=\"lang:default decode:true\">@Service \r\npublic class FCMService {\r\n\r\n\tLogger logger = LoggerFactory.getLogger(FCMService.class);\r\n\tpublic void sendMessage(Map&lt;String, String&gt; data, PushNotificationRequest request)\r\n\t\t\tthrows InterruptedException, ExecutionException {\r\n\t\tMessage message = getPreconfiguredMessageWithData(data, request);\r\n\t\tString response = sendAndGetResponse(message);\r\n\t\tlogger.info(\"Sent Notification. Title: \" + request.getTitle() + \", \" + response);\r\n\t}\r\n\r\n\tprivate String sendAndGetResponse(Message message) throws InterruptedException, ExecutionException {\r\n\t\treturn FirebaseMessaging.getInstance().sendAsync(message).get();\r\n\t}\r\n\r\n\tprivate AndroidConfig getAndroidConfig() {\r\n\t\treturn AndroidConfig.builder()\r\n\t\t\t.setTtl(Duration.ofMinutes(60).toMillis())\r\n\t\t\t.setPriority(AndroidConfig.Priority.HIGH)\r\n\t\t\t.setNotification(AndroidNotification.builder().setSound(\"default\").setColor(\"#FFFF00\").build())\r\n\t\t\t.build();\r\n\t}\r\n\r\n\tprivate ApnsConfig getApnsConfig() {\r\n\t\treturn ApnsConfig.builder().setAps(Aps.builder().setSound(\"default\").build()).build();\r\n\t}\r\n\r\n\tprivate Message getPreconfiguredMessageWithData(Map&lt;String, String&gt; data, PushNotificationRequest request) {\r\n\t\treturn getPreconfiguredMessageBuilder(request).putAllData(data).setToken(request.getToken()).build();\r\n\t}\r\n\r\n\tprivate Message.Builder getPreconfiguredMessageBuilder(PushNotificationRequest request) {\r\n\t\tAndroidConfig androidConfig = getAndroidConfig();\r\n\t\tApnsConfig apnsConfig = getApnsConfig();\r\n\t\treturn Message.builder()\r\n\t\t\t.setApnsConfig(apnsConfig)\r\n\t\t\t.setAndroidConfig(androidConfig)\r\n\t\t\t.setNotification(new Notification(request.getTitle(), request.getMessage()));\r\n\t}\r\n}\r\n<\/pre>\n<p><span style=\"font-weight: 400;\">\u00a0We can test it right now by calling the proper method.<\/span><span style=\"font-weight: 400;\"> We are using spring scheduler to send push notifications.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">For scheduling, I used <\/span><i><span style=\"font-weight: 400;\">@Scheduled <\/span><\/i><span style=\"font-weight: 400;\">annotation with cron job(0 0\/2 * 1\/1 * ?) to send push notifications every\u00a0 2 min. Remember to annotate your Application class with <\/span><i><span style=\"font-weight: 400;\">@EnableScheduling<\/span><\/i><span style=\"font-weight: 400;\">.<\/span><\/p>\n<pre class=\"lang:default decode:true \">@Service\r\npublic class PushNotificationService {\r\n\t@Autowired\r\n\tFCMService fcmService;\r\n\r\n\tprivate String token=\"eLs0WItVXAERsHw2:APA91bFxeQ0-BPVWb6IX905s8ZacvVR6x1DYlp3-ikfitZwGMONyYT7mBMDBLRB07kbdWIzXCm\";\r\n\r\n\t@Scheduled(cron=\"0 0\/2 * 1\/1 * ?\")\r\n\tpublic void sendPushNotificationWithData() {\r\n\t\tPushNotificationRequest pushNotificationRequest=new PushNotificationRequest();\r\n\t\t\tpushNotificationRequest.setMessage(\"Send push notifications from Spring Boot server\");\r\n\t\t\tpushNotificationRequest.setTitle(\"test Push Notification\");\r\n\t\t\tpushNotificationRequest.setToken(token);\r\n\t\t\tMap&lt;String, String&gt; appData= new HashMap&lt;&gt;();\r\n\t\t\t\tappData.put(\"name\", \"PushNotification\");\r\n\t\t\ttry {\r\n\t\t\t\tfcmService.sendMessage(appData, pushNotificationRequest);\r\n\t\t\t} catch (InterruptedException | ExecutionException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t}\r\n}\r\n<\/pre>\n<p><span style=\"font-weight: 400;\">It is configured properly and working fine.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Look at this screenshot with received notifications interval of 2 min.<\/span><\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-6164 size-full\" src=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2020\/08\/Screenshot_2020-08-05-14-52-10-650_com.miui_.home_.jpg\" alt=\"\" width=\"843\" height=\"1600\" srcset=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2020\/08\/Screenshot_2020-08-05-14-52-10-650_com.miui_.home_.jpg 843w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2020\/08\/Screenshot_2020-08-05-14-52-10-650_com.miui_.home_-158x300.jpg 158w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2020\/08\/Screenshot_2020-08-05-14-52-10-650_com.miui_.home_-540x1024.jpg 540w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2020\/08\/Screenshot_2020-08-05-14-52-10-650_com.miui_.home_-768x1458.jpg 768w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2020\/08\/Screenshot_2020-08-05-14-52-10-650_com.miui_.home_-809x1536.jpg 809w, https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2020\/08\/Screenshot_2020-08-05-14-52-10-650_com.miui_.home_-624x1184.jpg 624w\" sizes=\"(max-width: 843px) 100vw, 843px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This blog is about to send push notifications with spring boot and FCM. I will tell you how to send push notifications from the server. What is FCM? Firebase Cloud Messaging (FCM) is a cross-platform messaging solution that lets you reliably send messages at no cost. How FCM work Registration: When application gets installed it [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":6165,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[364,441],"tags":[14,534],"class_list":["post-6161","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-firebase","category-spring-boot","tag-innovationm","tag-send-push-notifications-from-spring-boot-server"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Send push notifications from Spring Boot server - InnovationM - Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.innovationm.com\/blog\/send-push-notifications-from-spring-boot-server\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Send push notifications from Spring Boot server - InnovationM - Blog\" \/>\n<meta property=\"og:description\" content=\"This blog is about to send push notifications with spring boot and FCM. I will tell you how to send push notifications from the server. What is FCM? Firebase Cloud Messaging (FCM) is a cross-platform messaging solution that lets you reliably send messages at no cost. How FCM work Registration: When application gets installed it [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.innovationm.com\/blog\/send-push-notifications-from-spring-boot-server\/\" \/>\n<meta property=\"og:site_name\" content=\"InnovationM - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-08-14T11:25:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2020\/08\/KRRRRRR-H.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"886\" \/>\n\t<meta property=\"og:image:height\" content=\"485\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"InnovationM Admin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"InnovationM Admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/send-push-notifications-from-spring-boot-server\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/send-push-notifications-from-spring-boot-server\\\/\"},\"author\":{\"name\":\"InnovationM Admin\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#\\\/schema\\\/person\\\/a831bf4602d69d1fa452e3de0c8862ed\"},\"headline\":\"Send push notifications from Spring Boot server\",\"datePublished\":\"2020-08-14T11:25:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/send-push-notifications-from-spring-boot-server\\\/\"},\"wordCount\":348,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/send-push-notifications-from-spring-boot-server\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/KRRRRRR-H.jpg\",\"keywords\":[\"InnovationM\",\"Send push notifications from Spring Boot server\"],\"articleSection\":[\"Firebase\",\"Spring Boot\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/send-push-notifications-from-spring-boot-server\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/send-push-notifications-from-spring-boot-server\\\/\",\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/send-push-notifications-from-spring-boot-server\\\/\",\"name\":\"Send push notifications from Spring Boot server - InnovationM - Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/send-push-notifications-from-spring-boot-server\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/send-push-notifications-from-spring-boot-server\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/KRRRRRR-H.jpg\",\"datePublished\":\"2020-08-14T11:25:43+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#\\\/schema\\\/person\\\/a831bf4602d69d1fa452e3de0c8862ed\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/send-push-notifications-from-spring-boot-server\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/send-push-notifications-from-spring-boot-server\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/send-push-notifications-from-spring-boot-server\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/KRRRRRR-H.jpg\",\"contentUrl\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/08\\\/KRRRRRR-H.jpg\",\"width\":886,\"height\":485},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/send-push-notifications-from-spring-boot-server\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Send push notifications from Spring Boot server\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/\",\"name\":\"InnovationM - Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/#\\\/schema\\\/person\\\/a831bf4602d69d1fa452e3de0c8862ed\",\"name\":\"InnovationM Admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g\",\"caption\":\"InnovationM Admin\"},\"sameAs\":[\"http:\\\/\\\/www.innovationm.com\\\/\"],\"url\":\"https:\\\/\\\/www.innovationm.com\\\/blog\\\/author\\\/innovationmadmin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Send push notifications from Spring Boot server - InnovationM - Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.innovationm.com\/blog\/send-push-notifications-from-spring-boot-server\/","og_locale":"en_US","og_type":"article","og_title":"Send push notifications from Spring Boot server - InnovationM - Blog","og_description":"This blog is about to send push notifications with spring boot and FCM. I will tell you how to send push notifications from the server. What is FCM? Firebase Cloud Messaging (FCM) is a cross-platform messaging solution that lets you reliably send messages at no cost. How FCM work Registration: When application gets installed it [&hellip;]","og_url":"https:\/\/www.innovationm.com\/blog\/send-push-notifications-from-spring-boot-server\/","og_site_name":"InnovationM - Blog","article_published_time":"2020-08-14T11:25:43+00:00","og_image":[{"width":886,"height":485,"url":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2020\/08\/KRRRRRR-H.jpg","type":"image\/jpeg"}],"author":"InnovationM Admin","twitter_misc":{"Written by":"InnovationM Admin","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.innovationm.com\/blog\/send-push-notifications-from-spring-boot-server\/#article","isPartOf":{"@id":"https:\/\/www.innovationm.com\/blog\/send-push-notifications-from-spring-boot-server\/"},"author":{"name":"InnovationM Admin","@id":"https:\/\/www.innovationm.com\/blog\/#\/schema\/person\/a831bf4602d69d1fa452e3de0c8862ed"},"headline":"Send push notifications from Spring Boot server","datePublished":"2020-08-14T11:25:43+00:00","mainEntityOfPage":{"@id":"https:\/\/www.innovationm.com\/blog\/send-push-notifications-from-spring-boot-server\/"},"wordCount":348,"commentCount":0,"image":{"@id":"https:\/\/www.innovationm.com\/blog\/send-push-notifications-from-spring-boot-server\/#primaryimage"},"thumbnailUrl":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2020\/08\/KRRRRRR-H.jpg","keywords":["InnovationM","Send push notifications from Spring Boot server"],"articleSection":["Firebase","Spring Boot"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.innovationm.com\/blog\/send-push-notifications-from-spring-boot-server\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.innovationm.com\/blog\/send-push-notifications-from-spring-boot-server\/","url":"https:\/\/www.innovationm.com\/blog\/send-push-notifications-from-spring-boot-server\/","name":"Send push notifications from Spring Boot server - InnovationM - Blog","isPartOf":{"@id":"https:\/\/www.innovationm.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.innovationm.com\/blog\/send-push-notifications-from-spring-boot-server\/#primaryimage"},"image":{"@id":"https:\/\/www.innovationm.com\/blog\/send-push-notifications-from-spring-boot-server\/#primaryimage"},"thumbnailUrl":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2020\/08\/KRRRRRR-H.jpg","datePublished":"2020-08-14T11:25:43+00:00","author":{"@id":"https:\/\/www.innovationm.com\/blog\/#\/schema\/person\/a831bf4602d69d1fa452e3de0c8862ed"},"breadcrumb":{"@id":"https:\/\/www.innovationm.com\/blog\/send-push-notifications-from-spring-boot-server\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.innovationm.com\/blog\/send-push-notifications-from-spring-boot-server\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.innovationm.com\/blog\/send-push-notifications-from-spring-boot-server\/#primaryimage","url":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2020\/08\/KRRRRRR-H.jpg","contentUrl":"https:\/\/www.innovationm.com\/blog\/wp-content\/uploads\/2020\/08\/KRRRRRR-H.jpg","width":886,"height":485},{"@type":"BreadcrumbList","@id":"https:\/\/www.innovationm.com\/blog\/send-push-notifications-from-spring-boot-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.innovationm.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Send push notifications from Spring Boot server"}]},{"@type":"WebSite","@id":"https:\/\/www.innovationm.com\/blog\/#website","url":"https:\/\/www.innovationm.com\/blog\/","name":"InnovationM - Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.innovationm.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.innovationm.com\/blog\/#\/schema\/person\/a831bf4602d69d1fa452e3de0c8862ed","name":"InnovationM Admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5c99d9eece9dfbc82297cf34ddd58e9fe05bb52fe66c8f6bf6c0a45bfb6d7629?s=96&r=g","caption":"InnovationM Admin"},"sameAs":["http:\/\/www.innovationm.com\/"],"url":"https:\/\/www.innovationm.com\/blog\/author\/innovationmadmin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/posts\/6161","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/comments?post=6161"}],"version-history":[{"count":0,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/posts\/6161\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/media\/6165"}],"wp:attachment":[{"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/media?parent=6161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/categories?post=6161"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.innovationm.com\/blog\/wp-json\/wp\/v2\/tags?post=6161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}