fcm | Enable Firebase Cloud Messaging for Capacitor apps | Authentication library

 by   capacitor-community TypeScript Version: v5.0.1 License: MIT

kandi X-RAY | fcm Summary

kandi X-RAY | fcm Summary

fcm is a TypeScript library typically used in Security, Authentication, Angular, 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.

Capacitor community plugin for enabling FCM capabilities.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              fcm has a low active ecosystem.
              It has 216 star(s) with 72 fork(s). There are 19 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 18 open issues and 84 have been closed. On average issues are closed in 144 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 v5.0.1

            kandi-Quality Quality

              fcm has 0 bugs and 2 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 8 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 not available. You will need to build from source code and install.
              Installation instructions, examples and code snippets are available.
              It has 568 lines of code, 10 functions and 52 files.
              It has low 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

            Flutter / Firebase push notifications not fired when app is closed
            Asked 2022-Mar-03 at 10:44

            I am using firebase messaging to send notifications to users in flutter application, and everything is working fine when I am sending notification from postman (notification always shows), but then when I want to send the same notification from my backend server, notification not showing on device. On server logs I can see that notification was send with success like this:

            ...

            ANSWER

            Answered 2022-Mar-03 at 10:44

            As per your data send with fcm is sending only data object not notification object as per the fcm to wakeup it self you need to send notification object along with data object.

            https://firebase.google.com/docs/cloud-messaging/concept-options

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

            QUESTION

            Error APNS device token not set before retrieving FCM Token for Sender ID
            Asked 2022-Mar-01 at 17:08

            I am receiving messages from firebase for notifications with APNs. In firebase, I have the certificate of APNs key, with the same id in the Xcode project in Firebase that is extracted from Apple Developer.

            But I don't know why this could be happening and I get this error and it is registering two tokens in the Messaging extension:

            ...

            ANSWER

            Answered 2021-Oct-26 at 05:58

            This is a simulator only log. You can safely ignore it. The reason you get this is that Firebase tries to create a mapping from the FCM token to the APNS token so it can send the APNS messages to the iOS devices. However, there is no APNS token on the simulator so the mapping fails.

            Try testing it on an actual device to see if you still get the error.

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

            QUESTION

            Firebase Messaging Device Groups
            Asked 2022-Feb-09 at 20:37

            The FCM documentation says that one should use device groups to send to ALL of a user's devices. The API for it, though, is still a legacy API, and I can't get it to work.

            I am using code like the following, where project_id is the sender ID and api_key is the Web API Key from the firebase console:

            ...

            ANSWER

            Answered 2022-Feb-09 at 20:37

            Ok, the "key" is the "server key" from the cloud messaging tab, and the "project_id" is the "Sender ID" from the same.

            That seems to have solved it for me.

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

            QUESTION

            unknown version in python library pyparsing
            Asked 2022-Jan-25 at 00:32

            I am trying to install airnotifier on my machine, I am getting this error

            My python version is 3.6

            ...

            ANSWER

            Answered 2021-Nov-22 at 05:23

            I received the same error and I'm also in Python 3.6.0 ...

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

            QUESTION

            Agora in Flutter- navigating to the video chat screen more than one time keeps local video loading forever
            Asked 2021-Dec-31 at 10:12

            I am using Agora for a one-to-one video chat purpose in Flutter. User1 has an app to go online and user2 has another app to go online. After both of them go online, they can do video chat with one another. Both apps have almost similar codebase.

            I have a screen or activity (say screen1) where an alert dialog is shown on tapping a button (say button1). On tapping the Continue button in the alert dialog, the dialog disappears and the user is taken to the screen (say screen2) where the video chat takes place. But after going to the video chat screen successfully, if the user taps on the back button on the mobile set then s/he is taken to screen1 and after tapping on button1, if the user taps on the Continue button in the popped up alert dialog, the user is again taken to screen2 but this time the local video (i.e. video of the user using the app) keeps loading for ever. Obviously I want the local video to load as it did for the first time.

            I am gonna put my code here in such a way that you can easily run that.

            Following code is for user1. For user2, no alert box is there in the app. Same code from user1 is used for user2 app, except the value of remoteUid is set to be 2 for user2 while this value is set to be 1 for user1. These are just two values identifying 2 users.

            For user1:

            main.dart:

            ...

            ANSWER

            Answered 2021-Dec-31 at 10:12

            I think the problem is that when pressing back button you are just being taken to the previous screen and the call session is not being end. You can try by leaving the channel when pressing back button like :

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

            QUESTION

            Ionic React: useHistory().push() not working when tapping FCM notification
            Asked 2021-Dec-21 at 03:08

            So I setup my push notification handler:

            ...

            ANSWER

            Answered 2021-Dec-21 at 03:08

            After struggling a lot, I finally found the solution. I use Redux to properly navigate it.

            In my pushNotificationActionPerformed event:

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

            QUESTION

            Flutter - firebase FCM messages not working on Testflight release builds at all
            Asked 2021-Oct-17 at 22:07

            Preface:

            My App is Flutter based - but native code implementation is required to get FCM messages working, see below for more details

            GitHub issue #154 for reference.

            I'm having immense trouble getting FCM notifications working on iOS, specifically on my app published to Testflight. I have been stuck on this problem for a week and have absolutely no idea how to proceed.

            Problem

            When running locally using debug/release builds on my devices using Xcode/Android Studio, notifications are received in the background, foreground, etc. When uploading the exact same app to Testflight, not a single notification will come through via FCM.

            This is crucial as FCM delivers VoIP notifications, these aren't being received on Testflight which is extremely distressing

            Questions & Solutions?

            There are 2 questions I found (here & here), both seemed to indicate it is a APNS certificate problem (APNS -> Firebase). I have recreated my certificate and added it to the Firebase console (using the same .csr file for all certificate generating operations)

            Setup/Configuration:

            • APNS Key generated & added to Firebase

            • Capabilities:

            Tried with:

            ...

            ANSWER

            Answered 2021-Oct-16 at 20:45

            This problem sometimes drive people crazy even they apply everything in the correct scenario, so please try to check the following:

            1- in your apple developer account make sure that you have only one Apple Push Services Certificate assigned to the app identifier ( Bundle ID ), please avoid duplication.

            2- If you are using the APNs key to receive notification you have to make sure its set on the production mode when your app is uploaded to TestFlight or AppStore

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

            QUESTION

            FCM data messages not being received by iOS Simulator or physical device
            Asked 2021-Sep-16 at 07:09

            A project I'm working on requires the use of FCM Push Notifications & Messages for VoIP control amongst others.

            Problem:

            My iOS physical device receives push notifications, but only when the app is in the background or closed but NOT when in the foreground. Further, it does NOT receive any fcm message (data) notifications at all such as messages with only data and no notification title/body i.e. VoIP status message.

            My setup steps are as follows (a detailed setup and general flow I followed can be found here):

            1. Register a (Info.plist) (see here)

            2. Download & install GoogleService-Info.plist with Xcode (see here)

            3. Create APNS key with enabled Push Notifications and uploaded .p8 file to Firebase (see here)

            4. Modify with Swift code:

            AppDelegate.swift code:

            ...

            ANSWER

            Answered 2021-Sep-16 at 07:09
            Original answer (more general/ useful to more people):

            FCM does not work on the iOS simulator, so thats half the question solved. For physical devices, take a look at some debugging steps I wrote in detail on a library I work on.

            There are multiple ways push notification can go wrong on iOS. When you say: the app never receives, do you mean your Flutter application doesn't get the message? Your device could still be receiving them.

            • Open Console.app on your mac, and start the logging for your physical device. Filter for dasd process, and you can see push notification related logs to see if your device rejected the push notification and did not send it to your app. Most likely, its a problem with how you structured your message.
            • You can also try to debug the didReceiveRemoteNotification method on the iOS side inside the Flutterfire firebase_messaging iOS code. That would mean the message is received by the app.
            Let me answer each question/ concern (3) specifically:
            1. My iOS physical device receives push notifications, but only when the app is in the background or closed but NOT when in the foreground.

            So you want to show notifications in the foreground? You need to implement userNotificationCenter(_:willPresent:withCompletionHandler:), for example, in Swift:

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

            QUESTION

            Unable to receive POST data unless I refresh client. why? How can I wait for post data to be received before page loads?
            Asked 2021-Aug-31 at 05:43

            My app starts with a simple html form. the inputs are PIN# and Date Of Birth.

            My express server runs on the same port 3000, when the user submits their data, puppeteer starts and logs into a specific webpage. Then I scrape the image on that webpage. Google Api takes the text from that image and saves it in an array. I then post that array string to src/results.html. But as soon as the user hits submit, they are redirected to /resuts route right immediately and the page says cannot post the data. but when I see in the console (roughly a minute later) that the post was successful, I refresh the page and I get the array of text I wanted to see.

            How can I await for the data to finish being posted to the route before the page loads the data? Im using react for client side. below is my server side code. client side is just a basic react page login and a static /results page meant for the data.

            ...

            ANSWER

            Answered 2021-Aug-31 at 05:43

            I think I got the problem.

            In the react app, maybe you are not using e.preventDefault() when you click submit. The browser, by default, redirects to a page where the form action is directing, if the action attribute is empty then the browser reloads the same page. I would recommend you to use e.preventDefault() on form submission and then use fetch API to make the request.

            In the express server, on the route POST "results", you are not sending any response back to the user. You should always send a response to the user. In your case you are calling the App function - which has many async functions, but you are not awaiting for App() to complete in the POST route, express is sending default response to the user as soon as it parses App() - it is not waiting for the App() to complete - express will get to this later.

            You can make the (req, res) => { ... } function in the route as async function async (req, res) => { ... }, then you can make the App as async function as well. Then you can await App(...) in the route function. Also, you need to await for the main() function as well inside the App() function. Then once App() call has finished, you can send redirect response to the user.

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

            QUESTION

            Measuring co-occurence patterns in media articles over time with Quanteda
            Asked 2021-Aug-15 at 13:43

            I am trying to measure the number of times that different words co-occur with a particular term in collections of Chinese newspaper articles from each quarter of a year. To do this, I have been using Quanteda and written several R functions to run on each group of articles. My work steps are:

            1. Group the articles by quarter.
            2. Produce a frequency co-occurence matrix (FCM) for the articles in each quarter (Function 1).
            3. Take the column from this matrix for the 'term' I am interested in and convert this to a data.frame (Function 2)
            4. Merge the data.frames for each quarter together, then produce a large csv file with a column for each quarter and a row for each co-occurring term.

            This seems to work okay. But I wondered if anybody more skilled in R might be able to check what I am doing is correct, or might suggest a more efficient way of doing it?

            Thanks for any help!

            ...

            ANSWER

            Answered 2021-Aug-13 at 09:28

            If you are interested in counting co-occurrences within a window for specific target terms, a better way is to use the window argument of tokens_select(), and then to count occurrences from a dfm on the window-selected tokens.

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install fcm

            Notice This plugin is intended to be used combined with Capacitor API for Push Notifications. Capacitor only provides APN token whereas this plugin offers the possibility to work with FCM tokens and more.
            Tip: every time you change a native code you may need to clean up the cache (Product > Clean build folder) and then run the app again.
            sudo gem install cocoapods (once a time)
            ionic start my-cap-app --capacitor
            cd my-cap-app
            mkdir www && touch www/index.html
            npx cap add ios
            npm install --save @capacitor-community/fcm
            npx cap sync ios (always do sync after a plugin install)
            npx cap open ios
            sign your app at xcode (general tab)
            enable remote notification capabilities
            add GoogleService-Info.plist to the app folder in xcode
            on your MainActivity.java file add import com.getcapacitor.community.fcm.FCMPlugin; and then inside the init callback add(FCMPlugin.class);. Now you should be set to go. Try to run your client using ionic cap run android --livereload. Tip: every time you change a native code you may need to clean up the cache (Build > Clean Project | Build > Rebuild Project) and then run the app again.
            ionic start my-cap-app --capacitor
            cd my-cap-app
            mkdir www && touch www/index.html
            npx cap add android
            npm install --save @capacitor-community/fcm
            npx cap sync android (always do sync after a plugin install)
            npx cap open android
            add google-services.json to your android/app folder
            [extra step] in android case we need to tell Capacitor to initialise the plugin:

            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
            CLONE
          • HTTPS

            https://github.com/capacitor-community/fcm.git

          • CLI

            gh repo clone capacitor-community/fcm

          • sshUrl

            git@github.com:capacitor-community/fcm.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular Authentication Libraries

            supabase

            by supabase

            iosched

            by google

            monica

            by monicahq

            authelia

            by authelia

            hydra

            by ory

            Try Top Libraries by capacitor-community

            barcode-scanner

            by capacitor-communityJava

            sqlite

            by capacitor-communitySwift

            electron

            by capacitor-communityTypeScript

            react-hooks

            by capacitor-communityTypeScript

            bluetooth-le

            by capacitor-communityTypeScript