简体   繁体   中英

Need a path from Android ContentResolver

Following the deprecation of requestLegacyExternalStorage in the Manifest.xml file, I'm trying to use the Android guideline on data storage: https://developer.android.com/training/data-storage/shared/media

In my app I'm using a command line tool (FFMpeg) to generate a video. I need to define a path in my command but really can't figure out how to get a full path from the Uri I get from the ContentResolver class.

Is it even possible?

Is it even possible?

No. And, even if it were, likely it would be useless. You do not have direct filesystem access for write operations to arbitrary paths. You need to have ffmpeg write to some place that you do have direct filesystem access for writes (eg, getExternalFilesDir() ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM