Interface Info |
|---|
public interface IWidgetCallback |
Callback for Share Engine capabilities, which is called when the corresponding event occurs after being registered. |
Qualifier and Type | Method Name and Description |
|---|---|
abstract void | Public abstract void onDeviceFound(inNearByDeviceEx device) Called when a new device is found. |
abstract void | Public abstract void onDeviceDisappeared(inNearByDeviceEx device) Called when the target device disappears. |
abstract void | Public abstract void onTransStateChange (NearByDeviceEx device, intstate, intstateValue) Called when the status of the peer device changes. |
abstract void | Public abstract void onEnableStatusChanged () Called when the status of Share Engine capabilities changes. The current state can be obtained through ShareKitManager.getShareStatus. |
Method |
|---|
Public abstract void onDeviceFound(inNearByDeviceEx device) |
Called when a new device is found. |
Parameters
Name | Description |
|---|---|
device | New device identifier. |
Method |
|---|
Public abstract void onDeviceDisappeared(inNearByDeviceEx device) |
Called when the target device disappears. |
Parameters
Name | Description |
|---|---|
device | New device identifier. |
Method |
|---|
Public abstract void onTransStateChange (NearByDeviceEx device, intstate, intstateValue) |
Called when the status of the peer device changes. |
Parameters
Name | Description |
|---|---|
device | New device identifier. |
state |
|
stateValue | Sending progress: ranges from 0% to 100% Status change: 1004: The preview is sent 1005: Data transmission starts 1007: The local end cancels sending 1008: The peer end cancels receiving 1009: The peer end rejects receiving 1013: The peer end is busy 1014: The local end is busy Exception: -2001: Socket error -2002: Interaction error -2003: The preview is sent, and the peer confirmation times out -2004: Data transmission is complete, and acquisition of the stop message times out -2010: Connection verification times out -2011: Socket connection times out -2012: Insufficient space -2013: I/O error -2100: Unknown error |