Class PushClient
Definition
- Namespace:
- Tizen.Messaging.Push
- Assembly:
- Tizen.Messaging.Push.dll
- API Level:
- 3
The PushClient API provides functions to connect to push service for receiving push messages.
C#Copypublic static class PushClient
- Inheritance
-
System.ObjectPushClient
Remarks
The PushClient API provides the way to connect with the push service. It provides APIs to connect/disconnect from the push service. APIs are provided so that an application can register itself with the push server along with APIs to request push message.
Methods
Declaration
C#Copypublic static string GetRegistrationId()
Returns
Type | Description |
---|---|
System.String | It is the string, which is the ID received from the server. |
API Level: 3
Declaration
C#Copypublic static void GetUnreadNotifications()
API Level: 3
Declaration
C#Copypublic static Task<ServerResponse> PushServerRegister()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ServerResponse> | The method returns a task, which on completion will give a ServerResponse Object. |
API Level: 3
Declaration
C#Copypublic static Task<ServerResponse> PushServerUnregister()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ServerResponse> | The method returns a task, which on completion will give a ServerResponse Object. |
API Level: 3
Declaration
C#Copypublic static void PushServiceConnect(string pushAppId)
Parameters
Type | Name | Description |
---|---|---|
System.String | pushAppId | The Push Application ID Registered with the server. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | In case of privilege not defined. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/push
Declaration
C#Copypublic static void PushServiceDisconnect()
API Level: 3
Events
Declaration
C#Copypublic static event EventHandler<PushMessageEventArgs> NotificationReceived
Event Type
Type | Description |
---|---|
System.EventHandler<PushMessageEventArgs> |
API Level: 3
Declaration
C#Copypublic static event EventHandler<PushConnectionStateEventArgs> StateChanged
Event Type
Type | Description |
---|---|
System.EventHandler<PushConnectionStateEventArgs> |