开发者

Is it possible to get the full path to an Android application asset file as a string?

开发者 https://www.devze.com 2023-01-28 15:06 出处:网络
I\'m trying to use a third party library in my Android app that only allows me to load a file using a string that represents the path to the file. I\'ve placed this file in my app\'s assets folder thi

I'm trying to use a third party library in my Android app that only allows me to load a file using a string that represents the path to the file. I've placed this file in my app's assets folder thinking that I could use the AssetManager to get its path as a string. However, it only returns a relative path to the file. So I'm wondering if there's some 开发者_StackOverflow中文版way to get the full path to the file so this library can successfully load the file.


Just a guess - does Resources.getResourceName() do the trick?

0

精彩评论

暂无评论...
验证码 换一张
取 消