Since: API level 35
public abstract class

KnoxPushServiceCallback

extends Object
java.lang.Object
   ↳ com.samsung.android.knox.kpm.KnoxPushServiceCallback

Class Overview

This class is callback class to get knox push service result.

Since
API level 35
KNOX 3.8

Summary

Public Constructors
KnoxPushServiceCallback()
Public Methods
abstract void onRegistrationFinished(KnoxPushServiceResult result)
This API is invoked when registerDevice process is finished.
abstract void onRegistrationStatus(KnoxPushServiceResult result)
This API is invoked when isRegistered process is finished.
abstract void onUnRegistrationFinished(KnoxPushServiceResult result)
This API is invoked when unRegisterDevice process is finished.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public KnoxPushServiceCallback ()

Since: API level 35

Public Methods

public abstract void onRegistrationFinished (KnoxPushServiceResult result)

Since: API level 35

This API is invoked when registerDevice process is finished.

Parameters
result
A KnoxPushServiceResult instance including result of registerDevice.
result.getError(): KnoxPushServiceResult.ERROR_NONE if device is registered successfully.
result.getReason(): return error reason.
result.getDeviceId(): return deviceId if device is registered successfully.
Usage
Used to get result of registerDevice.

 // A KnoxPushServiceResult object including result passed with onRegistrationFinished(KnoxPushServiceResult) api.
 KnoxPushServiceCallback callback = new KnoxPushServiceCallback() {
     public void onRegistrationFinished(final KnoxPushServiceResult result) {
         int error = result.getError();
         String reason = result.getReason();
         String deviceId = result.getDeviceId();
     }
 }
 
Since
API level 35
KNOX 3.8

public abstract void onRegistrationStatus (KnoxPushServiceResult result)

Since: API level 35

This API is invoked when isRegistered process is finished.

Parameters
result
A KnoxPushServiceResult instance including result of isRegistered.
result.getError(): KnoxPushServiceResult.REGISTERED if device is registered, KnoxPushServiceResult.NOT_REGISTERED if device is not registered.
result.getReason(): return error reason.
Usage
Used to get result of isRegistered.

 // A KnoxPushServiceResult object including result passed with onRegistrationStatus(KnoxPushServiceResult) api.
 KnoxPushServiceCallback callback = new KnoxPushServiceCallback() {
     public void onRegistrationStatus(final KnoxPushServiceResult result) {
         int status = result.getError();
         String reason = result.getReason();
     }
 }
 
Since
API level 35
KNOX 3.8

public abstract void onUnRegistrationFinished (KnoxPushServiceResult result)

Since: API level 35

This API is invoked when unRegisterDevice process is finished.

Parameters
result
A KnoxPushServiceResult instance including result of unRegisterDevice.
result.getError(): KnoxPushServiceResult.ERROR_NONE if device is unregistered successfully.
result.getReason(): return error reason.
Usage
Used to get result of unRegisterDevice.

 // A KnoxPushServiceResult object including result passed with onUnRegistrationFinished(KnoxPushServiceResult) api.
 KnoxPushServiceCallback callback = new KnoxPushServiceCallback() {
     public void onUnRegistrationFinished(final KnoxPushServiceResult result) {
         int error = result.getError();
         String reason = result.getReason();
     }
 }
 
Since
API level 35
KNOX 3.8