According to the Javadoc, android.util.Base64.decode() takes two parameters: the text, and \"flags\". These flags are in int form and (I quote):
flags controls ce
For kotlin you can use
kotlin
val flag = Base64.URL_SAFE or Base64.NO_WRAP