Categories
Android Apps Kotlin

Location data reduction in Android

Android LocationManager allows fine location data updates with customisable interval. This means the phone could return new coordinates even after every 100ms. If the app would then upload all of these points, it would result in expensive data and battery usage. Can this location data be reduced before sending it to the server? Problem Android […]

Categories
Android Apps Architecture Jetpack Compose Kotlin

Create a login screen with Jetpack Compose

In a previous post I described how to create a Github Repository browser app. The UI in that app was written using XML layouts(imperative UI). In the recent years developers have been finding it easier to define and update the views using the declarative UI paradigm. This leads to Google releasing Jetpack Compose 1.0 in […]

Categories
Apps Architecture Kotlin Multiplatform Mobile

Kotlin Multiplatform app architectures

The recommended architecture for Android development is MVVM. However, when using Kotlin Multiplatform Mobile(KMM), the Jetpack’s ViewModel is not available. This means a different dependency or architecture needs to be used. There is no official way to go about this, but thanks to the Kotlin community, different approaches have surfaced. Separation of concerns The purpose […]

Categories
Android Apps Architecture iOS Kotlin Multiplatform Multiplatform Mobile

Kotlin Multiplatform logging libraries

When developing with any platform, the existence of libraries is assumed. This is to delegate common tasks to out project code, in order to reduce development time and avoid common pitfalls already solved by other developers. Kotlin Multiplatform(KMM) is no different. Available libraries Since Kotlin is becoming more popular among Android/JVM developers, one might expect […]

Categories
Apps Kotlin Multiplatform Mobile

iOS app with Kotlin Multiplatform Mobile

Overview Kotlin Multiplatform Mobile(KMM) is a new feature from Jetbrains. It is an alpha feature but can already be used to create and publish apps for both iOS and Android. It is possible to write business (network and database) logic in Kotlin, and share this code between iOS and Android. ⛩Architecture Kotlin code compiles into […]

Categories
Android Apps Architecture testing

Part 2: Testing with MockK and Koin

One of the best things about MVVM is the use of separation of concerns principle which by design enables testing of each component in isolation. View, ViewModel and Model are all separated and thus easily testable. When thinking of testing, then unit testing comes to mind first and for that mocking of dependencies is required. […]

Categories
Android Apps Architecture

Android App Architecture, Part 1

Not being familiar with modern Android App architecture and coming from the ViewController world, it is confusing jumping into the recommended MVVM architecture. There are also some parts of the official guide that are left for the reader to figure out, so I will write about my experience with implementing it in my repo browser […]