Class PushClient

Definition

Namespace:
Tizen.Messaging.Push
Assembly:
Tizen.Messaging.Push.dll

The PushClient API provides functions to connect to push service for receiving push messages.

C#
Copy
public static class PushClient
Inheritance
object
PushClient
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

View Source

GetRegistrationId()

registration ID received from server.

Declaration
C#
Copy
public static string GetRegistrationId()
Returns
Type Description
string

It is the string, which is the ID received from the server.

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.

View Source

GetUnreadNotifications()

Gets the unread notifications for the application.

Declaration
C#
Copy
public static void GetUnreadNotifications()
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.

View Source

PushServerRegister()

API to Register the application with the push server.

Declaration
C#
Copy
public static Task<ServerResponse> PushServerRegister()
Returns
Type Description
System.Threading.Tasks.Task<TResult><ServerResponse>

The method returns a task, which on completion will give a ServerResponse Object.

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.

View Source

PushServerUnregister()

API to Deregister the application from the push server.

Declaration
C#
Copy
public static Task<ServerResponse> PushServerUnregister()
Returns
Type Description
System.Threading.Tasks.Task<TResult><ServerResponse>

The method returns a task, which on completion will give a ServerResponse Object.

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.

View Source

PushServiceConnect(string)

API to connect with the push service.

Declaration
C#
Copy
public static void PushServiceConnect(string pushAppId)
Parameters
Type Name Description
string pushAppId

The Push Application ID Registered with the server.

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.

Exceptions
Type Condition
System.InvalidOperationException

In case of privilege not defined.

View Source

PushServiceDisconnect()

API to disconnect from the push service.

Declaration
C#
Copy
public static void PushServiceDisconnect()
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.

Events

View Source

NotificationReceived

Event Handler for receiving the notifications.

Declaration
C#
Copy
public static event EventHandler<PushMessageEventArgs> NotificationReceived
Event Type
Type Description
System.EventHandler<TEventArgs><PushMessageEventArgs>
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.

View Source

StateChanged

Event Handler for receiving changes in States of the connection.

Declaration
C#
Copy
public static event EventHandler<PushConnectionStateEventArgs> StateChanged
Event Type
Type Description
System.EventHandler<TEventArgs><PushConnectionStateEventArgs>
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.