{"id":38058158,"url":"https://github.com/a914-gowtham/fcm-sender","last_synced_at":"2026-01-16T20:27:04.379Z","repository":{"id":57732209,"uuid":"292029092","full_name":"a914-gowtham/fcm-sender","owner":"a914-gowtham","description":"A simple FCM push notification sender library for Android to send FCM push notifications to Android, iOS \u0026 Web.","archived":false,"fork":false,"pushed_at":"2023-05-12T16:52:18.000Z","size":249,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T16:33:51.908Z","etag":null,"topics":["fcm","fcm-messaging","fcm-notifications","fcm-push-notification","firebase","notifications","push-notifications"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/a914-gowtham.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-01T15:02:42.000Z","updated_at":"2025-03-30T17:06:23.000Z","dependencies_parsed_at":"2022-08-28T07:50:51.054Z","dependency_job_id":null,"html_url":"https://github.com/a914-gowtham/fcm-sender","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/a914-gowtham/fcm-sender","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a914-gowtham%2Ffcm-sender","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a914-gowtham%2Ffcm-sender/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a914-gowtham%2Ffcm-sender/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a914-gowtham%2Ffcm-sender/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a914-gowtham","download_url":"https://codeload.github.com/a914-gowtham/fcm-sender/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a914-gowtham%2Ffcm-sender/sbom","scorecard":{"id":158335,"data":{"date":"2025-08-11","repo":{"name":"github.com/a914-gowtham/fcm-sender","commit":"6e6e43761c744ef7b471c3ea56785dd4cf6b57ae"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/20 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-16T12:34:32.818Z","repository_id":57732209,"created_at":"2025-08-16T12:34:32.818Z","updated_at":"2025-08-16T12:34:32.818Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28482267,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fcm","fcm-messaging","fcm-notifications","fcm-push-notification","firebase","notifications","push-notifications"],"created_at":"2026-01-16T20:27:03.739Z","updated_at":"2026-01-16T20:27:04.367Z","avatar_url":"https://github.com/a914-gowtham.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![](https://jitpack.io/v/a914-gowtham/fcm-sender.svg)](https://jitpack.io/#a914-gowtham/fcm-sender)\n[![Maven Central](https://img.shields.io/maven-central/v/io.github.a914-gowtham/fcm-sender.svg?label=Maven%20Central)](https://search.maven.org/artifact/io.github.a914-gowtham/fcm-sender/1.0.33/aar)\n\n# FCM-Sender\n\n##### Push Notification Library for Android. It uses FCM rest api provided by Firebase\nhttps://firebase.google.com/docs/cloud-messaging/send-message\n\n## How to Use\n*For a working implementation, please have a look at the Sample Project*\n\n1. Include the library as local library project.\n\n+ Setup firebase messsaging [Refer this](https://firebase.google.com/docs/cloud-messaging/android/client?authuser=1)\n\n+ Add the dependency to your app `build.gradle` file\n ```gradle\n dependencies {\n    implementation 'com.github.a914-gowtham:fcm-sender:Tag'\n }\n ```\n + Add to project's root `build.gradle` file:\n```gradle\nallprojects {\n\trepositories {\n\t\tmaven { url 'https://jitpack.io' }\n\t}\n}\n```\n2. Create FcmSender builder and sendPush\n```kotlin\n   val data = JSONObject()\n        data.put(\"title\", \"Message from Jon\")\n        data.put(\"message\", \"Click to view..\")\n        data.put(\"type\", \"new_message\")\n        \n         val push = FCMSender.Builder()\n            .serverKey(\"your firebase serverkey\")\n            .toTokenOrTopic(\"topic/TestTopic\") //either topic or user registration token\n//          .toMultipleTokens(listOfToken)\n            .responseListener(this)\n//          .setTimeToLive(30) // 0 to 2,419,200 seconds (4 weeks)\n//          .setDryRun(false)  //test a request without actually sending a message.\n            .setData(data)\n            .build()\n        push.sendPush(this)\n```\n\n* Java\n```java\n     JSONObject data=new JSONObject();\n        data.put(\"title\",\"Message from Jon\");\n        data.put(\"message\", \"Click to view..\");\n        data.put(\"type\", \"new_message\");\n        \n       FCMSender fcmSender= new FCMSender.Builder()\n               .serverKey(\"your firebase serverkey\")\n               .toTokenOrTopic(\"/topics/myTopic\") //use either topic or user registration token\n//             .toMultipleTokens(listOfToken)\n               .responseListener(this)\n//             .setTimeToLive(30) // 0 to 2,419,200 seconds (4 weeks)\n//             .setDryRun(false)  //test a request without actually sending a message.\n               .setData(data)\n               .build();\n       fcmSender.sendPush(this);\n```\n\n3. Using callback\n```kotlin\nclass MainActivity : AppCompatActivity(), FCMSender.ResponseListener{\n   override fun onSuccess(response: String) {\n        Log.d(\"onSuccess\",response)\n    }\n\n    override fun onFailure(errorCode: Int,message: String) {\n        Log.d(\"onFailure\",\"ErrorCode::$errorCode\")\n    }\n}\n```\n\n4 Handle notification data on Client side in FirebaseMessagingService\n* Kotlin\n```kotlin\nclass FireBasePush : FirebaseMessagingService() {\noverride fun onMessageReceived(remoteMessage: RemoteMessage) {\nsuper.onMessageReceived(remoteMessage)\n\n   val nData: Map\u003cString,String\u003e = remoteMessage.data\n   Log.d(\"TAG\",\"Remote msg::\"+ndata.toString())\n        val title= nData[\"title\"]\n        val message= nData[\"message\"]\n}}\n```\n\n* Java\n```java\npublic class FireBasePush extends FirebaseMessagingService{\n    @Override\n    public void onMessageReceived(@NonNull RemoteMessage remoteMessage) {\n        super.onMessageReceived(remoteMessage);\n        \n         Map\u003cString, String\u003e ndata = remoteMessage.getData();\n\t Log.d(\"TAG\",\"Remote msg::\"+ndata.toString());\n         String title=nData.get(\"title\");\n         String message=nData.get(\"message\");\n}}   \n```\n\n## Usages\n\n### Send to Single device\n.toTokenOrTopic(\"user registration token\")\n\n### Send to Multiple devices\n.toMultipleTokens(listOfTokens)\n\n### Send to Group of devices\nSubscribe a topic on client device and send push to that topic\n```java\nFirebaseMessaging.getInstance().subscribeToTopic(\"/topics/testTopic2\");\n```\n\n### TimeToLive\nThis parameter specifies how long (in seconds) the message should be kept in FCM storage\nif the device is offline. The maximum time to live supported is 4 weeks, and the default value is 4 weeks.\n\n* use cases:\n  - Video chat incoming calls \n  - Expiring invitation events\n  - Calendar events\n\n### DryRun\nThis parameter, when set to **true**, allows developers to test a request without actually sending a message.\n\nThe default value is **false.**\n\n  \n## Reference\nhttps://firebase.google.com/docs/cloud-messaging/http-server-ref#table1\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa914-gowtham%2Ffcm-sender","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa914-gowtham%2Ffcm-sender","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa914-gowtham%2Ffcm-sender/lists"}