Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added AudioActivity & CompassActivity for Cardinal Directions Feedback. #4

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

menacingly-coded
Copy link

##PR Description:
This PR introduces two new features to enhance user experience with directional feedback:

  1. CompassActivity.java
    -Uses the device's accelerometer and magnetometer to determine the user's direction (North, East, West, South).
    -Displays real-time direction updates on the screen.

  2. AudioActivity.java
    -Plays a specific audio cue whenever the user faces a particular direction.
    -Supports North, East, West, and South with corresponding audio feedback.

  3. Vibration Feedback
    -Added a haptic vibration effect when changing directions for better accessibility.
    -Additionally, modified AndroidManifest.xml to include the required permissions for accessing sensors.

✅ Changes in this PR:
#Added CompassActivity.java
#Added AudioActivity.java
#Modified AndroidManifest.xml for necessary permissions
Testing & Verification:
Successfully tested compass accuracy.
Verified correct audio feedback for each direction.
Ensured smooth sensor updates and UI interaction.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
…vibration feedback
@menacingly-coded
Copy link
Author

Enhanced the Math-Mantra application by introducing a sound-based answer input feature, allowing children to input answers using their voice or clapping via the device's microphone. This improves engagement and accessibility, making learning more interactive and fun. 🎤👏

🔹 Key Changes & Additions:
1️⃣ 📌 Integrated Microphone-Based Input:

Added functionality to capture user input through the device microphone.
Implemented clap detection and speech recognition to allow kids to submit answers without typing.
2️⃣ 📌 Modified MainActivity.java:

Initialized and configured the audio input listener.
Added a method to detect claps or spoken answers and validate them.
Ensured microphone permissions are handled correctly.
3️⃣ 📌 Updated AndroidManifest.xml:

Added the RECORD_AUDIO permission to enable microphone access.
4️⃣ 📌 Implemented Cleanup in onDestroy():

Ensured that the microphone stops listening when the activity is destroyed to optimize resource usage.
5️⃣ 📌 User Experience Enhancements:

Provided feedback to users when sound input is detected.
Improved app responsiveness for better interaction.
🔹 Why This Improvement?
✅ Enhances engagement – Kids can now speak or clap to answer instead of typing.
✅ Improves accessibility – Useful for younger children who struggle with keyboards.
✅ Adds a fun, interactive element – Gamifies the learning experience.

🔹 Testing & Validation:
Tested with real user interactions to ensure reliable speech and clap detection.
Verified that the app correctly interprets answers and submits responses.
Ensured smooth performance without microphone lag.
✅ How to Test?
Run the app on a device/emulator with a microphone.
Answer a question by speaking the correct answer or clapping (if clap detection is enabled).
Check if the app correctly identifies and submits the response.
Ensure no microphone issues occur when navigating between screens or closing the app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant