New language

Biggest addition is the pure support of Kotlin. We actually rewrote the whole library in Kotlin. Of course it still works fine with Java. We kept the Java builder structure for the ones who have still not migrated for this reason.

We want to give devs who use Kotlin the possibility of the powerful data classes’ .copy(), among other Kotlin features.

If you have selected a configuration you can partially update it with .copy() . Example:

val configuration = CameraConfiguration(

// A full configuration

// ...

)



fotoapparat.updateConfiguration(

configuration.copy(

flashMode = if (isChecked) torch() else off()

)

)

Improved camera switching

In v1 we used FotoapparatSwitcher . That was a quick solution due to great demand to switch cameras.

Now, we found few ways to improve the library structure and this can be done simply with:

fotoapparat.switchTo(

lensPosition = newLensPosition,

cameraConfiguration = newConfiguration

)

We also promise some performance improvements here since we switch only what’s needed.

More explicit exceptions

Sometimes stuff go wrong and we all need to know why.

We have seen what is more bothersome for the devs to learn and use the library so we put some extra effort for more explicit error messages.