AndroidManifest.xml
<meta-data
android:name="CLOUDINARY_URL"
android:value="${cloudinaryUrl}" />
In my activity that uploads the file I have init the MediaManager
MediaManager.init(this);
And I have uploaded the file using its uri by this:
val requestId = MediaManager.get().upload(uri).callback(object : UploadCallback {
override fun onStart(requestId: String) {
// your code here
}
override fun onProgress(requestId: String, bytes: Long, totalBytes: Long) {
// example code starts here
val progress = bytes.toDouble() / totalBytes
// post progress to app UI (e.g. progress bar, notification)
// example code ends here
}
override fun onSuccess(requestId: String, resultData: Map<*, *>) {
// your code here
}
override fun onError(requestId: String, error: ErrorInfo) {
// your code here
}
override fun onReschedule(requestId: String, error: ErrorInfo) {
// your code here
}
}).dispatch()
The problem is that I am getting an error 'Missing api key'. Do I need an api key for unsigned uploads?