{"id":17172578,"url":"https://github.com/pablo/fcm-test","last_synced_at":"2025-03-24T20:14:27.965Z","repository":{"id":36129669,"uuid":"195476546","full_name":"pablo/fcm-test","owner":"pablo","description":null,"archived":false,"fork":false,"pushed_at":"2022-11-16T12:35:53.000Z","size":14,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-30T00:29:36.704Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/pablo.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":"2019-07-05T23:17:38.000Z","updated_at":"2019-08-02T12:32:29.000Z","dependencies_parsed_at":"2023-01-16T22:43:40.943Z","dependency_job_id":null,"html_url":"https://github.com/pablo/fcm-test","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablo%2Ffcm-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablo%2Ffcm-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablo%2Ffcm-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablo%2Ffcm-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pablo","download_url":"https://codeload.github.com/pablo/fcm-test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245344004,"owners_count":20599867,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-14T23:37:19.328Z","updated_at":"2025-03-24T20:14:27.939Z","avatar_url":"https://github.com/pablo.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fcm-test\n\nThis is a very small and simple to test push notification sending through Google's FCM. It was useful for\nme when I needed to test push notifications in a hostile (in terms of networking conditions) remote\nenvironment which I did not have control on.\n\nFeel free to add what you need and send me a pull request. I almost always approve them without\nmuch hesitation (or control). I know this is bad.\n\nIt has way more dependencies that I would have liked:\n\n* Google API Client (and all of its dependencies)\n* log4j2\n* Jackson\n* Jackson Databind\n\nIf you manage to remove some, I would love to merge your changes since I hate having dependencies I \ncould have avoided with a couple of lines of code.\n\n## Usage\n\nFirst of all, copy all JAR dependencies on the same folder the `fcm-test.jar` is.\n\nThen, create a `config.json` file similar to this:\n\n```json\n{\n  \"keyFile\": \"/path/to/your/service-account.json\",\n  \"qty\": 3,\n  \"doEnumerateMessages\": true,\n  \"projectId\": \"your-project-id\",\n  \"message\": \"This is a TEST MESSAGE from the grave\",\n  \"title\": \"TESTING, TESTING...\",\n  \"tokens\": [\n    \"list\",\n    \"all-the\",\n    \"push-notifications\",\n    \"tokens you want to send the notification to\"\n  ],\n  \"additionalData\": null\n}\n```\n\nWhere:\n\n1. `keyFile` is the `service-account.json` file. You get this from the FCM console at Google's site.\n2. `qty` is how many messages  you want to send.\n3. `doEnumerateMessages` indicates if software should append message number to `title` and `message`.\n4. `projectId` is the configured project id. You set this in the FCM console at Google's site.\n5. `message` is the message you want to send\n6. `title` is the title you want to send\n7. `tokens` is a JSON array of the push notifications tokens you want the messages sent to.\n8. additionalData is a JSON object that will be sent along with the notification\n\nFinally, you just run:\n\n```$ java -jar fcm-test.jar```\n\nIf everything is configured as expected, you should get all the notifications on your devices.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpablo%2Ffcm-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpablo%2Ffcm-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpablo%2Ffcm-test/lists"}