Publications

Medium Posts (27 posts)

Qualified ‘this’ in Kotlin

The only thing we learnt about this pointer in other languages is “this is an implicit pointer which points to the calling object”. As clear from the definition, it points to the object which calls the respective function or property. read more
07 Feb 2019

Type Aliases in Kotlin

Life is painful when you have two or more classes with the same name but different package name and you have to use them both in the same place. Only one import can be added and the other one needs to be referenced by its complete package name dot class name. Every time you use the second class name, you need to use it by the entire package name of that class. read more
23 Dec 2018

Android Dynamic Feature Modules: My Experience

In Google I/O 2018, a new publishing format was introduced by Google, Android App Bundle(.aab). Everyone is so excited about this feature because of its advantages and the size reduction of the APK. read more
16 Dec 2018

Variable number of arguments (vararg) : Kotlin

Sometimes we need a function where we can pass n number of parameters, and the value of n can be decided at runtime. Kotlin provides us to achieve the same by defining a parameter of a function as vararg. We can pass n number of parameters to a vararg variable of the defined datatype or even of a generic type. read more
13 Oct 2018

Infix Notation : Kotlin

Ever imagined calling a public function of a class without dot and parentheses of the parameter in Kotlin. Kotlin provides infix notation with which we can call a function with the class object without using a dot and parentheses across the parameter. Using infix function provides more readability to a function similar to other operators like in, is, as in Kotlin. read more
07 Oct 2018

Object Expression in Kotlin

Sometimes we need to create an object of some class with slight modification, without explicitly declaring a new subclass for it. Java handles this case with anonymous inner classes. Kotlin uses object expression to achieve the same functionality. read more
06 Oct 2018

Equality in Kotlin (‘==’, ‘===’ and ‘.equals’)

We often need to compare the data of two variables or objects or the references of two objects in Kotlin. This brings in another question, which equality check should we use in which case. read more
04 Sept 2018

Pair and Triple in Kotlin

It is a very common use case where we want to return two values from a method, can be either of same data type or can be of different data types. What usually we do there is either create some local variables read more
17 Aug 2018

Native Android share to a particular app in Unity

Direct accessibility is a feature that usually boosts the numbers as it reduces the number of clicks in an app. Sharing your score directly on some app can be one of them. read more
13 Aug 2018

Native Android screenshot/image sharing in Unity

As the number says, an image gains more attention than a normal text while sharing. It’s better to challenge a player with your own high score screenshot in games instead of sharing just a plain text. read more
10 Aug 2018

Extensions as Members : Kotlin

An extension can be defined as members of some other class also. The benefit of defining an extension as a member of the other class is, we can access all the functions and properties of both the classes inside that extension method. read more
27 July 2018

Extensions in Kotlin

Kotlin provides the ability to extend a class with new functionality without having to inherit from the class or use any type of design pattern such as Decorator. This is done using a special declaration called extensions. read more
20 July 2018

Companion object in Kotlin

Unlike Java or C#, Kotlin doesn’t have static members or member functions. Kotlin recommends to simply use package-level functions instead. If you need to write a function that can be called without having a class instance but needs access to the internals of a class, you can write it as a member of a companion object declaration inside that class. read more
13 July 2018

Native Android text sharing in Unity app

This is a very common requirement in any unity app targeting Android platform to share the high score or challenge other players with a text message or a screenshot of the high score. The sharing can be done via any of the app available on the user’s device which supports sharing. read more
29 June 2018

Native Android in Unity

While developing unity games in C# targeting android platform, we always want to use few native android features in our game. These features can be showing notifications on certain actions in the game or can be sharing the high score with other players and inviting them to try our game using android native share. read more
22 June 2018

The Nothing Type : Kotlin

What if I say there is a class called Nothing in Koltin. And What does it do? Nothing. This class has no instance and it is used to represent a value which never exists. read more
15 June 2018

Label Reference in Kotlin

Any expression in Kotlin may be marked with a label. This can be used to as an identifier. A label can be defined in Kotlin using label name followed by @ sign in front of any expression. read more
8 June 2018

Property, Getter and Setter — Kotlin

I started developing Android apps in Java where encapsulation of object-oriented programming was achieved through declaring variables as private fields with their getter and setter as public methods. read more
3 Mar 2018

ViewOverlay in Android

An overlay is an extra layer that sits on top of a View (the “host view”) which is drawn after all other content in that view (including children if the view is a ViewGroup). Interaction with the overlay layer is done by adding and removing drawables. read more
11 Feb 2018

Kotlin ‘For’ loop

While converting all my java code to kotlin, one of the strange syntax change I observed was the for loop in both the languages. read more
12 Jan 2018

‘when’ operator in Kotlin

when operator is a replacement of ‘switch’ operator in other languages. ‘when’ operator matches its argument with all the branches until it matches with anyone, else it executes the ‘else’ block. read more
11 Jan 2018

‘in’ operator in Kotlin

‘in’ operator in Koltin is used to check the existence of particular variable or property in a Range or Collection whereas a ‘!in’ operator is just a not of ‘in’ operator and returns true if the condition is false. read more
26 Nov 2017

TypeCheck (‘is’) and Cast (‘as’) in Kotlin

Type check is a way of checking the type(DataType) or Class of a particular instance or variable while runtime to separate the flow for different objects. In few languages, it’s also denoted as Run Time Type Identification (RTTI). read more
23 Nov 2017

Safe calls(?.) vs Null checks(!!) in Kotlin

In Kotlin, the type system distinguishes between references that can hold null (nullable references) and those that can not (non-null references). For example, a normal property can’t hold a null value and will show a compile error. read more
13 Nov 2017

Late-Initialized Properties in Kotlin

There can be two ways to declare and initialize a var property. The first property type is initialized while declaration itself and doesn’t require a null check (!!) while using it. read more
10 Nov 2017

Higher-order functions in Kotlin

In Kotlin, a function can be passed as a parameter or can be returned from a function, the function which does the same is known as a higher-order function. read more
07 Nov 2017

Backing Field in Kotlin

Backing field is an autogenerated field for any property which can only be used inside the accessors(getter or setter) and will be present only if it uses the default implementation of at least one of the accessors, or if a custom accessor references it through the field identifier. read more
04 Aug 2017




White Papers

Mobile Development - Native or Cross Platform

There are more than two billion smartphone and tablet users worldwide. According to latest trends, it is being expected that anything and everything will be available as a mobile application. read more
10 Jan 2016