Against the Odds is a sports analytics and betting odds application designed to provide users with insightful statistics, betting calculations, and interactive features. Developed using modern Android technologies, the app utilizes Kotlin, Jetpack Compose, and a PostgreSQL database for data storage.
Developed by:
- Zeshan Basaran
- Benis Munezero
- Sujay Vuchula
- Elliott Kolberg
- Kyle Mattox
-
Android Studio:
- Download and install Android Studio (latest stable version) from Android Studio.
- Ensure you have Android SDK version 31 or above installed.
-
PostgreSQL:
- Install PostgreSQL 13 or higher.
- Ensure the PostgreSQL server is running and accessible from your local machine.
-
JDK:
- Install Java Development Kit (JDK) version 11 or higher.
-
Git (optional):
- Install Git for version control if you want to clone the repository.
- Open a terminal or command prompt.
- Run the following command to clone the project:
git clone [https://github.com/<your-repo-link>.git](https://github.com/Benismu6/Against-the-Odds.git)
- Navigate to the project directory: cd against-the-odds
- Open Android Studio.
- Click on File > Open, and select the project folder.
- Right click the "app" folder in the left side bar and select "Reload from Disk"
- Allow Android Studio to sync the Gradle files. If Grade files do not automatically sync, select "Gradle" in the right side bar, right click "AgainstTheOdds", and select "Reload Gradle Project".
- Open the build.gradle file for the app module.
- Ensure the following dependencies are present:
- Jetpack Compose
- Retrofit
- OkHttp
- PostgreSQL JDBC Driver
- ViewModel KTX
- Navigation Compose
- If missing, add them to the dependencies section in build.gradle:
dependencies {
implementation "androidx.compose.material3:material3:1.1.0"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1"
implementation "androidx.navigation:navigation-compose:2.6.0"
implementation "com.squareup.retrofit2:retrofit:2.9.0"
implementation "com.squareup.okhttp3:okhttp:4.9.3"
implementation "org.postgresql:postgresql:42.5.0"
}
- Sync the project by clicking "Sync Now" when prompted.
- In Android Studio, connect an emulator or a physical device.
- Click the Run button or press Shift + F10.
- The app will launch, and data fetching/upload will begin automatically.
- Statistics Dashboard:
- View detailed stats for all NFL teams.
- Betting Odds Calculator:
- Calculate confidence levels for over/under bets.
- Help/FAQ:
- Access in-app help and FAQs.
- Settings:
- Customize app preferences such as notifications and default teams.
- NetworkOnMainThreadException
- Ensure all network/database calls are executed on a background thread.
- Database Connection Issues
- Verify PostgreSQL server is running and accessible.
- Check the DB_URL, DB_USER, and DB_PASSWORD in TeamRepository.kt.
- Gradle Sync Failures
- Ensure you have a stable internet connection.
- Clear Gradle cache
./gradlew clean
- Reload "app" from disk.
- Go to Device Manager and stop device.
- Turn Wi-Fi off and on.
- Start device.
- Reload Gradle project.
- Run app.
If having issues generating statistics data, check Render.com/games/all. If there is no data, or connection issues persist, contact [email protected] so that the Render.com web service may be restarted.