1Select the src/main/java folder in the project and choose
2 Code->"Convert Java File to Kotlin File”
1 /**
2 * for place API Key
3 */
4 fun getPlaceApiKey(): String {
5 var placeApiKey = helper.mapKey?.let { it } ?: BuildConfig.MAP_KEY
6 if (placeApiKey.isEmpty())
7 placeApiKey = BuildConfig.MAP_KEY
8 if (BuildConfig.APPLICATION_ID.equals("com.uffizio.trakzee", ignoreCase = true)
9 || BuildConfig.APPLICATION_ID.equals("com.uffizio.trakzeelocal", ignoreCase = true)) {
10 placeApiKey = BuildConfig.TRAKZEE_GOOGLE_KEY
11 }
12 return placeApiKey
13 }
1val pfd = context.contentResolver.openFileDescriptor(uri, "w")
2val fd = pfd.fileDescriptor
3val image = BitmapFactory.decodeFileDescriptor(fd)
4pfd.close()