Convertir el código Java al convertidor en línea de Kotlin
Select the src/main/java folder in the project and choose
Code->"Convert Java File to Kotlin File”
VasteMonde
Select the src/main/java folder in the project and choose
Code->"Convert Java File to Kotlin File”
val pfd = context.contentResolver.openFileDescriptor(uri, "w")
val fd = pfd.fileDescriptor
val image = BitmapFactory.decodeFileDescriptor(fd)
pfd.close()
/**
* for place API Key
*/
fun getPlaceApiKey(): String {
var placeApiKey = helper.mapKey?.let { it } ?: BuildConfig.MAP_KEY
if (placeApiKey.isEmpty())
placeApiKey = BuildConfig.MAP_KEY
if (BuildConfig.APPLICATION_ID.equals("com.uffizio.trakzee", ignoreCase = true)
|| BuildConfig.APPLICATION_ID.equals("com.uffizio.trakzeelocal", ignoreCase = true)) {
placeApiKey = BuildConfig.TRAKZEE_GOOGLE_KEY
}
return placeApiKey
}
Tools -> Kotlin -> Show Kotlin Bytecode