Is it possible to send PushNotifications, using Firebase Cloud Messaging (FCM) to special UDID, directly from...












15















I am thinking about keeping all registration ids(push token) in DB and sending notifications to user from iPhone. I tried something like this but did not get any notification.



func sendPNMessage() {
FIRMessaging.messaging().sendMessage(
["body": "hey"],
to: TOKEN_ID,
withMessageID: "1",
timeToLive: 108)
}


What I am doing wrong or maybe it is impossible at all?










share|improve this question





























    15















    I am thinking about keeping all registration ids(push token) in DB and sending notifications to user from iPhone. I tried something like this but did not get any notification.



    func sendPNMessage() {
    FIRMessaging.messaging().sendMessage(
    ["body": "hey"],
    to: TOKEN_ID,
    withMessageID: "1",
    timeToLive: 108)
    }


    What I am doing wrong or maybe it is impossible at all?










    share|improve this question



























      15












      15








      15


      7






      I am thinking about keeping all registration ids(push token) in DB and sending notifications to user from iPhone. I tried something like this but did not get any notification.



      func sendPNMessage() {
      FIRMessaging.messaging().sendMessage(
      ["body": "hey"],
      to: TOKEN_ID,
      withMessageID: "1",
      timeToLive: 108)
      }


      What I am doing wrong or maybe it is impossible at all?










      share|improve this question
















      I am thinking about keeping all registration ids(push token) in DB and sending notifications to user from iPhone. I tried something like this but did not get any notification.



      func sendPNMessage() {
      FIRMessaging.messaging().sendMessage(
      ["body": "hey"],
      to: TOKEN_ID,
      withMessageID: "1",
      timeToLive: 108)
      }


      What I am doing wrong or maybe it is impossible at all?







      ios firebase google-cloud-messaging firebase-cloud-messaging firebase-notifications






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jun 4 '16 at 19:43







      Svitlana

















      asked Jun 4 '16 at 19:11









      SvitlanaSvitlana

      1,67911929




      1,67911929
























          5 Answers
          5






          active

          oldest

          votes


















          19














          Currently it's not possible to send messages from the application itself.
          You can send messages from the Firebase Web Console, or from a custom server using the server-side APIs.



          What you might want to do is to contact a server (like via http call) and that server will send the message to the user.
          This way ensure that the API-KEY of the server is protected.



          PS: the sendMessage(..) api is called upstream feature, and can be used to send messages from your app to your server, if you server has an XMPP connection with the FCM server.






          share|improve this answer



















          • 1





            It seems I need a server to send push notifications. Thank you for response!

            – Svitlana
            Jun 12 '16 at 21:35











          • @Svitlana: If this answer was useful, click the upvote button to the left of it. If it answered your question, click the checkmark to accept it. That way others know that you've been (sufficiently) helped.

            – Frank van Puffelen
            Jun 29 '16 at 17:35











          • Thank you for the answer going to work with server!

            – Svitlana
            Jul 8 '16 at 12:51











          • It is possible in android and ios both

            – Vishal Patoliya ツ
            Jul 26 '16 at 7:51











          • By your refresh token get from device

            – Vishal Patoliya ツ
            Jul 26 '16 at 7:52





















          7














          Yes you can send push notification through Firebase.Please make sure do NOT include the server-key into your client. There are ways "for not so great people" to find it and do stuff... The Proper way to achieve that is for your client to instruct your app-server to send the notification.



          You have to send a HTTP-Post to the Google-API-Endpoint.



          You need the following headers:



          Content-Type: application/json
          Authorization: key={your_server_key}
          You can obtain your server key within in the Firebase-Project.

          HTTP-Post-Content: Sample

          {
          "notification": {
          "title": "Notification Title",
          "text": "The Text of the notification."
          },
          "project_id": "<your firebase-project-id",
          "to":"the specific client-device-id"
          }





          share|improve this answer
























          • You say yes, others say no.... including people that work for firebase... so what is the correct answer?

            – Boober Bunz
            Feb 14 '17 at 20:51






          • 1





            I have implemented this and it works fine for me :)

            – Dupinder kaur
            Feb 16 '17 at 5:37











          • They are technically both correct. This answer is one that works, but shouldn't be done because you're exposing your server key to the world

            – Mbrevda
            Apr 28 '17 at 13:51











          • Hey @Dupinderkaur can you show me how to do that in swift code? I have done something like that but i get error code 401. Means request is not authorized.

            – Salman Ali
            Jul 10 '17 at 9:16



















          2














          Google Cloud Functions make it now possible send push notifications from device-to-device without an app server.



          From the Google Cloud Functions documentation:




          Developers can use Cloud Functions to keep users engaged and up to
          date with relevant information about an app. Consider, for example, an
          app that allows users to follow one another's activities in the app.
          In such an app, a function triggered by Realtime Database writes to
          store new followers could create Firebase Cloud Messaging (FCM)
          notifications to let the appropriate users know that they have gained
          new followers.



          Example:




          1. The function triggers on writes to the Realtime Database path where followers are stored.


          2. The function composes a message to send via FCM.


          3. FCM sends the notification message to the user's device.





          Here is a demo project for sending device-to-device push notifications with Firebase and Google Cloud Functions.






          share|improve this answer

































            0














            Diego's answer is very accurate but there's also cloud functions from firebase it's very convenient to send notifications in every change in the db. For example let's say you're building chat application and sending notification in every new follower change.
            This function sample is very good example.



            For more information about cloud functions you can check official docs.






            share|improve this answer































              -1














              Use onesignal,you can send device to notifications or device to segments ,it can work with firebase in this way
              Use onesignal functions to create a specific id,save it in a firebase database ,then when the id can be put in another function that is used to send a notification
              Notes: 1-i am using it in my apps with firebase works perfectly
              2-i can submit that code,just someone comments so i can find this answer






              share|improve this answer























                Your Answer






                StackExchange.ifUsing("editor", function () {
                StackExchange.using("externalEditor", function () {
                StackExchange.using("snippets", function () {
                StackExchange.snippets.init();
                });
                });
                }, "code-snippets");

                StackExchange.ready(function() {
                var channelOptions = {
                tags: "".split(" "),
                id: "1"
                };
                initTagRenderer("".split(" "), "".split(" "), channelOptions);

                StackExchange.using("externalEditor", function() {
                // Have to fire editor after snippets, if snippets enabled
                if (StackExchange.settings.snippets.snippetsEnabled) {
                StackExchange.using("snippets", function() {
                createEditor();
                });
                }
                else {
                createEditor();
                }
                });

                function createEditor() {
                StackExchange.prepareEditor({
                heartbeatType: 'answer',
                autoActivateHeartbeat: false,
                convertImagesToLinks: true,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: 10,
                bindNavPrevention: true,
                postfix: "",
                imageUploader: {
                brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                allowUrls: true
                },
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                });


                }
                });














                draft saved

                draft discarded


















                StackExchange.ready(
                function () {
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f37634046%2fis-it-possible-to-send-pushnotifications-using-firebase-cloud-messaging-fcm-t%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                5 Answers
                5






                active

                oldest

                votes








                5 Answers
                5






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                19














                Currently it's not possible to send messages from the application itself.
                You can send messages from the Firebase Web Console, or from a custom server using the server-side APIs.



                What you might want to do is to contact a server (like via http call) and that server will send the message to the user.
                This way ensure that the API-KEY of the server is protected.



                PS: the sendMessage(..) api is called upstream feature, and can be used to send messages from your app to your server, if you server has an XMPP connection with the FCM server.






                share|improve this answer



















                • 1





                  It seems I need a server to send push notifications. Thank you for response!

                  – Svitlana
                  Jun 12 '16 at 21:35











                • @Svitlana: If this answer was useful, click the upvote button to the left of it. If it answered your question, click the checkmark to accept it. That way others know that you've been (sufficiently) helped.

                  – Frank van Puffelen
                  Jun 29 '16 at 17:35











                • Thank you for the answer going to work with server!

                  – Svitlana
                  Jul 8 '16 at 12:51











                • It is possible in android and ios both

                  – Vishal Patoliya ツ
                  Jul 26 '16 at 7:51











                • By your refresh token get from device

                  – Vishal Patoliya ツ
                  Jul 26 '16 at 7:52


















                19














                Currently it's not possible to send messages from the application itself.
                You can send messages from the Firebase Web Console, or from a custom server using the server-side APIs.



                What you might want to do is to contact a server (like via http call) and that server will send the message to the user.
                This way ensure that the API-KEY of the server is protected.



                PS: the sendMessage(..) api is called upstream feature, and can be used to send messages from your app to your server, if you server has an XMPP connection with the FCM server.






                share|improve this answer



















                • 1





                  It seems I need a server to send push notifications. Thank you for response!

                  – Svitlana
                  Jun 12 '16 at 21:35











                • @Svitlana: If this answer was useful, click the upvote button to the left of it. If it answered your question, click the checkmark to accept it. That way others know that you've been (sufficiently) helped.

                  – Frank van Puffelen
                  Jun 29 '16 at 17:35











                • Thank you for the answer going to work with server!

                  – Svitlana
                  Jul 8 '16 at 12:51











                • It is possible in android and ios both

                  – Vishal Patoliya ツ
                  Jul 26 '16 at 7:51











                • By your refresh token get from device

                  – Vishal Patoliya ツ
                  Jul 26 '16 at 7:52
















                19












                19








                19







                Currently it's not possible to send messages from the application itself.
                You can send messages from the Firebase Web Console, or from a custom server using the server-side APIs.



                What you might want to do is to contact a server (like via http call) and that server will send the message to the user.
                This way ensure that the API-KEY of the server is protected.



                PS: the sendMessage(..) api is called upstream feature, and can be used to send messages from your app to your server, if you server has an XMPP connection with the FCM server.






                share|improve this answer













                Currently it's not possible to send messages from the application itself.
                You can send messages from the Firebase Web Console, or from a custom server using the server-side APIs.



                What you might want to do is to contact a server (like via http call) and that server will send the message to the user.
                This way ensure that the API-KEY of the server is protected.



                PS: the sendMessage(..) api is called upstream feature, and can be used to send messages from your app to your server, if you server has an XMPP connection with the FCM server.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jun 4 '16 at 20:52









                Diego GiorginiDiego Giorgini

                8,79813342




                8,79813342








                • 1





                  It seems I need a server to send push notifications. Thank you for response!

                  – Svitlana
                  Jun 12 '16 at 21:35











                • @Svitlana: If this answer was useful, click the upvote button to the left of it. If it answered your question, click the checkmark to accept it. That way others know that you've been (sufficiently) helped.

                  – Frank van Puffelen
                  Jun 29 '16 at 17:35











                • Thank you for the answer going to work with server!

                  – Svitlana
                  Jul 8 '16 at 12:51











                • It is possible in android and ios both

                  – Vishal Patoliya ツ
                  Jul 26 '16 at 7:51











                • By your refresh token get from device

                  – Vishal Patoliya ツ
                  Jul 26 '16 at 7:52
















                • 1





                  It seems I need a server to send push notifications. Thank you for response!

                  – Svitlana
                  Jun 12 '16 at 21:35











                • @Svitlana: If this answer was useful, click the upvote button to the left of it. If it answered your question, click the checkmark to accept it. That way others know that you've been (sufficiently) helped.

                  – Frank van Puffelen
                  Jun 29 '16 at 17:35











                • Thank you for the answer going to work with server!

                  – Svitlana
                  Jul 8 '16 at 12:51











                • It is possible in android and ios both

                  – Vishal Patoliya ツ
                  Jul 26 '16 at 7:51











                • By your refresh token get from device

                  – Vishal Patoliya ツ
                  Jul 26 '16 at 7:52










                1




                1





                It seems I need a server to send push notifications. Thank you for response!

                – Svitlana
                Jun 12 '16 at 21:35





                It seems I need a server to send push notifications. Thank you for response!

                – Svitlana
                Jun 12 '16 at 21:35













                @Svitlana: If this answer was useful, click the upvote button to the left of it. If it answered your question, click the checkmark to accept it. That way others know that you've been (sufficiently) helped.

                – Frank van Puffelen
                Jun 29 '16 at 17:35





                @Svitlana: If this answer was useful, click the upvote button to the left of it. If it answered your question, click the checkmark to accept it. That way others know that you've been (sufficiently) helped.

                – Frank van Puffelen
                Jun 29 '16 at 17:35













                Thank you for the answer going to work with server!

                – Svitlana
                Jul 8 '16 at 12:51





                Thank you for the answer going to work with server!

                – Svitlana
                Jul 8 '16 at 12:51













                It is possible in android and ios both

                – Vishal Patoliya ツ
                Jul 26 '16 at 7:51





                It is possible in android and ios both

                – Vishal Patoliya ツ
                Jul 26 '16 at 7:51













                By your refresh token get from device

                – Vishal Patoliya ツ
                Jul 26 '16 at 7:52







                By your refresh token get from device

                – Vishal Patoliya ツ
                Jul 26 '16 at 7:52















                7














                Yes you can send push notification through Firebase.Please make sure do NOT include the server-key into your client. There are ways "for not so great people" to find it and do stuff... The Proper way to achieve that is for your client to instruct your app-server to send the notification.



                You have to send a HTTP-Post to the Google-API-Endpoint.



                You need the following headers:



                Content-Type: application/json
                Authorization: key={your_server_key}
                You can obtain your server key within in the Firebase-Project.

                HTTP-Post-Content: Sample

                {
                "notification": {
                "title": "Notification Title",
                "text": "The Text of the notification."
                },
                "project_id": "<your firebase-project-id",
                "to":"the specific client-device-id"
                }





                share|improve this answer
























                • You say yes, others say no.... including people that work for firebase... so what is the correct answer?

                  – Boober Bunz
                  Feb 14 '17 at 20:51






                • 1





                  I have implemented this and it works fine for me :)

                  – Dupinder kaur
                  Feb 16 '17 at 5:37











                • They are technically both correct. This answer is one that works, but shouldn't be done because you're exposing your server key to the world

                  – Mbrevda
                  Apr 28 '17 at 13:51











                • Hey @Dupinderkaur can you show me how to do that in swift code? I have done something like that but i get error code 401. Means request is not authorized.

                  – Salman Ali
                  Jul 10 '17 at 9:16
















                7














                Yes you can send push notification through Firebase.Please make sure do NOT include the server-key into your client. There are ways "for not so great people" to find it and do stuff... The Proper way to achieve that is for your client to instruct your app-server to send the notification.



                You have to send a HTTP-Post to the Google-API-Endpoint.



                You need the following headers:



                Content-Type: application/json
                Authorization: key={your_server_key}
                You can obtain your server key within in the Firebase-Project.

                HTTP-Post-Content: Sample

                {
                "notification": {
                "title": "Notification Title",
                "text": "The Text of the notification."
                },
                "project_id": "<your firebase-project-id",
                "to":"the specific client-device-id"
                }





                share|improve this answer
























                • You say yes, others say no.... including people that work for firebase... so what is the correct answer?

                  – Boober Bunz
                  Feb 14 '17 at 20:51






                • 1





                  I have implemented this and it works fine for me :)

                  – Dupinder kaur
                  Feb 16 '17 at 5:37











                • They are technically both correct. This answer is one that works, but shouldn't be done because you're exposing your server key to the world

                  – Mbrevda
                  Apr 28 '17 at 13:51











                • Hey @Dupinderkaur can you show me how to do that in swift code? I have done something like that but i get error code 401. Means request is not authorized.

                  – Salman Ali
                  Jul 10 '17 at 9:16














                7












                7








                7







                Yes you can send push notification through Firebase.Please make sure do NOT include the server-key into your client. There are ways "for not so great people" to find it and do stuff... The Proper way to achieve that is for your client to instruct your app-server to send the notification.



                You have to send a HTTP-Post to the Google-API-Endpoint.



                You need the following headers:



                Content-Type: application/json
                Authorization: key={your_server_key}
                You can obtain your server key within in the Firebase-Project.

                HTTP-Post-Content: Sample

                {
                "notification": {
                "title": "Notification Title",
                "text": "The Text of the notification."
                },
                "project_id": "<your firebase-project-id",
                "to":"the specific client-device-id"
                }





                share|improve this answer













                Yes you can send push notification through Firebase.Please make sure do NOT include the server-key into your client. There are ways "for not so great people" to find it and do stuff... The Proper way to achieve that is for your client to instruct your app-server to send the notification.



                You have to send a HTTP-Post to the Google-API-Endpoint.



                You need the following headers:



                Content-Type: application/json
                Authorization: key={your_server_key}
                You can obtain your server key within in the Firebase-Project.

                HTTP-Post-Content: Sample

                {
                "notification": {
                "title": "Notification Title",
                "text": "The Text of the notification."
                },
                "project_id": "<your firebase-project-id",
                "to":"the specific client-device-id"
                }






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Dec 14 '16 at 12:12









                Dupinder kaurDupinder kaur

                140112




                140112













                • You say yes, others say no.... including people that work for firebase... so what is the correct answer?

                  – Boober Bunz
                  Feb 14 '17 at 20:51






                • 1





                  I have implemented this and it works fine for me :)

                  – Dupinder kaur
                  Feb 16 '17 at 5:37











                • They are technically both correct. This answer is one that works, but shouldn't be done because you're exposing your server key to the world

                  – Mbrevda
                  Apr 28 '17 at 13:51











                • Hey @Dupinderkaur can you show me how to do that in swift code? I have done something like that but i get error code 401. Means request is not authorized.

                  – Salman Ali
                  Jul 10 '17 at 9:16



















                • You say yes, others say no.... including people that work for firebase... so what is the correct answer?

                  – Boober Bunz
                  Feb 14 '17 at 20:51






                • 1





                  I have implemented this and it works fine for me :)

                  – Dupinder kaur
                  Feb 16 '17 at 5:37











                • They are technically both correct. This answer is one that works, but shouldn't be done because you're exposing your server key to the world

                  – Mbrevda
                  Apr 28 '17 at 13:51











                • Hey @Dupinderkaur can you show me how to do that in swift code? I have done something like that but i get error code 401. Means request is not authorized.

                  – Salman Ali
                  Jul 10 '17 at 9:16

















                You say yes, others say no.... including people that work for firebase... so what is the correct answer?

                – Boober Bunz
                Feb 14 '17 at 20:51





                You say yes, others say no.... including people that work for firebase... so what is the correct answer?

                – Boober Bunz
                Feb 14 '17 at 20:51




                1




                1





                I have implemented this and it works fine for me :)

                – Dupinder kaur
                Feb 16 '17 at 5:37





                I have implemented this and it works fine for me :)

                – Dupinder kaur
                Feb 16 '17 at 5:37













                They are technically both correct. This answer is one that works, but shouldn't be done because you're exposing your server key to the world

                – Mbrevda
                Apr 28 '17 at 13:51





                They are technically both correct. This answer is one that works, but shouldn't be done because you're exposing your server key to the world

                – Mbrevda
                Apr 28 '17 at 13:51













                Hey @Dupinderkaur can you show me how to do that in swift code? I have done something like that but i get error code 401. Means request is not authorized.

                – Salman Ali
                Jul 10 '17 at 9:16





                Hey @Dupinderkaur can you show me how to do that in swift code? I have done something like that but i get error code 401. Means request is not authorized.

                – Salman Ali
                Jul 10 '17 at 9:16











                2














                Google Cloud Functions make it now possible send push notifications from device-to-device without an app server.



                From the Google Cloud Functions documentation:




                Developers can use Cloud Functions to keep users engaged and up to
                date with relevant information about an app. Consider, for example, an
                app that allows users to follow one another's activities in the app.
                In such an app, a function triggered by Realtime Database writes to
                store new followers could create Firebase Cloud Messaging (FCM)
                notifications to let the appropriate users know that they have gained
                new followers.



                Example:




                1. The function triggers on writes to the Realtime Database path where followers are stored.


                2. The function composes a message to send via FCM.


                3. FCM sends the notification message to the user's device.





                Here is a demo project for sending device-to-device push notifications with Firebase and Google Cloud Functions.






                share|improve this answer






























                  2














                  Google Cloud Functions make it now possible send push notifications from device-to-device without an app server.



                  From the Google Cloud Functions documentation:




                  Developers can use Cloud Functions to keep users engaged and up to
                  date with relevant information about an app. Consider, for example, an
                  app that allows users to follow one another's activities in the app.
                  In such an app, a function triggered by Realtime Database writes to
                  store new followers could create Firebase Cloud Messaging (FCM)
                  notifications to let the appropriate users know that they have gained
                  new followers.



                  Example:




                  1. The function triggers on writes to the Realtime Database path where followers are stored.


                  2. The function composes a message to send via FCM.


                  3. FCM sends the notification message to the user's device.





                  Here is a demo project for sending device-to-device push notifications with Firebase and Google Cloud Functions.






                  share|improve this answer




























                    2












                    2








                    2







                    Google Cloud Functions make it now possible send push notifications from device-to-device without an app server.



                    From the Google Cloud Functions documentation:




                    Developers can use Cloud Functions to keep users engaged and up to
                    date with relevant information about an app. Consider, for example, an
                    app that allows users to follow one another's activities in the app.
                    In such an app, a function triggered by Realtime Database writes to
                    store new followers could create Firebase Cloud Messaging (FCM)
                    notifications to let the appropriate users know that they have gained
                    new followers.



                    Example:




                    1. The function triggers on writes to the Realtime Database path where followers are stored.


                    2. The function composes a message to send via FCM.


                    3. FCM sends the notification message to the user's device.





                    Here is a demo project for sending device-to-device push notifications with Firebase and Google Cloud Functions.






                    share|improve this answer















                    Google Cloud Functions make it now possible send push notifications from device-to-device without an app server.



                    From the Google Cloud Functions documentation:




                    Developers can use Cloud Functions to keep users engaged and up to
                    date with relevant information about an app. Consider, for example, an
                    app that allows users to follow one another's activities in the app.
                    In such an app, a function triggered by Realtime Database writes to
                    store new followers could create Firebase Cloud Messaging (FCM)
                    notifications to let the appropriate users know that they have gained
                    new followers.



                    Example:




                    1. The function triggers on writes to the Realtime Database path where followers are stored.


                    2. The function composes a message to send via FCM.


                    3. FCM sends the notification message to the user's device.





                    Here is a demo project for sending device-to-device push notifications with Firebase and Google Cloud Functions.







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Nov 4 '17 at 9:42

























                    answered Nov 4 '17 at 1:28









                    CrashalotCrashalot

                    15k48186327




                    15k48186327























                        0














                        Diego's answer is very accurate but there's also cloud functions from firebase it's very convenient to send notifications in every change in the db. For example let's say you're building chat application and sending notification in every new follower change.
                        This function sample is very good example.



                        For more information about cloud functions you can check official docs.






                        share|improve this answer




























                          0














                          Diego's answer is very accurate but there's also cloud functions from firebase it's very convenient to send notifications in every change in the db. For example let's say you're building chat application and sending notification in every new follower change.
                          This function sample is very good example.



                          For more information about cloud functions you can check official docs.






                          share|improve this answer


























                            0












                            0








                            0







                            Diego's answer is very accurate but there's also cloud functions from firebase it's very convenient to send notifications in every change in the db. For example let's say you're building chat application and sending notification in every new follower change.
                            This function sample is very good example.



                            For more information about cloud functions you can check official docs.






                            share|improve this answer













                            Diego's answer is very accurate but there's also cloud functions from firebase it's very convenient to send notifications in every change in the db. For example let's say you're building chat application and sending notification in every new follower change.
                            This function sample is very good example.



                            For more information about cloud functions you can check official docs.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Oct 26 '18 at 12:28









                            mertmert

                            643621




                            643621























                                -1














                                Use onesignal,you can send device to notifications or device to segments ,it can work with firebase in this way
                                Use onesignal functions to create a specific id,save it in a firebase database ,then when the id can be put in another function that is used to send a notification
                                Notes: 1-i am using it in my apps with firebase works perfectly
                                2-i can submit that code,just someone comments so i can find this answer






                                share|improve this answer




























                                  -1














                                  Use onesignal,you can send device to notifications or device to segments ,it can work with firebase in this way
                                  Use onesignal functions to create a specific id,save it in a firebase database ,then when the id can be put in another function that is used to send a notification
                                  Notes: 1-i am using it in my apps with firebase works perfectly
                                  2-i can submit that code,just someone comments so i can find this answer






                                  share|improve this answer


























                                    -1












                                    -1








                                    -1







                                    Use onesignal,you can send device to notifications or device to segments ,it can work with firebase in this way
                                    Use onesignal functions to create a specific id,save it in a firebase database ,then when the id can be put in another function that is used to send a notification
                                    Notes: 1-i am using it in my apps with firebase works perfectly
                                    2-i can submit that code,just someone comments so i can find this answer






                                    share|improve this answer













                                    Use onesignal,you can send device to notifications or device to segments ,it can work with firebase in this way
                                    Use onesignal functions to create a specific id,save it in a firebase database ,then when the id can be put in another function that is used to send a notification
                                    Notes: 1-i am using it in my apps with firebase works perfectly
                                    2-i can submit that code,just someone comments so i can find this answer







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Jun 15 '18 at 9:19









                                    AbdullAbdull

                                    2116




                                    2116






























                                        draft saved

                                        draft discarded




















































                                        Thanks for contributing an answer to Stack Overflow!


                                        • Please be sure to answer the question. Provide details and share your research!

                                        But avoid



                                        • Asking for help, clarification, or responding to other answers.

                                        • Making statements based on opinion; back them up with references or personal experience.


                                        To learn more, see our tips on writing great answers.




                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function () {
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f37634046%2fis-it-possible-to-send-pushnotifications-using-firebase-cloud-messaging-fcm-t%23new-answer', 'question_page');
                                        }
                                        );

                                        Post as a guest















                                        Required, but never shown





















































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown

































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown







                                        這個網誌中的熱門文章

                                        Academy of Television Arts & Sciences

                                        L'Équipe

                                        1995 France bombings