feat(android): implement file sending logic

This commit is contained in:
ksenia312
2024-02-01 17:27:00 +01:00
parent 5870dc2577
commit 46451ef447
22 changed files with 606 additions and 75 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ class NearbyMessageConverter {
var result: String?
let jsonObject = [
"message": message,
"content": ["value": message, "type": "text"],
"sender": ["id": peerID.displayName, "displayName": name],
] as [String : Any]
+2 -1
View File
@@ -102,7 +102,8 @@ public class NearbyServicePlugin: NSObject, FlutterPlugin {
}
case "send":
if let message: String = getArgument(for: "message", call: call) {
if let content: Dictionary<String, AnyObject> = getArgument(for: "content", call: call),
let message: String = content["value"] as? String {
if let receiver : Dictionary<String, AnyObject> = getArgument(for: "receiver", call: call),
let receiverId : String = receiver["id"] as? String
{