{"id":17689867,"url":"https://github.com/viktorholk/push-notifications-api","last_synced_at":"2025-04-09T22:12:44.734Z","repository":{"id":45267272,"uuid":"299930220","full_name":"viktorholk/push-notifications-api","owner":"viktorholk","description":"📱 Send Instant Push Notifications to your Android Phone through a REST-API.","archived":false,"fork":false,"pushed_at":"2025-01-10T16:51:17.000Z","size":505,"stargazers_count":61,"open_issues_count":0,"forks_count":12,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-09T22:12:38.218Z","etag":null,"topics":["android","java","notifications","push-notifications","rest-api","server-side-events"],"latest_commit_sha":null,"homepage":"https://play.google.com/store/apps/details?id=com.viktorholk.apipushnotifications","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/viktorholk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-30T13:35:39.000Z","updated_at":"2025-03-21T20:11:59.000Z","dependencies_parsed_at":"2024-10-24T14:28:27.028Z","dependency_job_id":"f438d630-242f-441b-be0e-2f534a8c0fb9","html_url":"https://github.com/viktorholk/push-notifications-api","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viktorholk%2Fpush-notifications-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viktorholk%2Fpush-notifications-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viktorholk%2Fpush-notifications-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viktorholk%2Fpush-notifications-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/viktorholk","download_url":"https://codeload.github.com/viktorholk/push-notifications-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248119293,"owners_count":21050755,"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":["android","java","notifications","push-notifications","rest-api","server-side-events"],"created_at":"2024-10-24T11:49:06.853Z","updated_at":"2025-04-09T22:12:44.712Z","avatar_url":"https://github.com/viktorholk.png","language":"Java","readme":"\u003ca href=\"https://apt.izzysoft.de/fdroid/index/apk/com.viktorholk.apipushnotifications\"\u003e\u003cimg src=\"https://img.shields.io/endpoint?url=https://apt.izzysoft.de/fdroid/api/v1/shield/com.viktorholk.apipushnotifications\u0026logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAADAFBMVEUA0////wAA0v8A0v8A0////wD//wAFz/QA0/8A0/8A0/8A0/8A0v///wAA0/8A0/8A0/8A0/8A0//8/gEA0/8A0/8B0/4A0/8A0/8A0/+j5QGAwwIA0//C9yEA0/8A0/8A0/8A0/8A0/8A0/+n4SAA0/8A0/8A0/+o6gCw3lKt7QCv5SC+422b3wC19AC36zAA0/+d1yMA0/8A0/+W2gEA0/+w8ACz8gCKzgG7+QC+9CFLfwkA0/8A0////wAA0/8A0/8A0/8A0/+f2xym3iuHxCGq5BoA1P+m2joI0vONyiCz3mLO7oYA0/8M1Piq3Ei78CbB8EPe8LLj9Ly751G77zWQ1AC96UYC0fi37CL//wAA0/8A0////wD//wCp3jcA0/+j3SGj2i/I72Sx4zHE8FLB8zak1kYeycDI6nRl3qEA0/7V7psA0v6WzTa95mGi2RvB5XkPy9zH5YJ3uwGV1yxVihRLiwdxtQ1ZkAf//wD//wD//wD//wD//wCn5gf//wD//wD//wD//wD//wAA0/+h4A3R6p8A0/+X1w565OD6/ARg237n9csz2vPz+gNt37V/vifO8HW68B/L6ZOCwxXY8KRQsWRzhExAtG/E612a1Rd/pTBpmR9qjysduKVhmxF9mTY51aUozK+CsDSA52T//wD//wAA0////wD//wBJ1JRRxFWjzlxDyXRc0pGT1wCG0CWB3VGUzSTh8h6c0TSr5CCJ5FFxvl6s4H3m8xML0/DA5CvK51EX1N+Y2gSt4Dag3ChE3fax2ki68yO57NF10FRZnUPl88eJxhuCxgCz5EOLwEGf1DFutmahzGW98x0W1PGk3R154MHE6bOn69qv3gy92oG90o+Hn07B7rhCmiyMwECv1nO+0pQfwrCo57xF2daXsVhKrEdenQAduaee1Bsjr42z5D9RoCXy+QNovXpy2Z5MtWDO/TiSukaF3UtE1K6j3B4YwLc5wXlzpyIK0u5zy3uJqg4pu5RTpkZmpVKyAP8A0wBHcExHcEyBUSeEAAABAHRSTlP///9F9wjAAxD7FCEGzBjd08QyEL39abMd6///8P/ZWAnipIv/cC6B//7////////L/1Dz/0D///////86/vYnquY3/v///5T//v///17///////////////84S3QNB/8L/////////////7r/////NP////9l/////wPD4yis/x7Ym2lWSP+em////0n////////v///////////////////7//7pdGN3Urr6/+v/6aT////+//H/o2P/1v+7r7jp4PM/3p4g////g///K///481LxO///v////9w////8v/////9/p3J///a+P9v/5KR/+n///+p/xf//8P//wAAe7FyaAAABCZJREFUSMdj+E8iYKBUgwIHnwQ3N7cEHxcH+///VayoAE0Dh41qR7aBnCIQ8MsJKHH9/99czYYMWlA0cIkJGjMgAKfq//9RNYzIgLcBWYOTiCgDMhDn+B9bh6LebiWyH6L5UZQzONoAHWSHoqEpDkkDsyKqelv1//9rG1HUN9YihZK9AKp6BkG+/6xNqA5ajhSsCkrIipmYGGRa//9vQXVQXSySBnkWJOUMfn5Myuz/G3hR1NdEIUUchwiy+bkTsg4dbW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HMilt4QBJwsSkBMClxOQULBlkRRwEONmR2kJcDGjADX2/+xO8r5iqjExqmLyrWpcPFRta1BfAwCtyN3XpuJ4RgAAAABJRU5ErkJggg==\"\u003e\u003c/a\u003e\n\n\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://i.imgur.com/aO2e1bD.png\" width=128 align=\"center\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cb\u003ePush Notifications API\u003c/b\u003e\n\u003c/p\u003e\n\n# About\n\nPush Notifications API is a simple Android app for displaying notifications on your phone through a REST-API. Using a Node server with server sent events.\n\nIt is a tool for developers that need a easy way to post notifications to their phone. The application requires an API to handle all the notifications. There is a working example of a Node server in the [server](https://github.com/viktorholk/push-notifications-api/tree/main/server) folder that works with the Android app.\n\nThe application is great for IoT (Internet of Things). You could for example post a notification to your phone every time your garden needs watering when a sensor has detected the level of soil moisture to be low. The possibilites are up to you!\n\n\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/7f6e2fc4-acb6-4f8d-b369-b91be488fbb2\" alt=\"animated\" /\u003e\n\u003c/p\u003e\n\n# Installation\n## Android App\nYou can download the Android app through [Google Play](https://play.google.com/store/apps/details?id=com.viktorholk.apipushnotifications) or download the latest apk from the [releases](https://github.com/viktorholk/push-notifications-api/releases).\n\n### Connect\n\nIn the configuration tab type in the `/events` endpoint on your server\n\nYou can find the IP-address in the server log\n\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/32514246-545b-486e-9940-19d80c970aa2\" alt=\"animated\" /\u003e\n\u003c/p\u003e\n\n## Server\n\nIf you haven't already, install [Node](https://nodejs.org/en/download/prebuilt-binaries).\n### Clone the Project\n\n```\ngit clone git@github.com:viktorholk/push-notifications-api.git\ncd push-notifications-api/server\nnpm i\n```\n### Start the Server\n```\nnpm run start\n```\n\nThe app will by default run on port 3000 and the endpoint for the notification events are ``/events``\n\nThe port can be changed in the ``server/.env`` file\n\n### API Reference\n\nReplace `127.0.0.1:3000` with your IP and port\n\n#### Push Notification\n\n```http\nPOST http://127.0.0.1:3000\n```\n\u003cdetails\u003e\u003csummary\u003eExample Curl\u003c/summary\u003e\n  \n````\ncurl '127.0.0.1:3000' \\\n--header 'Content-Type: application/json' \\\n--data '{\n   \"title\": \"Foo Bar Baz!\",\n    \"message\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\",\n    \"url\": \"http://example.com\",\n    \"icon\": \"suitcase.png\",\n    \"color\": \"#1554F0\"\n}'\n````\n\n\u003c/details\u003e\n\n|Property|Type|Description|Required|\n|---|---|---|---|\n|title|String|The title of the notification|**Yes**|\n|message|String|The longer text that will be included in the notification|No|\n|url|String|Open the URL on notifcation press|No|\n|icon|String|24x24 icon file located in `server/src/icons`|No|\n|color|String|Customize the notification color. See supported [colors](https://developer.android.com/reference/android/graphics/Color#parseColor(java.lang.String)) |No|\n\n##### Response\n`Created 201`\n\n#### Get All Notifications\n\n```http\nGET http://127.0.0.1:3000\n```\n\n##### Response\n````\n[\n  {\n    \"title\": \"Foo Bar Baz!\",\n    \"message\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\",\n    \"url\": \"http://example.com\",\n    \"icon\": \"base64encoded...\",\n    \"color\": \"#1554F0\"\n  },\n  ...\n]\n````\n\n#### Get The Latest Notification\n\n```http\nGET http://127.0.0.1:3000/latest\n```\n\n##### Response\n````\n{\n  \"title\": \"Foo Bar Baz!\",\n  \"message\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\",\n  \"url\": \"http://example.com\",\n  \"icon\": \"base64encoded...\",\n  \"color\": \"#1554F0\"\n}\n````\n\n\n## Common Asked Questions\n\n\u003cdetails\u003e\u003csummary\u003eNotifications are not showing up\u003c/summary\u003e\n\nMake sure notifications are enabled in your settings\n\nSettings \u003e Notifications \u003e App notifications\n\n![image](https://github.com/user-attachments/assets/12685adf-7a74-4915-bda6-045175031afb)\n\n\n\u003c/details\u003e\n\n## Issues\n\nPlease report issues using [GitHub's issues tab](https://github.com/viktorholk/push-notifications-api/issues).\n\n## License\n\nPush Notifications API is under the [MIT LICENSE](LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviktorholk%2Fpush-notifications-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviktorholk%2Fpush-notifications-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviktorholk%2Fpush-notifications-api/lists"}