Wednesday, August 7, 2019

Random Android Thoughts

I have split my project into multiple modules. I have found that you can use 'api' in the core module and 'implementation' in the other modules and you only have to define the libraries once instead of in each module if they are shared. Pretty darn handy.

One of the modules is loaded dynamically. Really like this Google feature as that module has a pretty hefty 3rd party library for live video and most users will not need it.

Want to split out more modules but I really need to unwind some dependencies. Amazing what a maze of connections you code can become over time. Functions as needed but needs some work.

I have also been breaking things down into Activities with Fragments. This has really helped my code flow. Now I have each fragment do a single thing, sets its results and values can be held in View Models and those areas that care use MutableLiveData to monitor the results.

The new Fragment Navigation works really well. I like how I can view things ala iOS storyboards but with XML that I can manually edit.