Search code examples
androidandroid-widgetmorse-code

Convert text into symbols, then convert symbols into sound


I'd like to know how to let a user input text ex. "TEXT", then have my app convert that "TEXT" into something like "@&^@", then have my app recognize "@&^@" as 4 different letters, ex. "@" "&" "^" "@", then play that letter's sound. I have recordings of each letter's sound.

ANY help will be very much appreciated.


Solution

    1. First, create an app with an EditText.

    2. Then create a listener which detects when a user has changed the text.

    3. In that listener....

      • retrieve the text

      • Convert it into your symbols

      • For each symbol, play the appropriate sound. You'll need to implement something that queues them in order, so one starts playing once the last has finished.

    I suggest you tackle these one step at a time, asking one question on this site for each of the above points.