Closed Nivs113 closed 3 years ago
Hello @Nivs113,
We have updated our UI Kit and added a check for API 30 before creating a new directory. We suggest you to check with latest UI Kit library.
You can refer below link to check the changes we have added in Utils.java file
Hi @Nivs113,
I hope this helped resolve the issue. Please do reach out to help@cometchat.com if you require further technical help.
Regards, Provesha
It still doesn't work on Android 11, As both getExternalStorageDirectory()
and getExternalStoragePublicDirectory()
functions are deprecated.
So to solve that and as we don't need to save the audio recordings files to phone's storage just save it to cache directory.
So the getOutputMediaFile()
function will look like this:
public static String getOutputMediaFile(Context context) {
String dir = context.getExternalCacheDir().getAbsolutePath() + "/";
return dir + (new SimpleDateFormat("yyyyMMddHHmmss")).format(new Date()) + ".mp3";
}
After Recording voice note the error message displays "No File Found. Please". I have checked in code. can you please check this. and this issue facing in Samsung Devices.