Android application made during an introduction class to mobile application development.

Overview

Reflex Revolution

Android application made during an introduction class to mobile application development.

Contributors

Hailey Savoie
Carter Moore
Frederic Verret

Development Process Workflow

1. Make a new feature branch from main

git fetch
git checkout -b 
   
     origin/main
git push -u origin HEAD

   
  • Replace with the name of your branch. Your branch name should be short but descriptive (e.g., refactor-authentication, user-content-cache-key, make-retina-avatars) so that others can see what is being worked on.
  • push -u is an easy way to push the branch to the remote repository and get the "upstream tracking" set up correctly.
  • Remember to move the Trello card to "Doing".

2. Implement feature

  • Remember to commit & push often as you make changes and work on the feature.
  • If others are also working on the same branch as you, you might need to pull their changes using git pull (or git pull --rebase).
  • If other PRs are merged into main before yours, you will need to pull the new changes from main using git pull origin main.

3. Create pull request

Go to our repository page, select your branch, then select "Compare & pull request".

  1. Make sure the base branch is main (this means your work will be merged into main).
  2. Add a title (what feature did you work on?), and a description if you have details to add.
  3. If your code is ready for review, click "Create Pull Request". If you are not done working on it, use the dropdown and select "Create Draft Pull Request" (once you are done, you can mark it as ready for review).
  • Remember to move the Trello card to "Code Review"

4. Review process

  1. Each PR need at least 2 review (another dev does an overview of your code to make sure there are no major issues/things missing).
  2. The reviewer(s) may pull the branch locally and try running the app to verify the functionality.
    1. If found issues, they will tell the developer via GitHub review comments.
    2. If tester has not found issues, they will approve the request
  3. The request can be merged (by anyone) once it has 2 reviews. Once merged, move the Trello card to "Done"
  4. Good job!
Comments
  • Implement turn & freeze instructions

    Implement turn & freeze instructions

    Work Completed

    • Implemented RotationDetector.
      • Note: it also includes tilt instructions, but I didn't add them into the game yet since they only make sense if the device is in "portrait" orientation. If we want them, I made a separate ticket to add logic to know, depending on the current device orientation, which way is "left" and "forward".
    • Created RotateTestActivity to test the RotationDetector.
    • Implemented turn left/right and don't turn instructions using the RotationDetector.
    • Implemented freeze instruction:
      • Modified RotationDetector & ShakeDetector to also have a "move" output. This is a special instruction that triggers a game over when the current instruction is freeze.
    • Added game mode ideas in GameMode.java
    opened by fredy20501 4
  • Integrate swipe instruction

    Integrate swipe instruction

    Few things:

    I put my SwipeListener class within the SwipeActivity class. Not sure if it would be better to have them separate?

    I didn't bother with a button to reset it so it'll just count how many correct swipes you get until until you restart it, but I could easily put that in if we wanted.

    Since there are only 4 directions, you may get the same one in a row multiple times, but all 4 should work if you test it long enough.

    Again I'm not the best developer (I tried my best) so please suggest improvements!!! I'm sure there are ways to make this code more efficient and what not (ie enum)

    opened by hsavoie 3
  • Implemented Typing and Dialing Instructions

    Implemented Typing and Dialing Instructions

    • Added TypeInstruction, which makes the user type a random 5-letter word, read from a text file
    • Added DialInstruction, which makes the user type a random 7-digit phone number (no need to type the hyphen)
    • Extra time is added for both instructions, as they take longer than usual, but we may want to adjust this value
    • There is currently an issue, as described in Teams, where the keyboard stays up if it is open when you force stop the program from Android Studio
    opened by carterjmoore 2
  • Implemented game loop

    Implemented game loop

    Set up the game loop. With every loop, we get a random instruction from a list of instructions and then add the corresponding UI elements. If the proper input is received, we clear the UI elements, increase score, wait one second, and then loop again. Also made it so the time available to perform the actions scales with score, but we might want to adjust this scale in the future.

    opened by carterjmoore 1
  • Create Settings Page & How to Play Page, Implement Difficulty Levels

    Create Settings Page & How to Play Page, Implement Difficulty Levels

    Settings Page

    • Created the settings page, where you can change volume settings & clear your high scores.
    • When you change the volume it plays a sound so you know how loud it is with the new volume.
    • The settings are saved into shared preferences using the LocalData class.

    How to Play Page

    • Created the How to Play page.
    • The practice buttons start the practice mode that Carter had created.
    • The rotation instructions are now separate practice modes, since that made more sense after designing the UI for it.
    • Fixed the swipe instruction's practice mode not correctly looping through the opposite vs normal type of swipe (i.e., previously the opposite swipes were still random in practice mode).

    Difficulty Levels

    • Changed the time/music scaling to work linearly.
      • After testing with different curves it just felt weird for it to speed up faster and faster or slower and slower as the game progressed. Linear progression felt much nicer.
    • Added the function getMinDuration() for each instruction that returns the absolute minimum amount of time that users will get for this instruction.
      • I picked the duration for each instruction such that I had just enough time to complete them consistently but couldn't afford to make any mistakes.
    • Added parameters to the difficulty levels that determine how the time scaling works based on the difficulty.
      • extraDuration indicates the amount of extra time that you start with (this is what gets reduced as your score increases). This is added to each instruction's minimum duration.
      • maxLevel indicates at what level do we reach the maximum speed (i.e., at that level the extraDuration is now 0, so you only have the minimum amount of time for each instruction). This relates to how fast the game speeds up.
    • The music scales linearly with the maxLevel. It always starts at 1x and goes up to a maximum of 1.5x when the maxLevel is reached.

    Other Stuff

    • Fixed some issues in the game activity (sometimes the instructions got triggered twice and/or crashed)
      • If you closed the activity using the back button just before the gameLoop gets triggered for the next instruction, the instruction is disabled in onPause(), but gets re-enabled by the gameLoop before it has time to call onDestroy(). This kept some sensors enabled, which caused instructions to trigger twice when starting a new game and crash the app.
    • The game mode & difficulty selection is now saved into local storage.
    • Changed the sound effects (score, lose, voice lines) to use SoundPool instead of MediaPlayer.

    Demo

    Demo showing the new settings & how to play pages: https://user-images.githubusercontent.com/43451024/161648566-384347ae-7caa-4b35-b945-fefbf64c812c.mp4

    opened by fredy20501 0
  • High Score being Stored

    High Score being Stored

    Work Completed

    • Created the LocalData class which provides static access to the shared preferences.
    • Added methods to get/set the high score.
    • Modified GameActivity & GameOverActivity to get/set the high score where needed.
    opened by hsavoie 0
  • Implemented Tutorial Modes

    Implemented Tutorial Modes

    Work Completed

    • Added a tutorial gamemode for each Instruction type.
    • Tutorial mode is similar to normal play, except actions within the Instruction type are given in a set order, and upon failure, you redo the action instead of getting a gameover.
    • The timer bar is still shown, but time to complete the actions remains constant, no matter how many times an action is completed.
    • Score and high-score are hidden, but user will briefly get success feedback after completing or failing an action (correct or incorrect).

    Note: Since we wanted instructions to repeat on failure, I had to implement things slightly differently than the demo mode. Instead of making a second constructor, I made a second init function, which takes in a boolean success as a parameter, and adjusts the next instruction to be displayed accordingly. This init function was also added to the parent Instruction class, and is only called in GameActivity if the gamemode is a tutorial mode.

    Edit (Fred's changes)

    • Renamed Tutorial to Practice.
    • Changed feedback text to only appear when instruction is failed. The label was changed from "Incorrect" to "Fail".
    • Increased time that feedback stays on screen to 1.5 seconds.
    • Added exit button in top-left corner.
    • Fixed issues with instructions's new init function (voice commands not being set).
    opened by carterjmoore 0
  • Implement better UI 💻  + other stuff 🦦

    Implement better UI 💻 + other stuff 🦦

    Work Completed

    Created nice UIs for the main activities: main_menu, game_settings, game, game_over. The UI is mostly the same as the Figma prototypes I had made.

    Game Settings Activity

    • New activity where you select the game mode and difficulty.
    • Show text description based on user's selection.

    Game Activity

    • Pause functionality during the game (show/hide overlay).
    • Replaced CountDownTimer with ObjectAnimator to have a smooth progress bar.

    Game Over Activity

    • Show score, high score, difficulty, and game mode.

    Instructions

    • Changed Type & Dial instructions to be aligned to the top of the screen to make space for the keyboard. Also added extra styling to the EditText field to make it nicer.
    • Implemented the difficulty levels in InstructionManager. I also tweaked the probabilities a little bit.

    Other

    • Added logic to prevent starting an activity multiple times if you clicked the button quickly enough. This was added wherever we started an intent based on a button click.

    Demo

    https://user-images.githubusercontent.com/43451024/159143417-8ca2a6d3-49c1-4f0b-9d00-5a91708cb222.mp4

    opened by fredy20501 0
  • Simplified playing voice commands & improved looping

    Simplified playing voice commands & improved looping

    Work Completed

    • Simplified the playing of voice commands.
      • Instead of having a separate VoiceCommandManager, the logic is defined in the abstract Instruction class.
      • We also didn't need a method to set the voice commands since the variable is protected.
    • Added logic to automatically get all audio files with a given prefix so we don't need to specify them manually or update anything when we add new sounds.
    • The background music looping had a pause when it restarted, so I fixed it by using 2 media players. This functionality is abstracted in the LoopMediaPlayer class.
    • Changed the lose sound effect since it didn't match with the game music. I changed it to something more similar (a chiptune kind of sound).
    • Fixed various minor warnings.
    opened by fredy20501 0
  • Implemented sound effects, background music, and voice commands

    Implemented sound effects, background music, and voice commands

    • Added sound effects for completing an instruction, and for losing.

    • Added background music for the main menu, and a different one for the game activity.

    • Game background music playback speed scales with the time allowed to complete the current instruction, but it might be good to tweak the scaling later.

    • Added voice commands for main instruction type.

    • Voice commands are fully abstracted into the Instruction class, and a new VoiceCommandManager class.

    • When new Instruction types are added, the abstract setVoiceCommands() method will need to be overridden. In this method, the protected voiceCommands array must be filled with references to the proper sound files in the R.raw directory.

    opened by carterjmoore 0
  • Flick and Opposite Swipes Implemented

    Flick and Opposite Swipes Implemented

    1. Added Flick (users fling in all directions)

    2. Added Swipe in opposite direction: This is just implemented by having the displayed text being randomized between two options.


    So SwipeInstruction.java has:

     private String[] rightOptions = {"RIGHT", "OPPOSITE OF LEFT"};
     private String[] leftOptions = {"LEFT", "OPPOSITE OF RIGHT"};
     private String[] upOptions = {"UP", "OPPOSITE OF DOWN"};
     private String[] downOptions = {"DOWN", "OPPOSITE OF UP"};
    

    Then for each case, a random number will determine which one of the two text options in the array will be displayed:

    public void display() {
            rand2 = new Random();
            index = rand2.nextInt(rightOptions.length - 0) + 0;
    
            switch(currentAction){
                     case SWIPE_RIGHT:
                        displayTxt = rightOptions[index]; //either "RIGHT" or "OPPOSITE OF LEFT"
                        addTextView(displayTxt, SMALL_TEXT_SIZE);
                        break;
                case SWIPE_LEFT:
                            // and so on ......
    
    

    Open to suggestions if either of you can think of a better way to do this :)

    opened by hsavoie 0
Owner
Frederic Verret
Frederic Verret
Simple Android app during a coding night. Just Learning Firebase and Android

KUI-App Simple Android app during a coding night. Just Learning Firebase and Android What we learned: Some basics of Android Basic setup of Firebase:

Kibabii University Informatics Club (KUI) 7 Aug 28, 2022
Library for converting from one Java class to a dissimilar Java class with similar names based on the Bean convention

Beanmapper Beanmapper is a Java library for mapping dissimilar Java classes with similar names. The use cases for Beanmapper are the following: mappin

null 26 Nov 15, 2022
Three Java projects assigned for the Introduction to Object-Oriented Programming (CMPE 160) course in the Spring 2021 semester.

CMPE160-projects Three Java projects assigned for the Introduction to Object-Oriented Programming (CMPE 160) course in the Spring 2021 semester. These

Aras Güngöre 21 Dec 6, 2022
A part of the course Mobile Application Development

Movie-Recommendation-Android-App A part of the course Mobile Application Development Pre-processed TMDB dataset / TMDB API responses and built a conte

Sudhay 8 Dec 24, 2022
Application developed during the DDD training with 6 students.

Easyorder Application developed during the DDD training with 6 students. MongoDB To start MongoDB, use docker: docker run -p 27017:27017 --name mongo

RUARO Thibault 1 Jan 21, 2022
Android Auto Apps Downloader (AAAD) is an app for Android Phones that downloads popular Android Auto 3rd party apps and installs them in the correct way to have them in Android Auto.

Android Auto Apps Downloader (AAAD) is an app for Android Phones that downloads popular Android Auto 3rd party apps and installs them in the correct way to have them in Android Auto.

Gabriele Rizzo 865 Jan 2, 2023
📊It includes all the work done during the Java-React Bootcamp.

?? Java + React Bootcamp ?? Part 1 - Java Part 2 - React ?? Lecture Class: Youtube ?? Instructor: Engin Demirog ?? Course Materials: Kodlama.io Bootca

İlknur Sucaklı 20 Jun 21, 2022
During a machine coding round of the company, I designed the Conference Room System in a given one hour.

DesignConferenceRoom DESIGN A CONFERENCE ROOM One of the core problems which people face at every company is the unavailability of conference rooms. S

Shubham Thakur 2 Dec 23, 2022
The respository of a student group called 'Bombenstimmung' at the University of Wuppertal during the SWT-Praktikum 2021/22

Bomberfrau The respository of a student group called 'Bombenstimmung' at the University of Wuppertal during the SWT-Praktikum 2021/22 Installation: Vo

BEJOSCHR 7 Jan 10, 2022
This repository contains all the code developed during lessions of Foundations of Informatics T2.

If you're using the content of this Repostory, please consider to Watch or Star it in order to help tracking how many people are drawing on it. Founda

null 7 Nov 24, 2022
A Maven extension for validating and collecting checksums of all artifacts during execution.

Maven checksum extension This extension allows for the creation and the enforcement of checksums for any artifact that is resolved by Maven. Without s

Rafael Winterhalter 12 Aug 6, 2022
Experimental Discord Mobile Rich Presence (Android)

MRPC Experimental Discord Mobile Rich Presence (Android) How does it work? It's pretty simple. Connect to the Discord Gateway as a normal Discord Clie

Duy Tran Khanh 41 Dec 25, 2022
Aplikasi Android "MovieApp" untuk memenuhi salah satu syarat Ujian Akhir Semester mata kuliah Pengembangan Aplikasi Mobile UIN Sunan Gunung Djati Bandung.

MovieApp Kelompok No Way Home, berikut list anggota-nya: Fakhri Faishal Rochdiana (1197050040) Muhamad Taopik (1197050081) Naufal Rizqullah (119705009

Muhamad Taopik 9 Dec 22, 2022
Light Chinese Bible is a Mobile app created by Android and SQLite.

About Light Chinese Bible Light Chinese Bible is a Mobile app created by Android and SQLite. It allows you to read the bible on your phone or devices

Pankun (Dennis) Lin 1 Feb 10, 2022
This project was developed with the intention of improving my knowledge of Java in application development in Android Studio.

This project was developed with the intention of improving my knowledge of Java in application development in Android Studio.

Henrique Marinho Teixeira 2 Jan 26, 2022
This is a Food Delivery Mobile Application. Build Using React Native

Ax Food Delivery Service This is a Food Delivery Mobile Application build using ?????????? ???????????? ?? Installation Clone this repository git clon

Mindula Dilthushan Manamperi 13 Jul 14, 2022
Clone of Snapchat app made using android studio and java. 👀

Snapchat-Clone Clone of Snapchat app made using android studio and java. Screenshots of the app : License MIT License Copyright (c) 2021 Nisa Efendi

Nisa Efendioğlu 9 Nov 8, 2022
Java agent that enables class reloading in a running JVM

Welcome to Spring-Loaded What is Spring Loaded? Spring Loaded is a JVM agent for reloading class file changes whilst a JVM is running. It transforms c

Spring 2.7k Dec 26, 2022
The MeterRegistryHolder class is designed to hold MeterRegistry as a static field.

MeterRegistryHolder The MeterRegistryHolder class is designed to hold MeterRegistry as a static field. Goal The goal is to simplify using MeterRegistr

Tomasz Fijałkowski 4 Sep 20, 2022