https://coroutinedispatcher.github.io/coroutinedispatcher/images/stavro.jpg

The Android guy

Dagger Multibindings saved my time

While the Android architecture made development simpler, we should always be aware of the Lifecycle and with that, the right way to provide ViewModels. Creating one ViewModel factory for each Fragment and ViewModel you have is really expensive, bad architecture, and too much unnecessary code. Not to mention the fact that you should care about scopes, dependencies, components modules when using Dagger for DI. You can have a simple “generic” ViewModel factory for all your app as a Singleton, with the help of Kotlin Reflection and Daggers Multibinding.

Getting hands dirty with KotlinJs

Although web development hasn’t been my thing since I started programming, I was really attracted the way Kotlin does solve things. So I did give a try to KotlinJS. **This is how to set up a KotlinJs page in less than an hour. ** Note: Chose to use the simplest set up without gradle or maven. You are free to chose what you like. First of all, you start with a new project in your IntelliJ and choose Kotlin -> Javascript.

A fusion between WorkManager and AlarmManager

Androids’ WorkManager has been around for a while. However my own expectations about it were a little higher. I wished that the WorkManagercould fire events at exact timing. But since it was made to respect doze mode, I should respect that too. That means that if the phone is idle, the WorkManager wont run. **Lets explore my case: ** Once the user logs into my app, I need to schedule 5 alarms for him.

What I learned from unit testing

Testing, testing testing. I was getting inside the “Fear of getting behind” every time I heard that word. So I decided to react quickly. I knew nothing about testing and this is my experience getting my hands dirty with it. Please feel free to correct anywhere I’m wrong. This is a reason why I’m writing blogs. So what the hell is testing? Testing is just a piece of code where you invoke your written production code and check its’ behavior.

Room, the basics

Official Stavro Xhardhas page · Post Room, the basics Posting as Stavro Xhardha Room, the basics * { font-family: Georgia, Cambria, “Times New Roman”, Times, serif; } html, body { margin: 0; padding: 0; } h1 { font-size: 50px; margin-bottom: 17px; color: #333; } h2 { font-size: 24px; line-height: 1.6; margin: 30px 0 0 0; margin-bottom: 18px; margin-top: 33px; color: #333; } h3 { font-size: 30px; margin: 10px 0 20px 0; color: #333; } header { width: 640px; margin: auto; } section { width: 640px; margin: auto; } section p { margin-bottom: 27px; font-size: 20px; line-height: 1.