{"id":29623898,"url":"https://github.com/mikemitterer/dart-fcm-push","last_synced_at":"2025-10-04T00:13:06.292Z","repository":{"id":56828721,"uuid":"83819095","full_name":"MikeMitterer/dart-fcm-push","owner":"MikeMitterer","description":null,"archived":false,"fork":false,"pushed_at":"2019-04-16T22:56:31.000Z","size":147,"stargazers_count":8,"open_issues_count":5,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-16T06:44:20.210Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MikeMitterer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-03T16:34:48.000Z","updated_at":"2022-11-10T16:03:10.000Z","dependencies_parsed_at":"2022-08-29T02:41:24.017Z","dependency_job_id":null,"html_url":"https://github.com/MikeMitterer/dart-fcm-push","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/MikeMitterer/dart-fcm-push","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeMitterer%2Fdart-fcm-push","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeMitterer%2Fdart-fcm-push/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeMitterer%2Fdart-fcm-push/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeMitterer%2Fdart-fcm-push/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MikeMitterer","download_url":"https://codeload.github.com/MikeMitterer/dart-fcm-push/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeMitterer%2Fdart-fcm-push/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266242072,"owners_count":23898102,"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":"2025-07-21T05:08:22.705Z","updated_at":"2025-10-04T00:13:01.257Z","avatar_url":"https://github.com/MikeMitterer.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fcm-push\n\u003e A Dart interface to Firebase Cloud Messaging (FCM) for Android and iOS\n\nYou can use fcm-push either as commandline tool or you can use it as a library.\n\n## Prerequisite\n   - [Setup FB](https://firebase.google.com/docs/cloud-messaging/)\n   - [Firebase Cloud Messaging step by step](https://www.youtube.com/watch?v=jh9Yqfq5CSg\u0026t=5s)\n   - [Android Application - Quick start](https://github.com/firebase/quickstart-android/tree/master/messaging)\n   - [Server Key - StackOverflow](https://stackoverflow.com/a/42439563/504184)  \n   (Maybe someone want's to create a Flutter-Sample)\n   \nIn your `fcm-push.yaml` (see below) you need your **fcm.server.key** and **token**\n\nFor the **server.key** go to your Firebase console / Settings:\n![Screenshot](https://raw.githubusercontent.com/MikeMitterer/dart-fcm-push/master/doc/images/server-key.png)  \n     \nFor the **token** check out this Android-Example on GitHub: https://github.com/MikeMitterer/fcm-push-Frontend\nThe **token** get's logged to the console - see [line #39 in MyFirebaseInstanceIDService.java](https://github.com/MikeMitterer/fcm-push-Frontend/blob/master/app/src/main/java/com/google/firebase/quickstart/fcm/MyFirebaseInstanceIDService.java#L39)\n      \n## Command-line\n\nActivate fcm-push:\n```bash\npub global activate fcm_push\n```\n\nCreate fcm-push.yaml:\n```yaml\nfcm.server.key: \u003cyour server key\u003e\ntoken: \u003ceithe your phone-ID or a registered subject\u003e\n```\n\nSend your message: `fcm-push 'Hello Android' 'Dart rocks!'`\n\n```bash\nUsage: fcm-push \u003coptions\u003e title [body]\n    -h, --help           Shows this message\n    -s, --settings       Prints settings\n    -t, --token          subject or token\n    -f, --config_file    Change config file\n    -v, --loglevel       Sets the appropriate loglevel\n                         [info, debug, warning]\n\nSample:\n\n    Send message:\n        fcm-push 'Hello Android' 'Dart rocks!'\n```\n\n## As library\n\n```dart\nimport 'package:fcm_push/fcm_push.dart';\n\nfinal String serverKey = \"\";\nfinal String token = \"\";\n\nFuture\u003cint\u003e main() async {\n    final FCM fcm = new FCM(serverKey);\n    \n    final Message fcmMessage = new Message()\n        ..to = token\n        ..title = _config.title\n        ..body = _config.body\n    ;\n    \n    final String messageID = await fcm.send(fcmMessage);\n}\n```\n\n### Links\n   - [Send messages to specific devices](https://firebase.google.com/docs/cloud-messaging/send-message#send_messages_to_specific_devices)\n   - [Dash-Button on GH](https://github.com/MikeMitterer/cpp-dash-button)\n   \n### License\n\n    Copyright 2018 Michael Mitterer (office@mikemitterer.at),\n    IT-Consulting and Development Limited, Austrian Branch\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,\n    either express or implied. See the License for the specific language\n    governing permissions and limitations under the License.\n\n\nIf this plugin is helpful for you - please [(Circle)](http://gplus.mikemitterer.at/) me,  \nFollow me on [Twitter](http://twitter.mikemitterer.at/) or **star** this repo here on GitHub.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikemitterer%2Fdart-fcm-push","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikemitterer%2Fdart-fcm-push","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikemitterer%2Fdart-fcm-push/lists"}