Skip to content

Android app social network for organizing team sports matches

License

Notifications You must be signed in to change notification settings

jorgeavilae/SporTTeam

Repository files navigation

SporTTeam

Android app for organizing team sports matches.

Project developed as a Final Degree Project in Computer Science at University of Salamanca in 2017-2018.

Javadoc

https://jorgeavilae.github.io/SporTTeam/

Abstract

In this Final Degree Project, an application for Android mobile devices has been developed, with a certain character of social network, capable of helping its users to organize sporting events for a certain number of people. Thanks to it, users are able to capture the number of players needed to fill the vacancies of the matches they organize. Through their devices, users publish in the social network games of different sports that they want to play in the future, along with the number of players they need to play them. Other users, through different protocols, can join them as participants. It also adds a function of alarms that warn the user if a match is created with the features his is looking for. The system manages user accounts, the relationships between them, the matches they create, the fields where matches are played and the alarms set. In addition, it has a notification system that shows notifications to the user, about events that occur in the system, or about relevant actions performed by his friends.

For the application to work properly it has been necessary to use external services such as Firebase, a Google platform. Firebase Realtime Database, NoSQL type, has been used as a centralized database for data storage. However, it has also been necessary to implement a cache in SQLite, within each client application, to perform more complex queries. Firebase Authentication has been used for the control of user accounts and their identification within the application. Firebase Storage for storing images. And for the capture of relevant actions and the subsequent sending of notifications, Firebase Cloud Functions and Firebase Messaging have been used. In addition, Google Maps Platform libraries have been used to display maps that improve the user experience, to manage postal addresses of matches and fields and to translate them to and from coordinates.

For the development of the application, the architecture pattern Model – View – Presenter (MVP) has been implemented. Multiple key components of the Android system have been used, such as Loader to query the Content Provider under the Observer pattern, Services to synchronize data in the background, or Widget for the device launcher. Multiple Activities have been implemented for each large object of the domain of the problem, on which Fragments that process these objects more specifically are hosted and use the Activity as a communication bridge, as a Master – Slave pattern. All this, taking into account other more advanced aspects of Android development, such as the distinction between the main user interface thread and other threads of execution in the background; or properly use life cycle and Context of objects such as Activity, Application, Fragment, Service, and more.

Resumen

En este Trabajo de Fin de Grado, se ha desarrollado una aplicación para dispositivos móviles Android, con cierto carácter de red social, capaz de ayudar a sus usuarios a organizar encuentros deportivos para un determinado número de personas. Gracias a ella, los usuarios son capaces de captar el número de jugadores necesarios para cubrir los puestos vacantes de los partidos que organizan. A través de sus dispositivos, los usuarios publican en la red social partidos de diversos deportes que quieren jugar en el futuro, junto con el número de personas que necesitan para disputarlos. Otros usuarios, mediante distintos protocolos, pueden unirse a ellos como participantes. Se añade también una función de alarmas que avisan al usuario si se crea un partido con las características que busca. El sistema gestiona las cuentas de usuarios de la aplicación, las relaciones entre ellos, los partidos que crean, las instalaciones donde se juegan y las alarmas establecidas. Además, cuenta con un sistema de notificaciones que muestra avisos al usuario, sobre eventos que ocurren en el sistema, o sobre acciones llevadas a cabo por sus amigos y con cierta relevancia para él.

Para el correcto funcionamiento de la aplicación ha sido necesario el uso de servicios externos como los de Firebase, una plataforma de Google. Para el almacenamiento de los datos se ha usado Firebase Realtime Database como base de datos centralizada, de tipo NoSQL. Sin embargo, también ha sido necesario implementar una caché en SQLite, dentro de cada aplicación cliente, para realizar ciertas consultas más complejas. Para el control de cuentas de usuario y su identificación dentro de la aplicación se ha usado Firebase Authentication. Para almacenamiento de imágenes se ha usado Firebase Storage. Y para la captura de acciones relevantes y el envío posterior de notificaciones se han utilizado Firebase Cloud Functions y Firebase Messaging. Además, se han usado bibliotecas de Google Maps Platform para mostrar mapas que mejoren la experiencia del usuario, para gestionar el uso de direcciones postales para los partidos y las instalaciones y para su traducción desde y hacia coordenadas.

Para el desarrollo de la aplicación se ha implementado el patrón de arquitectura Modelo – Vista – Presentador (MVP). Se han utilizado diversos componentes clave del sistema Android, como el uso de Loader para la consulta al Proveedor de Contenido bajo el patrón Observer, los Servicios para sincronizar los datos en segundo plano, o el Widget para el escritorio del dispositivo. Se han implementado varias Actividades para cada gran objeto del dominio del problema, sobre las que se suceden Fragmentos que tratan estos objetos de manera más específica y usan la Actividad como puente de comunicación, a modo de patrón Maestro – Esclavo. Todo ello, teniendo en cuenta otros aspectos más avanzados del desarrollo en Android, como la distinción entre el hilo principal de la interfaz y otros hilos de ejecución en segundo plano; o el uso correcto del ciclo de vida y el Context de los objetos Activity, Application, Fragment, Service, etcétera.