Publications

Technical Blogs (65 posts)

Swift Range Operators
Range Operator in Swift is a basic operator that is used to operate over a range. There are multiple types of range operators where we can include or exclude the upper range. Or we can start the range with some value or can end before some max value. read more
06 Oct 2021
For-in vs For-each in Swift
For-in and for-each are different variants of for loops in swift which are used to iterate over a range, set or dictionary. Both provide the same functionality but has a few limitations or differences when it comes to conditional access. read more
26 Sep 2021
Swift ‘For’ loop
For loops are used by every developer regularly. There is for-in as well as a for-each loop in Swift which has a bit different syntaxes. Both of them are used to iterate over a range, array, set or dictionary but have a bit different syntaxes. read more
25 Sep 2021
Computed Property in Swift
Object creation is a heavy process. When we create a class object, all the public and private properties of that class are initialised inside the constructor. Every variable inside a class initialisation requires a certain amount of time to allocate the memory on the heap and hold its reference on the stack. read more
16 Sep 2021
lazy Property in Swift
Object creation is a heavy process. When we create a class object, all the public and private properties of that class are initialised inside the constructor. Every variable inside a class initialisation requires a certain amount of time to allocate the memory on the heap and hold its reference on the stack. read more
05 Sep 2021
lateinit vs lazy Property in Kotlin
Since object creation is a heavy process as it initialises all the public and private properties defined in that class when the constructor is called, Kotlin has few ways to initialise properties later when required. read more
29 Aug 2021
lazy Property in Kotlin
Object creation is a heavy process. When we create a class object, all the public and private properties of that class are initialised inside the constructor. Every variable inside a class initialisation requires a certain amount of time to allocate the memory on the heap and hold its reference on the stack. read more
04 Aug 2021
Native Android Receive Text from Other Apps in Unity
Android provides a native share functionality to handle text or multimedia sharing. Any app can trigger an intent along with extra params to share a text. To receive the text or show our app in the sharing intent list handled by Android, we majorly have to do two things. Register Intent Filter in Manifest file. Extract text from the Intent object shared by the other app. read more
26 June 2021
Custom Android Manifest File in Unity
The Android manifest file describes essential information about your app to the Android build tools, the Android operating system, and Google Play. Every Android app or unity app running on the Android platform must have a Manifest file. read more
29 May 2021
Typecast Android Object in Untiy
We can convert one Android/Java object to another by just using AndroidJavaClass and AndroidJavaObject. We can use java.lang.Class and its two functions forName and cast to typecast it to the desired Android/Java object. read more
28 May 2021
Tuple in Swift
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 or we create a struct with just two variables and return that struct object from the method. read more
21 May 2021
Why with function is not an Extension to Template class?
Why with is not an extension to the Template class? As all the other scope functions are an extension to Template class but not with function. The question is why? How its different from other scope functions? read more
10 May 2021
Kotlin run function
Scope functions are nothing but the functions which define a scope to the calling object. We can apply operations on that object within that scope and return the object itself from that scope function or we can even return the result of that operation or operations from the scope function. read more
09 May 2021
Kotlin with function
Scope functions are nothing but the functions which define a scope to the calling object. We can apply operations on that object within that scope and return the object itself from that scope function or we can even return the result of that operation or operations from the scope function. read more
04 May 2021
Kotlin also function
Scope functions are nothing but the functions which define a scope to the calling object. We can apply operations on that object within that scope and return the object itself from that scope function or we can even return the result of that operation or operations from the scope function. read more
29 April 2021
Why Map does not extend Collection interface
Collections in any language is an interface that stores similar data type objects and provides an iteration functionality. The common extensions of Collection are List and Set. The Map is a well-known data structure used to store key-value pairs where keys will be unique. read more
23 April 2021
Collections in Kotlin
Collections are a common concept for most programming languages. It is a way of storing similar data types in a single object and iterate over it. Similar to any other language, Kotlin also has Collection defined in kotlin.collections package. read more
22 April 2021
any(), none() & all() : Kotlin
Kotlin is a powerful language that reduces a lot of boilerplate code required to perform basic operations in comparison to Java. The classic examples for the same are any, non and all functions which were added to the Iterable interface and Map interface. read more
20 April 2021
if vs if let vs guard let in Swift
if let and guard let are two conditional operators or condition checker which make our life super easy. Other languages have only if as condition checker but swift provides if let as well as guard let also which are operationally same but a bit different in functionality. read more
16 April 2021
Kotlin : Single Expression Function
Kotlin is a powerful language that reduced a lot of boilerplate code when compared to Java. The single expression function is the same in terms of reducing the boilerplate code. The single expression function, as his name suggests, is the function that just has a single expression. We can remove the return type of that function, braces as well as return keyword from it. read more
13 April 2021
Reified : Kotlin
Generics in any language is the powerful features that allow us to define classes, methods and properties which are accessible using different data types while keeping a check of the compile-time type safety. To get the information about the type of Template class, we will have to use a keyword called reified read more
6 Mar 2021
Kotlin Enum Classes
Enums are special classes which limit the possible values of an object for that class. The possible values defined for that class are final or unchangeable. read more
16 Dec 2020
UIView ClickListener : Swift
Adding a click event to a UIView is something which is required most of the times. For views like UIButton, we can simply connect an IBAction with the event type and detect the click events but sometimes we need it for Lable or even other views. read more
14 Dec 2020
Variable vs Object vs Reference
Variables are named storage of any primitive data type. Objects are variables of non-primitive data types or user-defined classes. A reference is nothing but a pointer pointing to the object. read more
04 Dec 2020
Native Android text sharing to Whatsapp contact in Unity
The ideal way any app accepts text or image, video or any other format for sharing is through intent filters defined in the manifest file. Whatsapp also does the same and accepts all possible format (with some size and other limitations) but that will take you to a contact selection screen in Whatsapp. read more
03 Dec 2020
Android : Share message directly to whatsapp contact
The ideal way any app accepts text or image, video or any other format for sharing is through intent filters defined in the manifest file. Whatsapp also does the same and accepts all possible format (with some size and other limitations) but that will take you to a contact selection screen in Whatsapp. read more
23 Oct 2020
Kotlin Extension Property
Extension functions are really-really helpful while writing code in Kotlin. You don't have to extend the class but you can add the functionality to even a final (non-open) class which will be resolved statically but how about extension properties. Is it even possible? read more
13 Sep 2020
Kotlin apply function
Scope functions are nothing but the functions which define a scope to the calling object. We can apply operations on that object within that scope and return the object itself from that scope function or we can even return the result of that operation or operations from the scope function. read more
27 April 2020
Partial class in C# (partial modifier)
A partial class is a special type of class where a single class can be split into multiple '.cs' file and while compilation, all the functionalities of same partial classes written in different '.cs' files will be merged and then compile it. read more
29 Mar 2020
Difference between Any, Unit and Nothing : Kotlin
We all know about three classes Any, Unit and Nothing in Kotlin which have their own functionality and use cases but we usually confuse between the differences among them and when to use what. read more
03 Mar 2020
Why let function is an Extension to Template class?
Why let is an extension to Template class but not Any class? Not only let, but other helper functions like apply, also, takeIf and takeUnless are also extension functions to the Template class. The question is why? read more
29 Feb 2020
Kotlin let function
Scope functions are nothing but the functions which define a scope to the calling object. We can apply operations on that object within that scope and return the object itself from that scope function or we can even return the result of that operation or operations from the scope function. read more
25 Feb 2020
How extension functions resolved?
how does extension functions are actually resolved? This question is being asked by almost everyone both in and outside the interviews. The shorted or the only answer I get is 'Statically'. What does statically means? read more
15 Dec 2019
Inheritance vs Extension functions
We all know about inheritance which is there in the OOPs concept where one can extend a class and add functionality to it. In the new programming languages, there is something called as extension functions which can add a functionality to an existing class without extending it. read more
02 Dec 2019
partition() : Kotlin
The collection is something which is used by almost everyone. It makes our life easy. List, Set and Map are the best examples of them. Even the programming language in which you are writing code provides you with a few basic operations that can be performed on those collections, But sometimes you need even more operations. read more
23 Oct 2019
Native Android image sharing in Unity using FileProvider
Since Google changed the sharing way using FileProvider to make it more secure, we can not share the file object directly to any other Application. We need to use the FileProvider and grant read URI permission to make it accessible for any other app. read more
28 May 2019
‘takeIf’ and ‘takeUnless’ : Kotlin
Ever thought of chaining an if condition? What if we can chain the if condition also and moves or executes the next code in the chain only if the condition is true? Kotlin has something very interesting to achieve the same. read more
10 May 2019
Inline function : Kotlin
Inlining is basically requesting the compiler to copy the (inlined) code at the calling place. When a program is executed and a function is called, CPU stores the memory address of the instruction following the function call, copies the arguments of the function into a stack and finally transfers control to the specified function. read more
15 April 2019
‘mutating’ in Swift
As we all know, Classes are reference type whereas Structures and Enumerations are of a value type in swift. What does that mean is that a class object shares a single instance of the object and passes the same reference if passed to any function or new object whereas the value type is the one which creates a copy of it and passes only the value. read more
29 Mar 2019
‘inout’ in Swift
Recently, while working with swift I came up with a use case where I need to modify the variable passed as an argument to a function. Eventually, all the variables passed to a function are of an immutable type which cannot be changed which is similar to a let variable. read more
01 Mar 2019
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
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 Sep 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 or we create a class with just two variables and return that class object from the method. read more
17 Aug 2018
Native Android text sharing to 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
14 Aug 2018
Native Android 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
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
03 Mar 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. Later I realized in Kotlin, there are few concepts which are completely different from java or any other another language for loops. 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
24 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
lateinit Property 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
05 Aug 2017

Presentations (6 slides)

The power of Camera APIs and OpenGL all together
Are you using the best out of your device camera and GPU in your app? Do you know how camera frames are drawn on the screen? Do you think your camera should do way more than just clicking a picture? Did you ever try to process the frames like applying filters or beautification before previewing it? read more
07 Nov 2020
Low Level Design : Tic-Tac-Toe
System designing is the process of designing system elements such as architectures, modules, components, different interfaces of those components. Its the process of defining the lowest level entities in a software. It is the backbone of any software. read more
26 July 2020
How can I migrate my Android code from Java to Kotlin?
Developers know the benefit of Kotlin over Java for Android app development but they hesitate to try it or even sometimes doesn't know how to start using it in their existing code base. It is very easy to start with at the same time you don't have to migrate the entire codebase in one shot. Instead, you can start writing new features using Klotlin and once you are familiar with Kotlin, you can slowly start the migration of older code. read more
11 July 2020
Java or Kotlin, What do you use?
Kotlin is something which was introduced as an official language for Android development in Google I/O 2017. Since then it has grown and evolved a lot. It has multiple benefits and on top of everything, it's really easy to use. Its been three years, still devs or some companies hesitate to use it. read more
06 June 2020
Object-Oriented Programming (OOP) Concepts
Object-oriented programming (OOP) concepts are something which are fundamentals of any Object-oriented programming language. These concepts give you the power to structure your code in such a way that it's well optimized, reusable, efficient, future proof and much more. read more
30 May 2020
Cut your APK Size with features on demand
Do APK or app size matters? Does a user think about the APK size before downloading it? Does a user think about space, an app occupying on the phone? Is your App size is more than just a few MBs? What if we provide very basic functionality and let the user decide whether he wants the advanced or additional functionality or not? read more
04 Aug 2019

Public Gists (10 gists)

Custom Android Manifest File in Unity
An example of custom Android Manifest.xml in Unity read more
29 May 2021
Typecast One to Another Android Object in Untiy
An example of typecasting Android/Java object in unity read more
28 May 2021
UIView ClickListener : Swift
Adding a click event to a UIView is something which is required most of the times. For views like UIButton, we can simply connect an IBAction with the event type and detect the click events but sometimes we need it for Lable or even other views. read more
14 Dec 2020
Native Android text sharing to Whatsapp contact in Unity
The ideal way any app accepts text or image, video or any other format for sharing is through intent filters defined in the manifest file. Whatsapp also does the same and accepts all possible format (with some size and other limitations) but that will take you to a contact selection screen in Whatsapp. read more
26 Nov 2020
Android : Share message directly to whatsapp contact
An example of sharing a text message directly to a WhatsApp contact in Android read more
23 Nov 2020
Native Android image sharing in Unity using FileProvider
An example of implementing native Android image/screenshot sharing in Unity using FileProvider. read more
15 Oct 2020
Native Android text sharing to particular app in Unity
An example of implementing native Android text sharing to a particular app using app’s package name in Unity. read more
12 Oct 2020
Native Android image sharing in Unity
An example of implementing native Android image/screenshot sharing in Unity. read more
11 Oct 2020
Native Android text sharing in Unity
An example of implementing native Android text sharing in Unity. read more
10 Oct 2020
Native Android in Unity
An example of implementing Android native code in Unity. read more
09 Oct 2020

Medium Posts (3 posts)

Suneet Agrawal - An Adrenaline Junkie!
Skydiving, Flying an aircraft, Scuba diving, Skiing, Bungee Jumping, Trekking, Parasailing, 800 Km stretch Bike ride! For many of us, this may be a set of adjectives for speed or adventure. But not for Suneet Agrawal. These are part of an eclectic mix of activities that the adrenaline junkie in Suneet has touched his hands and heart so far. read more
04 May 2020
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
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

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