priya-zha / Software-Engineering-Project

0 stars 2 forks source link

Clicking the "Voice selection" button without selecting an option crashes the app. #7

Open sijorejigeorge opened 11 months ago

sijorejigeorge commented 11 months ago

Steps to Reproduce:

On Voice selection activity page, click on the voice selection button without selecting male or female option.

Detailed description :

When the "Voice selection" button is clicked without a prior option selection, it results in the app crashing or restarting. This issue occurs consistently and affects the user experience.

Expected Behavior:

The app should handle the situation by providing a user-friendly error message or preventing the crash.

Actual Behavior:

The app crashes when the "Voice selection" button is clicked without a prior selection of male or female option.

Before Fixing the bug:

https://github.com/priya-zha/Software-Engineering-Project/assets/148432068/27358157-5f43-44ee-9261-4b1a162acb71

After Fixing the bug:

https://github.com/priya-zha/Software-Engineering-Project/assets/148432068/7d832129-6a06-4e27-8209-ce318293eaf5

sijorejigeorge commented 11 months ago

The issue was resolved by implementing a condition to check whether the radio buttons were selected or not. Additionally, a toast message was added to notify the user when attempting to click the 'Select Voice' button without selecting either 'Male' or 'Female' options.

https://github.com/priya-zha/Software-Engineering-Project/blob/70af99f417241357b7f5942bd39e1c2a91e41ec8/app/src/main/java/com/example/se/VoiceSelection.java#L92C11-L103C1