This is aimed to to be a master repo which would contain different snippets of code relating to the mostly used features in any professionally developed android app ranging from basic recyclerview implementations to retrofit usage. It is designed to follow the best practices like dependency injection using dagger hilt and MVVM clean architecture. Moreover, best effort is made to add the unit and UI tests as well to keep the development cycle adherent to the automated testing.
Following are the components in the application.
1 – Room
Room is a preferred method of sharing data in a structured format in local storage. The activity allows the user to enter new entries which contain personal information like first name, last name etc.
All those entries are listed in a recyclerview in a material design’s card format. Deletion functionality is also provided.
2 – Retrofit
Calling API end points and getting/writing data is a need of almost all the applications today. Retrofit is a popular library to do so. In this activity, a simple get call is made to an open API which returns random cat facts. The text is then displayed on the canvas using livedata.
3 – ShareData
This module tackles the functionality of sharing data with external applications. A text is shared with the application of user’s choosing. Likewise this activity can also accept data in format of text from external applications and show it in a textview.
4 – ReadWriteResource
It writes to scoped staged area in a ‘test’ file. And reads from the same file on the button click of reading.
5 – VideoPlayFromLocalStorage
Plays video from local storage. It also consists of the control like play, pause and seek bar.
6 – AudioPlayFromLocalStorage
Plays audio from the local storage.
7 – VideoStreamFromInternet
The activity renders a surface that shows video being streamed from a remote location. It automatically takes care of buffering and all the relevant network-related activities. Supports both portrait and landscape mode.