encodebase64

fun encodebase64(ctxt: Context, inputuri: Uri): String?

Encodes the file located at the given URI into a Base64 string.

Return

The Base64-encoded string of the file contents, or a message indicating encoding failure.

Parameters

ctxt

The application context used to access the content resolver.

inputuri

The URI of the file to encode.