Package com.castlabs.android.utils
Class AssetsUtils
java.lang.Object
com.castlabs.android.utils.AssetsUtils
Asset utilities that help to copy assets from the application
to a local folder.
- Since:
- 2.0.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Copy an asset with the given asset name to the given targetstatic void
copyAssetToExternalFilesDir
(Context ctx, String assetName) Copy the asset with the given asset name to the external storage directory of the current app.
-
Method Details
-
copyAssetToExternalFilesDir
Copy the asset with the given asset name to the external storage directory of the current app. Note that the API needs WRITE_EXTERNAL_STORAGE permission which should be added and handled by the caller- Parameters:
ctx
- the contextassetName
- the asset name
-
copyAsset
Copy an asset with the given asset name to the given target- Parameters:
ctx
- the contextassetName
- the asset nametarget
- the target
-