Interface Info |
|---|
public interface IVirtualizationCallback Event listening callback. |
Type |
Constant Field |
Description |
|---|---|---|
int |
DeviceEvent.CONNECT |
Connected. |
int |
DeviceEvent.DISCONNECT |
Disconnected. |
int |
DeviceEvent. REQUEST_CONNECTION |
The device requests connection. Call acceptConnection to accept the request or disconnectDevice to reject. |
int |
DeviceEvent. START_PROJECTION |
The projection channel is ready. The app needs to display the surface and call startProjection. |
int |
DeviceEvent. STOP_PROJECTION |
Projection stopped. The app needs to cancel surface display. |
Class |
Method |
|---|---|
abstract void |
onDeviceChange(String deviceName, intstate) Called upon communication connection event with the phone. The remote device ID and event type are carried in the event callback. |
abstract void |
onPinCode(String deviceName, int state) Notifies the app to display or stop displaying the PIN. |
long |
getSecureFileSize(String fileName) Obtains the size of the authentication file, in bytes. |
byte[] |
readSecureFile(String fileName) Obtains authentication information. |
boolean |
writeSecureFile(String fileName, byte[] data) Stores the authentication information securely. The value true indicates success, and false indicates failure. |
Method |
|---|
public abstract void onDeviceChange(String deviceName, intstate) Called upon communication connection event with the phone. The remote device ID and event type are carried in the event callback. |
Parameters
Name |
Description |
|---|---|
deviceName |
Remote device name. |
state |
For details, see the value of Constant SummaryEVENT_DEVICE. |
Method |
|---|
public abstract void onPinCode(String deviceName, int state) Notifies the app to display or stop displaying the PIN. |
Parameters
Name |
Description |
|---|---|
deviceName |
Remote device name. |
pinCode |
PIN generated for device authentication. If the value is an empty string, the pinCode display can be canceled. |
Method |
|---|
public abstract long getSecureFileSize(String fileName) Obtains the size of the authentication file, in bytes. |
Parameters
Name |
Description |
|---|---|
fileName |
Name of the file that stores authentication information. |
Method |
|---|
public abstract byte[] readSecureFile(String fileName) Obtains authentication information. |
Parameters
Name |
Description |
|---|---|
fileName |
Name of the file that stores authentication information. |
Method |
|---|
public abstract boolean writeSecureFile(String fileName, byte[] data) Stores the authentication information securely. The value true indicates success, and false indicates failure. |
Parameters
Name |
Description |
|---|---|
fileName |
Name of the file that stores authentication information. |
data |
Information to be stored. |