Skip to content

CMPUT301W23T14/QRHunter-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QRHunter

A CMPUT301 android app for a Pokemon-Go-like game! Players can scan QR Codes and compete with other players.

Getting Started

To run the project locally, begin by cloning the repository:

git clone git@https://github.com/CMPUT301W23T14/QRHunter-App

Then create a local.properties file under the QRHunter directory following the local.properties.example.

Dependencies

Name Uses
Material3 This project follows Google's Material 3 design system
Firebase This project uses Google's Firebase Cloud Firestore for the database
Android Jetpack: Navigation The app uses Android's Jetpack Navigation Component for implementing single-activity architecture and handling navigation
Android Jetpack's View Binding The app uses Android's Jetpack View Binding to make interacting with views easier
JUnit Unit and Intent tests
yuriy-budiyev/code-scanner For scanning QR Codes
Guava For hashing the content of the QR Code
RXBinding Used for input debounce
Google maps For displaying map and markers

App Architecture

App Architecture Diagram Source

This project loosely follow Android’s official Guide to App Architecture (MVVM). The Domain Layer is not implemented in this project.

UI Layer

The recommended single-activity architecture and ViewModel classes are used which makes navigation easier using Jetpack's Navigation Component. Android Jetpack's View Binding is also used to mostly replace findViewById.

Anything related to the UI of the project goes under ui package in the app. This package include adapters, Fragments and ViewModels. Each screen (the Fragment and its ViewModel) in the app goes under the ui package. Example: A profile page would be a profile folder containing ProfileFragment.java and ProfileViewModel.java.

Domain Layer

The recommended convention for the Domain Layer is not followed. Instead of a single class that is responsible for a single action, we have a utils package that contains utility classes for each of their respective model class. Example: QRCode.java would have a QRCodeUtils.java. These utility classes holds a collection of static methods that are reused and unrelated to the UI and application data, such as: generateQRCodeHash()

Data Layer

Following Android's official recommendation, application data in the database is exposed to the UI using repository classes so that any UI component such as Activities, Fragments and ViewModels would never interact with the Data Source.

Anything related to the data goes under the data package in the app. This package contains model classes and repository classes. Note: All the repository classes (PlayerRepository.java and QRCodeRepository.java) extends from DataRepository.java that holds a static reference to the Firestore database.

Demo

Testing of Scanning and Profile

Screen_Recording_20230404_162444_QRHunter.mp4

Testing of leaderbord

Screen_Recording_20230404_162655_QRHunter.mp4

Testing of Map

Screen_Recording_20230404_162624_QRHunter.mp4

Other Documentations

Other documentations are available in the wiki.