Module tdlight.api
Package it.tdlight.jni

# Class TdApi.RegisterDevice

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.Function<TdApi.PushReceiverId>
it.tdlight.jni.TdApi.RegisterDevice

Enclosing class:
  TdApi

public static final class TdApi.RegisterDevice extends TdApi.Function<TdApi.PushReceiverId>
Registers the currently used device for receiving push notifications. Returns a globally unique identifier of the push notification subscription.

Returns `PushReceiverId`

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`CONSTRUCTOR`
`TdApi.DeviceToken`
`deviceToken`
Device token.
`long[]`
`otherUserIds`
List of user identifiers of other users currently using the application.

## Constructor Summary

Constructors
Constructor
Description
`RegisterDevice()`
Registers the currently used device for receiving push notifications.
`RegisterDevice(TdApi.DeviceToken deviceToken, long[] otherUserIds)`
Registers the currently used device for receiving push notifications.
`RegisterDevice(DataInput input)`
Registers the currently used device for receiving push notifications.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
`int`
`getConstructor()`
`int`
`hashCode()`
`void`
`serialize(DataOutput output)`

### Methods inherited from class it.tdlight.jni.TdApi.Function

`toString`

### Methods inherited from class it.tdlight.jni.TdApi.Object

`serialize`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### deviceToken

public TdApi.DeviceToken deviceToken
Device token.

### otherUserIds

public long[] otherUserIds
List of user identifiers of other users currently using the application.

### CONSTRUCTOR

public static final int CONSTRUCTOR

See Also:
  - Constant Field Values

## Constructor Details

### RegisterDevice

public RegisterDevice()
Registers the currently used device for receiving push notifications. Returns a globally unique identifier of the push notification subscription.

Returns `PushReceiverId`

### RegisterDevice

public RegisterDevice(TdApi.DeviceToken deviceToken, long[] otherUserIds)
Registers the currently used device for receiving push notifications. Returns a globally unique identifier of the push notification subscription.

Returns `PushReceiverId`

Parameters:
  `deviceToken` - DeviceToken Device token.
  `otherUserIds` - long[] List of user identifiers of other users currently using the application.

### RegisterDevice

public RegisterDevice(DataInput input) throws IOException
Registers the currently used device for receiving push notifications. Returns a globally unique identifier of the push notification subscription.

Returns `PushReceiverId`

Throws:
  `IOException`

## Method Details

### getConstructor

public int getConstructor()

Specified by:
  `getConstructor` in class `TdApi.Object`

### serialize

public void serialize(DataOutput output) throws IOException

Specified by:
  `serialize` in class `TdApi.Object`
Throws:
  `IOException`

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`