-
Notifications
You must be signed in to change notification settings - Fork 16
FileTransfer Interfaces Usage
zhaowanli2 edited this page Jan 4, 2019
·
1 revision
(Suppose A and B are already friends)
1.1 Use Manager.initializeInstance(Carrier carrier, ManagerHandler handler) to initialize the Manager
- The interface ManagerHandler has a method: onConnectRequest, if A wants to connect to B, and this method will be invoked at B side. If B agrees the connect-request from A, B can Use FileTransfer.acceptConnect();
- If A wants to transfer file to B, first needs to create an object of FileTransfer using FileTransfer-Manager, like: FileTransferManager.newFileTransfer(userIdOfB, fileTransferInfo, transferHandler);