Package com.castlabs.android.utils
Class AssetsUtils
- java.lang.Object
-
- com.castlabs.android.utils.AssetsUtils
-
public class AssetsUtils extends Object
Asset utilities that help to copy assets from the application to a local folder.- Since:
- 2.0.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
copyAsset(Context ctx, String assetName, File target)
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 Detail
-
copyAssetToExternalFilesDir
public static void copyAssetToExternalFilesDir(Context ctx, String assetName)
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
-
-