I write about things I’m learning — Android Developer @Nagarro

Kotlin / Contracts

Add effects to your functions with Kotlin Contracts

Image for post
Image for post

Introduction

The Kotlin compiler is smart. By performing static analysis on your code, the compiler identifies mistakes in your code as you type it.

One of the most notable features of the Kotlin compiler is smart casting. The compiler has the ability to perform a cast based on the type checks done by the developer.

The compiler tracks the is-checks, null-checks, and explicit casts for immutable values. Using the acquired information, the compiler casts variables when needed.

However, the smart cast mechanism is limited. …


Jetpack Compose / State Management

Managing state with Jetpack Compose

Image for post
Image for post

Introduction

Jetpack Compose is a modern, fully declarative UI toolkit created to address the challenges of the old View system.

Unlike the old View system, Compose provides a declarative API that enables your UI to react to changes, without imperatively mutating the frontend views.

Conversely, the old View system requires you to manually update the nodes (views) from the View hierarchy by calling methods such as textView.setText().

The View system approach increases the likelihood of errors since the actual state of the Views is internalized. That means you have two states for every UI component — the state you are maintaining in your application (e.g. …


Kotlin / Delegation

Favoring delegation to inheritance with Kotlin native support

Image for post
Image for post

Introduction

Bob has a million-dollar idea for a mobile application.
However, he doesn’t know Android programming and chooses to hire someone else to do it.

Luckily, an old friend called Alice, has a company that can implement Bob’s idea.

Alice runs through the employee records and finds the perfect match for the job — Charlie, an experienced Android developer eager to try the latest beta libraries on a new project.


Android / Security

How to patch the user vulnerability if Android can’t do it?

Image for post
Image for post

Series outline:

In the first part of the series, we have identified that the user is the primary vulnerability exploited by attackers.

Subsequently, in the second part, we have seen the security measures enforced by Android at the OS level and the application level. This enabled us to better understand why the operating system itself is a harder target than the user.

However, so far, we have explored only the problem.

But what is the solution? …


Android / Security

Why do attackers exploit the users and not the operating system itself?

Image for post
Image for post

Series outline:

In the first part, we have identified that the user is the primary vulnerability exploited by attackers.

But why is that?

Why do attackers bother coming up with a convincing story when they could simply exploit the vulnerabilities of the Android OS?

In this part, we will explore the Android security model in order to understand WHY is the user the weaker link of the model.

Three Party Consent Model

In order to abstract unnecessary details, we will frame the Android security model as a three party consent model.


Android / Security

Revealing the most dangerous Android vulnerability

Image for post
Image for post

Series outline:

The context generated by the COVID-19 pandemic determined attackers to retarget their arsenal towards a more susceptible audience.

To an extent, the human immune system is able to adapt and defend people against the threat of biological viruses.

Yet, what is there to defend them against computer viruses?

To identify the recurrent vulnerability that is being exploited by attackers, we will take a short journey through the history of mobile malware.

The Mobile Malware Timeline

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store