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

HMS-Core / hms-push-serverdemo-csharp

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

Programming Languages

C#
18002 projects

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

hms-push-serverdemo-java
Java sample code encapsulates APIs of the HUAWEI Push Kit server. It provides many sample programs for your reference or usage.
Stars: ✭ 39 (+56%)
Mutual labels:  push-notifications, push, huawei, hms, sendmessage
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 (-16%)
Mutual labels:  push-notifications, push, huawei, hms, sendmessage
hms-react-native-plugin
This repo contains all of React-Native HMS plugins.
Stars: ✭ 167 (+568%)
Mutual labels:  push-notifications, push, huawei, hms
hms-cordova-plugin
This repo contains all of Cordova HMS plugins.
Stars: ✭ 78 (+212%)
Mutual labels:  push-notifications, push, huawei, hms
Onepush
消息推送用OnePush,就够了!
Stars: ✭ 1,401 (+5504%)
Mutual labels:  push-notifications, push, huawei
hms-audio-editor-demo
HUAWEI Audio Kit provides a wide range of audio editing capabilities, including auido import/export/editing/extracting and format conversion. This sample code describes how to integrate the Audio Editor Kit SDK.
Stars: ✭ 24 (-4%)
Mutual labels:  huawei, hms
hms-FIDO-demo-java
HMS FIDO demo, including fido2 demo, bioauthn demo and bioauthn-androidx demo.
Stars: ✭ 17 (-32%)
Mutual labels:  huawei, hms
hms-ads-demo-kotlin
HUAWEI Ads Kit Sample code in kotlin version, which provides the banner, native, rewarded, roll, interstitial and splash ad formats for integration
Stars: ✭ 16 (-36%)
Mutual labels:  huawei, hms
homebridge-http-rgb-push
Homebridge plugin to control a web/http-based RGB device.
Stars: ✭ 16 (-36%)
Mutual labels:  push-notifications, push
Swift Apns
Swift Framework for sending Apple Push Notification over HTTP/2 API
Stars: ✭ 147 (+488%)
Mutual labels:  push-notifications, push
ejabberd mod gcm
Google Cloud Messaging API for Ejabberd (PUSH Messages)
Stars: ✭ 27 (+8%)
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 (+76%)
Mutual labels:  push-notifications, push
hms-av-pipeline-demo
HUAWEI AV Pipeline Kit sample code project, which contains the Java sample code to implement functions like video playback, video super-resolution and media asset management. C++ sample code is contained for calling MediaFilter to use the sound event detection plugin.
Stars: ✭ 14 (-44%)
Mutual labels:  huawei, hms
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 (-20%)
Mutual labels:  huawei, hms
hms-health-demo-kotlin
HMS Health demo code provides demo programs for your reference or usage. Developers can access the Huawei Health Platform and obtain sports & health data by integrating HUAWEI Health.
Stars: ✭ 21 (-16%)
Mutual labels:  huawei, hms
browser-push
Complete workout and guidelines to add web push notifications support for your webapp without third-party notification provider
Stars: ✭ 67 (+168%)
Mutual labels:  push-notifications, push
hms-health-demo-java
HMS Health demo code provides demo programs for your reference or usage. Developers can access the Huawei Health Platform and obtain sports & health data by integrating HUAWEI Health.
Stars: ✭ 37 (+48%)
Mutual labels:  huawei, hms
huawei-account-demo
Sample code for quickly integrate Huawei ID. HUAWEI Account Kit provides developers with simple, secure, and quick sign-in and authorization functions.
Stars: ✭ 39 (+56%)
Mutual labels:  huawei, hms
Vue Push Notification Example
An example repo for using browser push notifications with Vue.js and Firebase
Stars: ✭ 120 (+380%)
Mutual labels:  push-notifications, push
andpush
Android Push Notification in Ruby: The fastest client for FCM (Firebase Cloud Messaging)
Stars: ✭ 83 (+232%)
Mutual labels:  push-notifications, push

HMS Core Push Kit Sample Code (C#)

English | 中文

Contents

Introduction

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

The following table describes folders of C# sample code.

Folder Description
AGConnectAdmin Class library where Push Kit server APIs are encapsulated.
AGConnectAdmin.Examples Class library usage examples.

The following table describes main classes used in the sample code.

Class Name Description
AppOptions App-related configuration.
AGConnectApp App.
AGConnectMessaging Push Kit API calling methods.
Message Message body.

Installation

  1. Decompress the sample code.
  2. Copy AGConnectAdmin to a proper position in your Visual Studio solution and reference the corresponding assembly in your project.
  3. Use the classes in AGConnectAdmin by referring to the sample code.

Configuration

The following table describes the parameters related to the AppOptions class.

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

Environment Requirements

The demo projects need to be opened using Visual Studio 2017 or a later version. The following framework versions are supported:

  • .NET Framework 4.5 or later
  • .NET Standard 2.0 or later

Sample Code

AGConnectAdmin.Examples provides all sample code and corresponding functions.

  1. Send a data message to an Android app. File path: AGConnectAdmin.Examples/Example.SendDataMessage.cs

  2. Send a notification message to an Android app. File path: AGConnectAdmin.Examples/Example.SendAndroidMessage.cs

  3. Send a message by topic. File path: AGConnectAdmin.Examples/Example.SendTopicMessage.cs

  4. Send a message by condition. File path: AGConnectAdmin.Examples/Example.SendConditionMessage.cs

  5. Send a message to a Huawei quick app. File path: AGConnectAdmin.Examples/Example.SendInstanceAppMessage.cs

  6. Send a message by WebPush. File path: AGConnectAdmin.Examples/Example.SendWebpushMessage.cs

  7. Send a message by APNs. File path: AGConnectAdmin.Examples/Example.SendApnsMessage.cs

  8. Send a test message. File path: AGConnectAdmin.Examples/Example.SendTestMessage.cs

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].