Instantly master exercise form by searching a motion-centric directory of animated guides
live-demo-apk.mp4
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.
- 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.
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.
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.
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.
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.
The search core utilizes a RecyclerView with a Custom Adapter. This ensures memory-efficient scrolling and dynamic data binding for the exercise library.
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.
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.
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.
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 installNote:
npm(and other package managers likeyarn) has a set of reserved script names called Lifecycle Hooks. When you run a major command like install,npmis programmed to look for specific "trigger points". This includes thepreparenpm script.npmchose the namepreparefor tasks that "prepare the package for use."
To build and run the Kinedex app locally on your machine, follow these steps:
- Android Studio (Latest stable version recommended)
- Android SDK (API 34+)
- Java Development Kit (JDK) 17 or higher
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)- Launch Android Studio.
- Select Open from the welcome screen (or File > Open from the menu).
- Navigate to the directory where you cloned the repository and select the
Kinedexproject folder.
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.
- Set up an Android Virtual Device (AVD) using the Device Manager, or connect a physical Android device via USB/Wireless debugging.
- Important: Ensure your emulator or physical device has an active internet connection, as Kinedex dynamically fetches exercise animations from GitHub.
- Click the green Run 'app' button (
Shift + F10) in the top toolbar to build and deploy the application.
To maintain professional project history and technical rigor, this repository uses Husky and commitlint to enforce the Conventional Commits specification.
- Language: Java
- Platform: Android SDK
- Design: XML Styles / Paged Media
- Repository: Created by GitHub Classroom
- Create
TimerFragment.javaandSavedFragment.javawith standardonCreateViewoverrides. - Create
fragment_timer.xmlandfragment_saved.xmlusingConstraintLayout. - Root layouts must use
@color/backgroundto enforce our design tokens. - A
TextViewmust be perfectly centered on each screen using ConstraintLayout parameters to act as a visual QA anchor. - Add a Search Bar and a horizontally scrolling
ChipGrouptofragment_directory.xml. - Hardcode the exact 7 chips: All (Default), Chest, Back, Legs, Biceps, Triceps, Core.
- Update
HomeViewModelto store themasterListand run a combined filter (Search Text + Chip Category) every time an input changes. - UI Structure: Update
fragment_timer.xmlto include a massive, centralized time display wrapped in a circularSurfaceshape, with a largePrimaryaction button below it. - State Enum: Create a
TimerStateenum with values:IDLE,RUNNING,PAUSED. - ViewModel Logic: Create
TimerViewModel.javausing Android'sCountDownTimer. It must exposeLiveData<String>for the formatted time (e.g., "02:00") andLiveData<TimerState>for the UI buttons to observe.
- Ensure Jetpack Navigation dependencies are in
build.gradle(if not already present). - Create a
nav_graph.xmlresource file defining the three fragment destinations. - Critical: The
android:idof each fragment in the nav graph must be perfectly identical to theandroid:idused inres/menu/bottom_nav_menu.xml. - Update
activity_main.xmlto include a configuredFragmentContainerView. - Wire the controller in
MainActivity.javausingNavigationUI. - Add
ExerciseDetailsFragmenttonav_graph.xmlwith an action connecting it fromDirectoryFragment. - Update
ExerciseAdapterto accept a click listener interface. - Create
fragment_exercise_details.xmlutilizing aScrollViewso 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.
- Inside
app/src/main/java/com.kinedex.app/, create two new directories (packages):dataandui. - Inside
ui, create a sub-package calledhome. - Move the existing
MainActivity.javafrom the root package into the newcom.kinedex.app.ui.homepackage. - 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 theui.homepackage 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.
- 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.xmlto 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_SERVICEandPOST_NOTIFICATIONSpermissions toAndroidManifest.xml. DeclareTimerService. - Create a Service that handles the
CountDownTimerlogic. It must create a Notification Channel (Required for Android 8+) and callstartForeground(). - The Service must broadcast the remaining milliseconds (
ACTION_TIMER_TICK) every second so the UI can update. - Update
TimerViewModelto stop calculating time natively. Instead, it should sendIntentsto the Service (START, PAUSE, CLEAR) and observe the Broadcasts. - Test Vibrator Sensor Proper Functionality
- Construct Signed APK and Test
- Enforce Commit Conventions via Git Hook.
- Create
DirectoryFragment.javaandres/layout/fragment_directory.xml. - Cut the
<androidx.recyclerview.widget.RecyclerView>fromactivity_main.xmland paste it intofragment_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
HomeViewModelandExerciseAdapterinitialization logic out ofMainActivity.javaand into theonViewCreatedmethod ofDirectoryFragment.java. - A large, bold "Kinedex" title is pinned to the top of the
DirectoryFragment. - The
TextInputLayoutincludes theic_searchmagnifier 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_exercisecard 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.