Navigation in developing Android apps is quite important and you should think twice what library suits (or your own solution) most and how it will be convenient to use when the app becomes bigger. Also, it might be good to think about how easy it will be to change your implementation to another one.
Before we will start, let me tell a story. Let's call it like this "How we made project modular and why I hated our navigation".
We had a single module project and everything worked fine except building time, that is because we used Dagger and it took too long to generate a single component. So we decided to separate the project into modules by features, for example, a login feature, a help feature and etc. …
Have you ever thought how to run UI tests without lots of devices, how to publish the app without visiting the Google Play Console or maybe how to make a “program” that will check your code with lint, then run the unit and the UI tests, and finally, publish the app on Google Play? If so and you did not find a solution, I will show you how it can be done.
As a CI service, we will use CircleCI because they give you 1500 free build minutes per month and also it is possible to build projects that are hosted in the private repositories, but CircleCI only works with GitHub and Bitbucket. For running UI tests we will use Firebase Test Lab because they allow you to run up to 15 instrumentation tests per day. Dropbox to store the signing key and its credentials. …
Have you ever written something like this to manage the Dagger components?
In my opinion, managing the Dagger components this way forces you to have a huge application class and also you have to write the
removeSomeComponent code by yourself. Then, in the activity or fragment, you have to get the application, cast it to the
YourApplicationClass. Finally, call the needed method to get the component.
Another way is to have an
appComponent in the application class and build a feature component right in the activity or fragment. Now you don’t have a huge application class, but still, you have to get the application, cast it, then get the
appComponent, and finally, build a feature component (or a subcomponent). But there is a problem: how to save the component during configuration changes? …