-
Notifications
You must be signed in to change notification settings - Fork 9
How choose file? #6
Comments
Hi @michoael, for that you can use Storage Access Framework or Media Storage. Please see: https://developer.android.com/training/data-storage/shared/media |
I know this, but how connect it with cpp? |
Oh, hmm... no you don't really need anything in CPP for this that is different than the current code. In function Using FFMPEG might be simpler depending on what you're doing with the application. https://github.com/arthenica/ffmpeg-kit or Then you can use FFMPEG to convert to 16000Hz for transcriptions and then read the file into memory. I would recommend using FFMPEG as MediaCodec + MediaExtractor is low level and it's hard to find good sample code for it. However, one source is the Android CTS: https://android.googlesource.com/platform/cts/+/d04da01/tests/tests/media/src/android/media/cts/DecoderTest.java With either approach, you may also want to read in only, say, 64MB at a time to avoid the app getting killed for using too much memory. |
Yes, i have old project i used ffmpeg and i already convert file to 16000Hz. |
@michoael Ah, I don't have any experience going in the reverse direction (from Kotlin + compose to Java + xml). What I can say is that Google is putting all their efforts into Kotlin + compose going forward so it might be a good time to learn. :P |
Imm, i iasked because i have already app on google play created with java and xml. |
You shouldn't have to do any changes on the C / JNI side (except function signatures, i.e. JNIEXPORT jlong JNICALL |
Okay, thank you very much. |
I want choose file from storage, i don't need add sounds in resource. How i can do that?
I hope answer to me, Thanks.
The text was updated successfully, but these errors were encountered: