Rank 2: Process
I created a bucket from console and connected my project to appwrite SDK etc.
Now I am trying to send file(s) from mobile External Dir to storage.
// push to clould func
public void cloudStorage() {String endPoint = "*****"String setProject = "*****"String apiKey = "*****"String bucketID = "*****"
Client client = new Client(requireActivity()); client.setEndpoint(endpoint); client.setProject(project); client.setSelfSigned(true);File file = new File(Objects.requireNonNull(requireContext().getExternalFilesDir(null).getParent())); //externaldir path
Storage storage = new Storage(client);
storage.createFile( bucketID, file, InputFile.Companion.fromPath("FILE.xls"), new CoroutineCallback<>(result, error) ->{ if (error != null) { error.printStackTrace(); return;
} Log.d("Appwrite", result.toString()); }
}So when trying to use CoroutineCallback can =not resolve symbool 'result' & 'error' which are supposed to be the object and error handler.
after a deep research, I noticed CoroutineCallback is a class in appwrite SDK for kotlin .
Pls help me know how i can handle this task with android JAVA SDK.