Creating open-source Android libraries benefits for both library owner and the other developers. A code written by a developer can save other developers from building the same thing, and also the other developers can contribute the same code. Thus, a library that will be useful for many people is can be created with the contribution of a few people.
However, you may not want to open some of your personal or corporate libraries to the outside world. In this case, you can create your own packages using one of GitHub, GitLab, AWS, GCP etc. services.
When you have multiple projects…
Android Shared Preferences is best and easy way of the key-value storage. It also provides callback to listen changes in the preference values. However, can we make this use more suitable for our architecture?
Let’s imagine we have an Android application and it storages some feature status data (like open-closed) in the shared preferences. Multiple fragments of application has indicators which are showing that feature status and we want to see changes immediately. Each indicator is getting status of feature from shared preferences. Additionally, this feature status can also be updated in some service or broadcast receiver.
I used to work with MVP pattern until now. However, when Google released nice-to-use components like the
ViewModel along with the Android Jetpack, I have tried to work with MVVM pattern. In this article, we will see how can we use the MVVM pattern with Retrofit, RxJava, and Dagger 2.
Model-View-ViewModel architecture consists of 3 parts.
ViewModel, or listens live data stream from the
ViewModeland provides to the users.
Viewor provides data to
Golang & Android Dev.