sdk-common / com.tomtom.online.sdk.common.util / AssetUtils

AssetUtils

open class AssetUtils

Helper functions to easily work with assets.

Functions

copyAssetFile

open static fun copyAssetFile(context: Context!, assetFileName: String!, destDir: String!): Unit

Save asset file content as file in local storage destPath. File name will be the same as in assets.

getAssetFile

open static fun getAssetFile(context: Context!, asset: String!): String!

Load asset file as string using the UTF-8 encoding used.

getAssetFileContent

open static fun getAssetFileContent(context: Context!, name: String!): ByteArray!

Load asset file content as byte array.

getDrawable

open static fun getDrawable(context: Context!, fileName: String!): Drawable!

Load drawable from assets.