All Projects → HMS-Core → hms-push-serverdemo-java

HMS-Core / hms-push-serverdemo-java

Licence: Apache-2.0 license
Java sample code encapsulates APIs of the HUAWEI Push Kit server. It provides many sample programs for your reference or usage.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to hms-push-serverdemo-java

hms-push-serverdemo-php
PHP sample code encapsulates APIs of the HUAWEI Push Kit server.It provides many sample PHP programs about quick access to HUAWEI Push Kit for your reference or usage.
Stars: ✭ 21 (-46.15%)
Mutual labels:  push-notifications, push, huawei, hms, sever, sendmessage
hms-push-serverdemo-csharp
C# sample code encapsulates APIs of the HUAWEI Push Kit server. It provides many sample programs for your reference or usage.
Stars: ✭ 25 (-35.9%)
Mutual labels:  push-notifications, push, huawei, hms, sendmessage
hms-cordova-plugin
This repo contains all of Cordova HMS plugins.
Stars: ✭ 78 (+100%)
Mutual labels:  push-notifications, push, huawei, hms
hms-react-native-plugin
This repo contains all of React-Native HMS plugins.
Stars: ✭ 167 (+328.21%)
Mutual labels:  push-notifications, push, huawei, hms
Onepush
消息推送用OnePush,就够了!
Stars: ✭ 1,401 (+3492.31%)
Mutual labels:  push-notifications, push, huawei
andpush
Android Push Notification in Ruby: The fastest client for FCM (Firebase Cloud Messaging)
Stars: ✭ 83 (+112.82%)
Mutual labels:  push-notifications, push
spontit-api-python-wrapper
Send functional, flexible push notifications to iOS, Android, and desktop devices (without your own app or website).
Stars: ✭ 35 (-10.26%)
Mutual labels:  push-notifications, push
xinge
腾讯信鸽push Golang lib
Stars: ✭ 25 (-35.9%)
Mutual labels:  push-notifications, push
Easynotifylibproject
Send firebase notifications to your users very easily: A new Android Lib
Stars: ✭ 31 (-20.51%)
Mutual labels:  push-notifications, push
ejabberd mod apns
An ejabberd module to send PUSH messages to iOS devices through APNS
Stars: ✭ 31 (-20.51%)
Mutual labels:  push-notifications, push
hms-audio-demo
HMS audio android sample code encapsulates APIs of the HUAWEI Audio Kit, which focuses on audio playback, audio effects and audio data.
Stars: ✭ 20 (-48.72%)
Mutual labels:  huawei, hms
mobile-messaging-sdk-ios
Mobile Messaging SDK for iOS
Stars: ✭ 45 (+15.38%)
Mutual labels:  push-notifications, push
Push.js
The world's most versatile desktop notifications framework 🌎
Stars: ✭ 8,536 (+21787.18%)
Mutual labels:  push-notifications, push
mobile-messaging-cordova-plugin
Mobile Messaging SDK plugin for Cordova projects
Stars: ✭ 19 (-51.28%)
Mutual labels:  push-notifications, huawei
Notificationpusher
Standalone PHP library for easy devices notifications push.
Stars: ✭ 1,143 (+2830.77%)
Mutual labels:  push-notifications, push
React Native Onesignal
React Native Library for OneSignal Push Notifications Service
Stars: ✭ 1,270 (+3156.41%)
Mutual labels:  push-notifications, push
Socket.io Push
整合了小米,华为,友盟,谷歌,苹果推送的统一解决方案
Stars: ✭ 605 (+1451.28%)
Mutual labels:  push-notifications, push
homebridge-http-rgb-push
Homebridge plugin to control a web/http-based RGB device.
Stars: ✭ 16 (-58.97%)
Mutual labels:  push-notifications, push
fcmpush
Firebase Cloud Messaging API wrapper for Ruby, suppot HTTP v1 API including access_token auto refresh feature.
Stars: ✭ 44 (+12.82%)
Mutual labels:  push-notifications, push
Ng Toolkit
⭐️ Angular tool-box! Start your PWA in two steps! Add Serverless support for existing projects and much more
Stars: ✭ 1,116 (+2761.54%)
Mutual labels:  push-notifications, push

HMS Core Push Kit Sample Code (Java)

English | 中文

Contents

Introduction

The sample code for Java encapsulates the server-side APIs of Push Kit, for your reference or direct use.

The following table describes packages of Java sample code.

Package Description
examples Sample code packages.
messaging Package where Push Kit server APIs are encapsulated.

Environment Requirements

JDK 8.0 or later is recommended.

Configuration

Set the following parameters.

Parameter Description
appid App ID, which is obtained from the app information.
appsecret App secret, which is obtained from the app information.
token_server URL for Huawei OAuth 2.0 to obtain a token. For details, please refer to OAuth 2.0-based Authentication.
push_open_url Access address of Push Kit. For details, please refer to Downlink Message Sending.

Sample Code

1. Send an Android data message.

Code location: examples/sendDataMessage.java

2. Send an Android notification message.

Code location: examples/sendNotifyMessage.java

3. Send a message by topic.

Code location: examples/sendTopicMessage.java

4. Send a message by conditions.

Code location: examples/sendConditionMessage.java

5. Send a message to a Huawei quick app.

Code location: examples/sendInstanceAppMessage.java

6. Send a message through the WebPush agent.

Code location: examples/sendWebpushMessage.java

7. Send a message through the APNs agent.

Code location: examples/sendApnsMessage.java

8. Send a test message.

Code location: examples/sendTestMessage.java

Technical Support

You can visit the Reddit community to obtain the latest information about HMS Core and communicate with other developers.

If you have any questions about the sample code, try the following:

  • Visit Stack Overflow, submit your questions, and tag them with huawei-mobile-services. Huawei experts will answer your questions.
  • Visit the HMS Core section in the HUAWEI Developer Forum and communicate with other developers.

If you encounter any issues when using the sample code, submit your issues or submit a pull request.

License

The sample code is licensed under Apache License 2.0.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].