Last active
January 3, 2016 12:29
-
-
Save acontal/8463060 to your computer and use it in GitHub Desktop.
[android] Copy asset to file system
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Dependency: Guava | |
// From an Activity, assets = getAssets(); | |
// From a test, assets = getInstrumentation().getContext().getAssets(); | |
ByteStreams.copy(assets.open(assetFileName), new FileOutputStream(targetPath)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment