{"id":19737984,"url":"https://github.com/devsu/push-sender","last_synced_at":"2025-04-30T05:30:49.502Z","repository":{"id":57718762,"uuid":"48511901","full_name":"devsu/push-sender","owner":"devsu","description":"Java library that allows you to easily send push messages, via GCM (or FCM) and APNS.","archived":false,"fork":false,"pushed_at":"2020-10-13T04:27:14.000Z","size":27,"stargazers_count":8,"open_issues_count":1,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-05T22:51:10.756Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devsu.png","metadata":{"files":{"readme":"README.MD","changelog":"CHANGELOG.MD","contributing":null,"funding":null,"license":"LICENSE.TXT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-23T21:30:05.000Z","updated_at":"2022-03-03T02:12:11.000Z","dependencies_parsed_at":"2022-09-26T21:40:30.632Z","dependency_job_id":null,"html_url":"https://github.com/devsu/push-sender","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsu%2Fpush-sender","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsu%2Fpush-sender/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsu%2Fpush-sender/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsu%2Fpush-sender/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devsu","download_url":"https://codeload.github.com/devsu/push-sender/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251648505,"owners_count":21621355,"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-11-12T01:12:59.578Z","updated_at":"2025-04-30T05:30:49.226Z","avatar_url":"https://github.com/devsu.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Push Sender [DEPRECATED]#\n\nPush Sender is a Java library that allows sending push messages easily, based on the awesome libraries [gcm-server](https://github.com/theganyo/gcm-server) by [theganyo](https://github.com/theganyo) and [java-apns](https://github.com/notnoop/java-apns) by [notnoop](https://github.com/notnoop). Be sure to check them out! Send push messages with one line of code, forget about the rest, and focus on making your application's business logic!\n\n## Overview ###\n\nUsing Push Sender is very simple. You can import Push Sender on your POM file using:\n\n```\n\t\u003cdependency\u003e\n\t\t\u003cgroupId\u003ecom.devsu\u003c/groupId\u003e\n\t\t\u003cartifactId\u003epush-sender\u003c/artifactId\u003e\n\t\t\u003cversion\u003e1.0.3\u003c/version\u003e\n\t\u003c/dependency\u003e\n```\n\n## Synchronous and asynchronous push services ###\n\nYou can send your push messages synchronously and asynchronously by choosing any of the implementations of `PushService`.\n\n```java\npublic class MySender {\n\n\tSyncAndroidPushService syncAndroidService = new SyncAndroidPushService(GCM_API_KEY);\n\tAsyncAndroidPushService asyncAndroidService = new SyncAndroidPushService(GCM_API_KEY, null);\n\t\n\tSyncApplePushService syncAppleService = new SyncApplePushService(P12_FILEPATH, P12_PASSWORD, IS_PRODUCTION_ENVIRONMENT);\n\tAsyncApplePushService asyncAppleService = new AsyncApplePushService(P12_FILEPATH, P12_PASSWORD, IS_PRODUCTION_ENVIRONMENT, null);\n\t\n\t...\n\t\n\tpublic void sendSomePushMessages() {\n\t\tString title = \"My Push Message Title\";\n\t\tString content = \"Hello! This is a push message!\";\n\t\t\n\t\tsyncAndroidService.sendPush(title, content, ANDROID_PUSH_TOKEN);\n\t\tasyncAndroidService.sendPush(title, content, ANDROID_PUSH_TOKEN);\n\t\t\n\t\tsyncAppleService.sendPush(title, content, IOS_PUSH_TOKEN);\n\t\tasyncAppleService.sendPush(title, content, IOS_PUSH_TOKEN);\n\t}\n\n\t...\n}\n```\n\n## PushCallback ###\n\nYou can implement a PushCallback for any of the asynchronous services.\n\n```java\npublic class MySender {\n\n\t...\n\t\t\n\tpublic void sendSomePushMessages() {\n\t\tAsyncAndroidPushService asyncAndroidService = new SyncAndroidPushService(GCM_API_KEY, new PushCallback() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onSingleSuccess(boolean result, String title, String message, \n\t\t\t\t\tMap\u003cString, String\u003e additionalFields, String token) {\n\t\t\t\tSystem.out.println(\"The single message was successfully sent!\");\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onError(Throwable t) {\n\t\t\t\tSystem.err.println(\"Oops... Something happened!\");\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onBulkSuccess(boolean result, String title, String message, \n\t\t\t\t\tMap\u003cString, String\u003e additionalFields, String[] tokens) {\n\t\t\t\tSystem.out.println(\"The bulk message was successfully sent!\");\n\t\t\t}\n\t\t});\n\t}\n\n\t...\n}\n```\n\n## Customizing ###\n+ You can customize any data sent on your push message with a `Map\u003cString, String\u003e` that contains any key-value pair you want to send.\n+ You can build your `Message.Builder` or `PayloadBuilder` objects externally and send them as push messages!\n+ You can customize settings like max retries, collapse keys, production/sandbox environments, bulk size when sending simultaneous push messages on Android and more... \n\n## Authors ##\nFeel free to contact Alvaro López at rion18@hotmail.com!\n\n## License ###\n\nCopyright 2015 Devsu Software\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevsu%2Fpush-sender","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevsu%2Fpush-sender","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevsu%2Fpush-sender/lists"}