Furry Angel Finder is an Android application that makes searching for adoptable pets easy. Thanks to its simple UI, users can set search filters and view details about the furry angels matching their search criteria.
In addition, the application provides a downloadable link to a Pet Promise Certificate, the perfect gift for a loved one on the hunt for a new pet.
Furry Angel Finder is comprised of three activities, one fragment, one service, one broadcast receiver and various UI components, including Buttons, Cards, a List, Dividers and Snackbars. The application is built in accordance with the MVVM architectural pattern.
The three app Activities are MainActivity, SearchResultsActivity and PetDetailActivity. The Service is DownloadFileService.
-
MainActivity displays the initial UI for the app. It collects user search parameters and receives search results. Upon receiving the results, it passes them to SearchResultsActivity.
-
SearchResultsActivity displays a list of search results. It passes individual result items to PetDetailActivity.
-
PetDetailActivity displays details about the selected pet. PetDetailActivity also displays a button, which when pressed, executes the methods necessary to start the application's service.
-
DownloadFileService downloads a file from the internet using a URL.
The application's design adheres to the MVVM (Model, View, ViewModel) architectural pattern. In this pattern, the Model contains the application data, state and business logic. The View contains everything related to the UI, and the ViewModel contains observable data for the View.
When the app first runs, MainActivity executes. It sends the user's pet selection criteria to the ViewModel, which passes it along to the Model. With this data, the Model obtains the results and ties them to a MutableLiveData observer object and sets the results of the query.
Next, the ViewModel observes this update, receives the result and updates its own LiveData observer object. The View then observes this object and passes it along with an Intent to start the second Activity, SearchResultsActivity.
In this activity, the search results object is carefully processed and made visible to the user in the form of a RecyclerView list on a Fragment. If a user clicks on one of the resulting pets, an Intent is passed to the third Activity, PetDetailActivity.
In this activity, if the user clicks on the "Give A Pet Promise" Button, the View communicates with the ViewModel, which tells the Model to start the Service. This Service, named DownloadFileService, downloads a Pet Promise Certificate from the internet to the user's phone.
Upon running the app, MainActivity is the first component to execute. Within this activity, the app's initial user interface is built.
The user can click on each of the four dropdown arrows to select filters for pet type, gender, size and age. After specifying filters, the user can click on the "Search" Button to begin the search.
If there are no pets matching the search query, a Snackbar is displayed notifying the user and prompting for different search parameters.
If there are pets matching the search query, the application navigates to SearchResultsActivity. This Activity contains a Fragment which displays a vertical RecyclerView list of pet results. Each item in the list is displayed on a Card for improved clarity.
Here, the user can click on a list item to view more details about a specific furry angel of interest.
Details include the pet's image, name, gender, breed, size, age and a long description.
If the user clicks on the "Give A Pet Promise" Button, a Pet Promise Certificate file will be downloaded to the user's phone to be filled out and given to someone.