fcm | Ruby bindings to Firebase Cloud Messaging | Notification library

 by   decision-labs Ruby Version: v1.0.8 License: MIT

kandi X-RAY | fcm Summary

kandi X-RAY | fcm Summary

fcm is a Ruby library typically used in Messaging, Notification, Firebase applications. fcm has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

The FCM gem lets your ruby backend send notifications to Android and iOS devices via Firebase Cloud Messaging.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              fcm has a low active ecosystem.
              It has 457 star(s) with 118 fork(s). There are 19 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 5 open issues and 54 have been closed. On average issues are closed in 314 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of fcm is v1.0.8

            kandi-Quality Quality

              fcm has 0 bugs and 0 code smells.

            kandi-Security Security

              fcm has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              fcm code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              fcm is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              fcm releases are available to install and integrate.
              Installation instructions, examples and code snippets are available.
              fcm saves you 263 person hours of effort in developing the same functionality from scratch.
              It has 639 lines of code, 29 functions and 3 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of fcm
            Get all kandi verified functions for this library.

            fcm Key Features

            No Key Features are available at this moment for fcm.

            fcm Examples and Code Snippets

            No Code Snippets are available at this moment for fcm.

            Community Discussions

            QUESTION

            Using AWS Lambda Console to send push using SNS
            Asked 2021-Jun-12 at 09:43

            I tried every possible solution on the internet with no hope

            What I am trying to do is simply use aws lambda functions (through the aws console) to fetch user fcm token from lets say DynamoDB (not included in the question), use that token to create endpointArn, send push to that specific device

            I tested to send Using SNS console and the push gets to the device successfully but I failed to get it to the device using Lambda functions although it gives success status and message ID

            Here is the code I used

            ...

            ANSWER

            Answered 2021-Jun-12 at 09:43

            After some trials and errors I figured out the solution for my own question

            1- The GCM part of the payload should be a string not a json 2- The message parameter should have an attribute that explicitly sets the mime type of the payload to Json

            Taking all that into consideration

            Source https://stackoverflow.com/questions/67767249

            QUESTION

            Localization of notifications does not work
            Asked 2021-Jun-10 at 11:47

            I want to localize notification , and i find that there is properties for that , like title_loc_key, body_loc_key

            he FCM fields used for localizing (I18N) the notification title and body are not working. For example:

            ...

            ANSWER

            Answered 2021-Jun-10 at 11:47

            FCM isn't aware of Flutter. It focuses on the native apps. So for Flutter, this would be the code within the android and ios directories.

            If you want to use title_loc_key and body_loc_key, you'll have to add labels to android/app/src/main/res/values/strings.xml on Android. Those are separate from the labels you use within your Flutter code.

            Source https://stackoverflow.com/questions/67909213

            QUESTION

            Is it possible to build flutter iOS app without configuring FCM?
            Asked 2021-Jun-10 at 05:59

            Currently I am Configuring FCM for my Flutter application, everything is working fine on android side, however in order to configure FCM in iOS I need an Apple developer account membership which I currently don't have access to.

            when building the iOS app it gives the following Error

            No profiles for 'app Bundle Id' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'app Bundle Id'.

            Is it possible to build the flutter application on iOS to continue to make other features without configuring the FCM ?

            ...

            ANSWER

            Answered 2021-Feb-19 at 12:55

            In order to be able to use things like Push Notifications, in app etc on iOS you need to have a paid Developer account. So you will not be able to use FCM with the "free / testing" signing.

            Without a paid Developer account, xcode can't generate the proper provisioning profile to make your app work.

            Source https://stackoverflow.com/questions/66277538

            QUESTION

            Google App Engine from project A cannot use Firebase Cloud Messaging from project B
            Asked 2021-Jun-08 at 04:53

            We are running 2 separate Google Cloud Projects, Project A and Project B.

            Project A is currently running an App Engine (AE) based API.

            The API on project A needs to access the Firebase features on project B.

            I have setup cross projects access between the two projects using IAM and most functions are working fine.

            App Engine on project A is able to access the Firebase real time db (RTDB) and Firebase Auth functions on Project B.

            But we are unable to connect to Firebase Cloud Messaging on Project B

            As far as I can see tracing through the Firebase admin SDK calls, we are able to obtain access tokens, and they're all valid as we can use some of the services (i.e. RTDB, Auth)

            However, when we try using Firebase Cloud messaging we receive the following error: An error occurred when trying to authenticate to the FCM servers. Make sure the credential used to authenticate this SDK has the proper permissions.

            Which seems to originate from a 401 unauthorized response to this service https://iid.googleapis.com/iid/v1:batchAdd

            It doesn't seem to matter what amount of Roles on Project B I throw at the Project A service account.

            If I use a separate Firebase service account that originated from Project B and use that json file as a credential then the issue go away, but I don't want to distribute credential files around, and everything else work fine without, except FCM.

            FWIW this is how i initialise the firebase admin sdk

            ...

            ANSWER

            Answered 2021-Jun-08 at 04:53

            So in the case of Real time database, you only need to give Firebase Realtime Database Admin role to the Project A's App Engine service account on Project B.

            In Firebase Cloud Messaging you can give Firebase Cloud Messaging Admin role on Project B AND the cloudmessaging.messages.create permission to the service account on Project A.

            This will go around the initial 401 unauthorised response from messaging calls.

            However, this will still result in an error, this time NOT FOUND, which indicates that the subscription token was not found.

            It seems that calls to FCM don't use the projectId setting in firebase admin initialisation and always execute against the project the service account was created in (Project A in this case).

            I haven't been able to find a way for FCM calls to executed in the specified projectId scope from another project.

            Source https://stackoverflow.com/questions/67814643

            QUESTION

            OneSignal Android Studio Unknown error getting FCM Token
            Asked 2021-Jun-07 at 10:20

            i have a problem. I cannot use OneSignal. I don't know why. I googled the error but nothing helped.

            Currently i use Android Studio on Version: 4.2 The newest OneSignal Version: 4.3.4 And also the newest Firebase Version. I created a new Firebase Project and OneSignal Project.

            This is the Error:

            ...

            ANSWER

            Answered 2021-May-26 at 07:52

            The class com.google.firebase.iid.FirebaseInstanceId has been deprecated and removed from the latest versions of the aar:

            Source https://stackoverflow.com/questions/67686867

            QUESTION

            Application.kt file for Firebase cloud messaging
            Asked 2021-Jun-07 at 05:07

            I am trying to use latest FCM using firebase_messaging: ^10.0.1 in my pubspec.yaml

            from the documentation in here , I have to create a Application file in the Android project folder. from that documentation, the code is still in Java, I copy and paste that java code so the Android Studio will convert it automatically to Kotlin , the result is like this

            in my Application.kt

            ...

            ANSWER

            Answered 2021-Jun-07 at 05:07

            This should be the right implementation

            Source https://stackoverflow.com/questions/67863729

            QUESTION

            Send notifications to user in android studio
            Asked 2021-Jun-06 at 23:46

            I want to build a notification system in my Android app where I can send a notification to someone upon an event. For example, my app is about a social system where it uses Firestore database (Firebase) to save its users (which means I have a 'users' collection in there), and I have an 'Add as Friend' feature.

            Everything works just fine, but I would like to add a feature where when user1 adds user2 as a friend, I would like to send user2 a notification about that.
            I have searched in google and saw this post: https://www.geeksforgeeks.org/how-to-push-notification-in-android-using-firebase-cloud-messaging/

            Now, from what I understand, this wouldn't help me much cause it only sends the notification from FCM by me (and not to a specific user).
            The problem is, I don't really know what to search for (or what to type in google) in order to find what I'm looking for.

            Some ideas I thought:

            • to make a collection in firestore called 'Notifications' where it holds usernames as documentIDs
            • when user1 sends a friend request to user2, I would add data (like title/message) to 'Notifications/user2/'

            But I'm kind of stuck here, I would like to know ideas or if you guys have threads on how do I implement this, I really don't know what should I look for.

            Thank you very much and sorry for the long post.

            ...

            ANSWER

            Answered 2021-Jun-06 at 22:59

            Firebase creates a userID for every user and a usertoken which is a temporary identifier for the device which is connected to this userID. You need to save the usertoken when there is a new one being created in a database(firestore) along with the user with whom you identify this person.

            When someone adds this person as a friend you can add a notification in the database that there is a request from person1 to person2. This change in the database can trigger a cloud function that reacts to changes in the database.

            The triggered cloud function sends an FCM to the person which is being added as a friend. This FCM can either be a pure notification or you send data and let your app handle how this data is being handled(saved in a local database or displayed as a custom notification).

            Keywords are: FCM, Notification, Firestore, cloud functions, and firebase token

            Edit (Answer to 1. comment): Firebase userID and usertoken are created on the device. In the tutorial you implement FCM(I didn't read it complete) and a class called FirebaseMessagingService, from which you can inherit. This class is called, when a message is sent to the device and contains a method called onNewToken. This message is called, when the Firebase Server creates a token for your device and sends it to the device. In this method you might want to send the new token to your database and save it as an identifier for the user of this device. The Tokens are used by firebase to identify devices, to which messages are being sent(You can read about FCM in detail)

            Cloud functions are something you can deploy along your firebase project, which get triggered when an event occurs. For example a http call, or a specific change in your database. Cloud functions are written in JS and need to be deployed for your firebase project. (Cloud functions are not for free and you need to pay for each call, but you have some thousand uses for free each month.)

            You send a FCM to a specific person by creating a firebase message which is directed to a specific token, tokens or user groups. To identify the person to which you want to send a message you need to have the token for this user, that is why you are saving the tokens from the 1. part in your database and always update the token, when the token changes on the device.

            Keep in mind, that a user might use multiple devices. You should have an identifier for you, such as username and along this username you save multiple firebaseIds and Firebase tokens. A single FCM can be directed to up to 100 tokens.

            Source https://stackoverflow.com/questions/67863973

            QUESTION

            easiest way to send firebase push notification from client site in react-native
            Asked 2021-Jun-05 at 06:05

            I am new to react native and I am stuck to send push notification from client side. i have FCM token of every user but need to send a notification to specific user. if you want more clarity please comment and let me know the solution of this

            ...

            ANSWER

            Answered 2021-Jun-05 at 06:05

            I saw your problem and I have a solution for you. I am already doing it and here's my code.

            Source https://stackoverflow.com/questions/67846737

            QUESTION

            How to notify the user about the offer call in flutter?
            Asked 2021-Jun-02 at 06:18

            My apps needs a VOIP call functionality and I use webRTC to achieve it. In webRTC how the reciever knows about the incoming call?

            All my users will register in Django and flutter as a frontend. If I use FCM how can specify the exact user to send notifcation. Some articles suggest to use UID, email and such things if I have been authenticated with the firebase I might know about the UID but I use my own server How to make this possible?

            In case if we use email to send a notification i.e., will firebase send the notification to the particular user?

            ...

            ANSWER

            Answered 2021-Jun-02 at 06:18

            Use firebase cloud messaging. If you are using Django or whatever server for the backend you just have to get the user's fcm token while user registers from the app. And in your database store the user's email with that token. So whenever you want to send a notification to a specific user you can trigger by their respective fcm token.

            Use below code to get user's token in flutterfire.

            Source https://stackoverflow.com/questions/67799363

            QUESTION

            How to notify user about incoming call to callee in webRTC?
            Asked 2021-Jun-01 at 16:16

            My app needs a functionality of internet call so I planned to use webRTC and using firebase as signalling server.

            In this feature caller is interested in calling the callee. But in webRTC the user needs to use the code to answer the call by send sdp and ice candidate.

            But the problem for me is how to notify the user about the incoming offer call. Can I use FCM for notifying the user?

            What are the other ways of notifying the user?

            ...

            ANSWER

            Answered 2021-Jun-01 at 15:17

            As you are already using firestore or firebase real-time database as a signaling medium you should use firebase cloud messaging to notify users about the calls.

            You can yous firebase cloud functions for the same. Where by detecting changes in the database you can send notifications to users.

            Link for the cloud function part

            Source https://stackoverflow.com/questions/67790754

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install fcm

            or in your Gemfile just include it:.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Notification Libraries

            push.js

            by Nickersoft

            server

            by gotify

            fsnotify

            by fsnotify

            noty

            by needim

            gorush

            by appleboy

            Try Top Libraries by decision-labs

            gcm

            by decision-labsRuby

            libpq.framework

            by decision-labsC

            libpq-ios

            by decision-labsC

            spacialdb-devcenter

            by decision-labsRuby

            parse_fdw

            by decision-labsPython