# MZAP--Mobile Application for Basketball Match Tracking and Digitalization of Endgame Reports
## 3 MZAP Android Application--Architecture and System Design  
MZP is a modular Android application that was developed using a fragment-based [22;23] MVP (Model-View-Presenter) architecture [20;21] in the Java programming language, within the Android Studio Giraffe integrated development environment (IDE). The Agile software development model [24;25] was selected for the development of the MZAP application due to its iterative approach, which, in addition to planned development, allows for continuous testing and feedback from basketball officials. The application targets devices running Android 15 (SDK 34), with a minimum compatibility requirement of Android 10 (SDK 29). In addition to standard Android libraries, several third-party libraries were integrated to support the required functionalities. To facilitate the storage of match-related data, a set of class entities was implemented to encapsulate all essential elements of the match report. These data are serialized in JSON format and stored as a string within the application's SharedPreferences. They can be exported to external storage (e.g., an SD card) or shared via other applications that support data transfer. To abstract and manage interactions with SharedPreferences, a custom utility class named MatchRecordManager was developed. For JSON serialization and deserialization, the Gson library [36] was used. Java UUID Generator (JUG) library [37] was utilized to ensure the generation of globally unique identifiers for each match. In cases where match data are retrieved from a RESTful API server, match records are instantiated based on the received data, with their unique identifiers derived accordingly. To facilitate communication with external RESTful services, the Apache Commons Lang library [38] was incorporated. The generation of PDF files was accomplished by using the native Android PdfDocument library. To provide encryption capabilities for the generated PDF files and to provide access to PDF metadata for PDF report updates and versioning, an Android-compatible port of Apache PDFBox, known as PdfBox-Android [39] was integrated. Additionally, QR codes embedded within the PDF document (for purposes such as verification or indexing) are generated using the ZXing Core library [40]. The following paragraphs will present the structure of the MZAP Android application. Each package contains various components that are organized based on their specific purpose and functionality. Currently, the application is divided into 12 packages, as detailed below:  
* adapters: This package includes classes (adapters) designed to display lists of objects within the Spinner control. * components: This package contains components (controls) specifically developed for the MZAP application. * dialogs: This package encompasses all dialogs available within the MZAP application. * entity: This package contains the classes required to facilitate the data necessary for match reports. * entity_online: This package includes classes that handle the match data downloaded from the RESTful API server. * filters: This package contains classes used to filter user input. * fragments: This package comprises all fragments available within the MZAP application. * interfaces: This package includes all custom interfaces implemented within the MZAP application. * network: This package contains classes responsible for facilitating communication with the RESTful API server. * utility: This package provides a collection of custom utility classes used throughout the application. * viewmodel: This package contains ViewModel wrapper classes for certain entities from the entity package. * wifi: This package includes wrapper classes and interfaces for the simplified sending and receiving of data over a WiFi network. The activities within the MZAP application are derived from a custom base class, BaseActivity, which extends the standard Activity class. Each activity serves a specific purpose, as outlined below:BaseActivity: A custom base class for all activities, inheriting from the standard Activity class.