Open priya-zha opened 11 months ago
Solution: In the voiceselection page, we can create a new intent and transfer the selected voice to a new activity so that the same selected voice can be used there too.
Button selectButton = findViewById(R.id.selectButton);
selectButton.setOnClickListener(v -> {
// Prompt the user for confirmation or selection
Intent nextActivityIntent = new Intent(VoiceSelection.this, HelpScreen.class);
nextActivityIntent.putExtra("selectedVoiceName", selectedVoice);
// You can add more properties here if needed
startActivity(nextActivityIntent);
textToSpeech.speak("Voice has been selected", TextToSpeech.QUEUE_FLUSH, null);
});
}
Steps to reproduce:
Click on any male/female radiobutton and then click on the Select voice button.
Actual Result:
When the 'Select Voice' button is clicked, it does not navigate to another screen as expected. The user-selected voice is not passed to the new activity.
Expected Result:
The 'Select Voice' button should function in the same way as when the user selects a voice using voice recognition. It should navigate to another screen, passing the selected voice to that new activity.
Before fixing:
https://github.com/priya-zha/Software-Engineering-Project/assets/34065075/667214cd-7eca-49ba-a5fd-97a9bb63f7f5
After fixing:
https://github.com/priya-zha/Software-Engineering-Project/assets/34065075/7dc72f11-2a82-4318-9196-ef1d8eaf4507