YAC - Kotlin Wrapup

July 2017 ยท 5 minute read

Share on:

Table Of Contents

Oh my god!!! Kotlin is now officially supported by Android. When I was watching Google I/O livestream, it was the sleeping time here in India, and once I seen that lock pattern being emerged as our favorite Kotlin logo, I errupted with joy and almost wokeup my elders…

But it was worth it, without doubt this announcement was accepted with wide cheers and enthusiasm. And working with it since a year, this comes as acceptance and relief both for us. Thanks a lot Google.

Initially I was planning this post to highlight some of small details of how Kotlin can be benifitial for us. But between 17th May and today, lot has been highlighted and written about Kotlin. By not repeating all here and writing millionth post about how kotlin is awesome about null pointer etc… I will change the cource a bit.

At first I have some experience to share on some small tips and tricks that may help you working with Kotlin, and in later (keeping original idea in mind) I will announce some open source works.

Some tips and gotchas.

Getting started

Converting your code.


As I said in starting of this post. Android officiating Kotlin has happily changed a lot of things, including course of this post. I was to discuss more kotlin code from YAC, which tried to point out the power of this language. And since I/O those points are discussed many times over many posts.

But this does not change sharing some open-source work which born out of YAC, or YAC gave upgrade to it.

The first one is Kotlin’s port of old library Android External File Writer, The kotlin port is nearly same code that opens file browser and reads response from it in YAC app. You can use it by dropping below line in your gradle file

  compile/implementation `com.creativeelites:androidexternalfilewriter-kotlin:0.3` 

The second one is Kutils. This library is collection of extension functions I use in my projects. This library has started as fork of Kaffeine, which isn’t updated since last 2 years. Retaining structures of this project, I have developed KUtils adding methods and solving some mistakes as Kotlin and YAC evolved.

I have also added some extensions and methods from Anko. When I have started, Anko was a big mammoth library for layuot, extensions and sqlite. From that day and now, anko is split into multiple libraries for peace of mind. Wouldn’t it be nice to have my aditions to anko itself? Why to copy the code and develop my own library for the sake of it?

The answer is I feel anko is either stagnant or not very useful for the people who use it. I have never felt the urge of using anko out of having the extension functions. There are members in community who use Anko for layout, but for me anko is good (and official) collections of extension functions, for common things, Sqlite and Layouts. The instructions to build Anko are (For me) unclear for me whether they are for Plugin or for library as well. I have some questions, and till the confusion regarding this is cleared, I have hosted this code in Kutils library. You can use KUtils using

  compile/implementation `com.creativeelites:kutils:0.7.1@aar` 

These is it for kotlin and my libraries. In next sub-series about YAC, I will talk about how I used firebase for some trivial usecases for YAC.

This Series states some stories behind the App I have developed, to try the app, click below to download it from playstore…

See Also


» YAC