mirror of
https://github.com/hackku21/nearby_connections.git
synced 2026-03-02 03:49:22 +00:00
published 1.0.0
This commit is contained in:
@@ -352,12 +352,15 @@ public class NearbyConnectionsPlugin implements MethodCallHandler {
|
||||
args.put("endpointId", endpointId);
|
||||
args.put("payloadId", payload.getId());
|
||||
args.put("type", payload.getType());
|
||||
|
||||
|
||||
if (payload.getType() == Payload.Type.BYTES) {
|
||||
byte[] bytes = payload.asBytes();
|
||||
assert bytes != null;
|
||||
args.put("bytes", bytes);
|
||||
}
|
||||
else if (payload.getType() == Payload.Type.BYTES) {
|
||||
args.put("filePath", payload.asFile().asJavaFile().getAbsolutePath());
|
||||
}
|
||||
|
||||
channel.invokeMethod("onPayloadReceived", args);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user