Skip to content

arcreane/android-project-kale

Repository files navigation

Review Assignment Due Date

Logo

Kinedex

Instantly master exercise form by searching a motion-centric directory of animated guides

live-demo-apk.mp4

Kinedex

Kinedex is a high-utility Android application designed to eliminate friction in fitness education. Instead of scrubbing through long videos to figure out how an exercise is performed, users can search for any movement to immediately access looping animations, targeted muscle data, and technical benefit details. Kinedex allows you to search for the desired exercise and watch its performance. The app also features a timer that both ensures the countdown remains persistent in the background while the user is away from the app, and triggers the vibrator sensor when complete. Fancied exercises can also be saved and accessed in the Saved tab.

Core Features

  • Motion Dictionary: High-speed, searchable index of exercise animations.
  • Visual Form Guides: Focused, looping visuals to ensure perfect execution.
  • Integrated Rest Timer: A background-aware timer to manage workout recovery periods.
  • Responsive Layouts: Full-screen immersive mode for landscape orientation.

Features

Multiple Activities and Intents

The application utilizes separate Activities for the Search Interface and Exercise Details.

  • Explicit Intents: Used for navigation between the directory and detail views.
  • Implicit Intents: Features a "Share" action to fulfill external application communication requirements.

Orientation Changes

The Detail Activity is optimized for orientation awareness. Users can rotate to landscape mode to transition the looping animation into a fullscreen view, ensuring a versatile UI.

Fragments and Data Exchange

Workout data (sets, reps, and descriptions) is managed via a dedicated Fragment hosted within the Details Activity. Data is exchanged dynamically to ensure context-specific content loading.

Menus and Real Actions

An Options Menu is integrated to handle functional actions, including category filtering and quick access to the Rest Timer, ensuring all UI actions are wired to underlying logic.

Advanced View Component

The search core utilizes a RecyclerView with a Custom Adapter. This ensures memory-efficient scrolling and dynamic data binding for the exercise library.

Themes and Styles

A strict design system is defined in res/values. The application uses no hard-coded colors, relying entirely on consistent XML styles and themes to maintain a professional aesthetic.

Hardware Features

To provide physical feedback, the application utilizes the phone's Vibrator. This hardware feature is triggered via the Rest Timer to signal the end of a break.

Services and Background Processing

The Rest Timer is implemented as a Foreground Service. This ensures the countdown remains active and persistent in the background while the user is away from the app.


Initializing the Workspace

After cloning the repository, run the following command in the root directory. This installs the necessary development tools and automatically wires the Git hooks to your local machine:

npm install

Note: npm (and other package managers like yarn) has a set of reserved script names called Lifecycle Hooks. When you run a major command like install, npm is programmed to look for specific "trigger points". This includes the prepare npm script. npm chose the name prepare for tasks that "prepare the package for use."

Build Instructions

To build and run the Kinedex app locally on your machine, follow these steps:

Prerequisites

  • Android Studio (Latest stable version recommended)
  • Android SDK (API 34+)
  • Java Development Kit (JDK) 17 or higher

1. Clone the Repository

Open your terminal and run the following command to clone the project to your local machine:

git clone [https://github.com/YOUR-USERNAME/YOUR-REPO-NAME.git](https://github.com/YOUR-USERNAME/YOUR-REPO-NAME.git)

2. Open in Android Studio

  1. Launch Android Studio.
  2. Select Open from the welcome screen (or File > Open from the menu).
  3. Navigate to the directory where you cloned the repository and select the Kinedex project folder.

3. Sync Gradle

Once the project opens, Android Studio should automatically begin syncing the Gradle files to download necessary dependencies (like Glide and Material Design components).

  • If it does not sync automatically, click the Sync Project with Gradle Files icon (the elephant icon) in the top right toolbar.
  • Wait for the indexing and build processes to complete.

4. Build and Run

  1. Set up an Android Virtual Device (AVD) using the Device Manager, or connect a physical Android device via USB/Wireless debugging.
  2. Important: Ensure your emulator or physical device has an active internet connection, as Kinedex dynamically fetches exercise animations from GitHub.
  3. Click the green Run 'app' button (Shift + F10) in the top toolbar to build and deploy the application.

Developer Setup

To maintain professional project history and technical rigor, this repository uses Husky and commitlint to enforce the Conventional Commits specification.

Tech Stack

  • Language: Java
  • Platform: Android SDK
  • Design: XML Styles / Paged Media
  • Repository: Created by GitHub Classroom

Who did what


Bahjat's Tickets' Acceptance Criteria

  • Create TimerFragment.java and SavedFragment.java with standard onCreateView overrides.
  • Create fragment_timer.xml and fragment_saved.xml using ConstraintLayout.
  • Root layouts must use @color/background to enforce our design tokens.
  • A TextView must be perfectly centered on each screen using ConstraintLayout parameters to act as a visual QA anchor.
  • Add a Search Bar and a horizontally scrolling ChipGroup to fragment_directory.xml.
  • Hardcode the exact 7 chips: All (Default), Chest, Back, Legs, Biceps, Triceps, Core.
  • Update HomeViewModel to store the masterList and run a combined filter (Search Text + Chip Category) every time an input changes.
  • UI Structure: Update fragment_timer.xml to include a massive, centralized time display wrapped in a circular Surface shape, with a large Primary action button below it.
  • State Enum: Create a TimerState enum with values: IDLE, RUNNING, PAUSED.
  • ViewModel Logic: Create TimerViewModel.java using Android's CountDownTimer. It must expose LiveData<String> for the formatted time (e.g., "02:00") and LiveData<TimerState> for the UI buttons to observe.

Ibaad's Tickets' Acceptance Criteria

  • Ensure Jetpack Navigation dependencies are in build.gradle (if not already present).
  • Create a nav_graph.xml resource file defining the three fragment destinations.
  • Critical: The android:id of each fragment in the nav graph must be perfectly identical to the android:id used in res/menu/bottom_nav_menu.xml.
  • Update activity_main.xml to include a configured FragmentContainerView.
  • Wire the controller in MainActivity.java using NavigationUI.
  • Add ExerciseDetailsFragment to nav_graph.xml with an action connecting it from DirectoryFragment.
  • Update ExerciseAdapter to accept a click listener interface.
  • Create fragment_exercise_details.xml utilizing a ScrollView so content doesn't get cut off on smaller phones.
  • The layout must display the Image, Title, Muscle Group, Sets/Reps, Description, and Technical Benefits using our Material tokens.
  • Include a placeholder "Heart/Favorite" icon button (Logic to be wired in Phase 5).
  • Apply Kinedex Icon.

Irina's Tickets' Acceptance Criteria

  • Inside app/src/main/java/com.kinedex.app/, create two new directories (packages): data and ui.
  • Inside ui, create a sub-package called home.
  • Move the existing MainActivity.java from the root package into the new com.kinedex.app.ui.home package.
  • Create ExerciseRepository.java in the data package.
  • Create KinedexApp.java in the root com.kinedex.app package that extends android.app.Application.
  • Instantiate the ExerciseRepository inside KinedexApp's onCreate() method so it acts as a single global instance for the app.
  • Create HomeUiState.java (POJO) in the ui.home package to hold standard UI variables (isLoading, welcomeMessage, errorMessage).
  • Update the existing MainActivity.java to retrieve the global repository from KinedexApp.
  • Use the HomeViewModelFactory to instantiate the HomeViewModel.
  • Observe the ViewModel's LiveData inside the Activity. Replace the hardcoded "Hello, world." text in Directory XML layout with the welcomeMessage provided by the ViewModel state.
  • Implement RecyclerView functionality.

Mahmoud's Tickets' Acceptance Criteria

  • Initialize Base Android Project Structure.
  • Update the base application theme to inherit from a modern Material 3 theme (e.g., Theme.Material3.DayNight.NoActionBar).
  • Map the colors defined in colors.xml to the appropriate Material 3 theme attributes (e.g., <item name="colorPrimary">@color/primary</item>).
  • Ensure the Dark Mode version (themes.xml (night)) uses appropriate darkened backgrounds and desaturated primary colors to prevent eye strain.
  • Build the foundational bottom navigation bar using Material 3 design tokens.
  • Add FOREGROUND_SERVICE and POST_NOTIFICATIONS permissions to AndroidManifest.xml. Declare TimerService.
  • Create a Service that handles the CountDownTimer logic. It must create a Notification Channel (Required for Android 8+) and call startForeground().
  • The Service must broadcast the remaining milliseconds (ACTION_TIMER_TICK) every second so the UI can update.
  • Update TimerViewModel to stop calculating time natively. Instead, it should send Intents to the Service (START, PAUSE, CLEAR) and observe the Broadcasts.
  • Test Vibrator Sensor Proper Functionality
  • Construct Signed APK and Test

Sultan's Tickets' Acceptance Criteria

  • Enforce Commit Conventions via Git Hook.
  • Create DirectoryFragment.java and res/layout/fragment_directory.xml.
  • Cut the <androidx.recyclerview.widget.RecyclerView> from activity_main.xml and paste it into fragment_directory.xml.
  • In activity_main.xml, replace the empty space where the list used to be with an <androidx.fragment.app.FragmentContainerView> (ID: nav_host_fragment). Pin it above the Bottom Navigation Bar.
  • Move the HomeViewModel and ExerciseAdapter initialization logic out of MainActivity.java and into the onViewCreated method of DirectoryFragment.java.
  • A large, bold "Kinedex" title is pinned to the top of the DirectoryFragment.
  • The TextInputLayout includes the ic_search magnifier icon aligned to the end (right side) of the input box.
  • When a muscle group chip is selected, its background color smoothly transitions to the Kinedex brand green (#99AD7A), not purple. Unselected chips remain default.
  • Every list_item_exercise card features a circular avatar shape on the left side.
  • The circular avatar dynamically extracts and displays the first letter of the exercise name (e.g., "L" for Leg Press).
  • Implement the data persistence loop by allowing users to toggle a favorite state on the Details screen, and displaying those saved items in a dedicated RecyclerView on the Saved tab.
  • Increase number of cards.

About

πŸ“ Instantly master exercise form by searching a motion-centric directory of animated guides

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages