Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*================================================================
- _ ____ _____ __ __
- (_) _ \ ___ | _ _ | _ __ __ | \ / |
- | | | _) / __ | | | / _ \ / _ `| | \ / | |
- | | __ / \ __ \ | | __ / (_ | | | | |
- |_|_| |___/ | _ | \ ___ | \ __,_|_| | _ |
- Criado por Bruno da Silva
- www.ips-team.blogspot.com
- Google Speak (Text to Speech Mobile)
- ===============================================================*/
- import java.io.*;
- import javax.microedition.midlet.*;
- import javax.microedition.io.*;
- import javax.microedition.lcdui.*;
- public class VisualMIDlet extends MIDlet implements CommandListener
- {
- private Display display;
- private TextField textBeat;
- private Form formData;
- private Command comandoAcessar;
- public VisualMIDlet()
- {
- display = Display.getDisplay(this);
- }
- public void startApp()
- {
- formData = new Form("Google Speak");
- textBeat = new TextField("Digite sua frase", "", 50, TextField.ANY);
- comandoAcessar = new Command("Falar", Command.OK, 0);
- formData.append(textBeat);
- formData.addCommand(comandoAcessar);
- formData.setCommandListener(this);
- display.setCurrent(formData);
- }
- public void commandAction(Command c, Displayable d)
- {
- if(d == formData)
- {
- if(c == comandoAcessar)
- {
- formData.append("Executando leitura de informacoes ..");
- formData.append("============================ \n");
- formData.append("Criado por Bruno da Silva");
- formData.append("Equipe [iPs]TeaM (c) \n\n");
- formData.append("Reconhecimento de Letras: Google Tradutor \n\n");
- formData.append("============================ \n");
- formData.append("www.ips-team.blogspot.com");
- formData.append("www.celularnokiac3.blogspot.com");
- try
- {
- Thread.sleep(2000);
- }
- catch (Exception e)
- {
- }
- AlertType.WARNING.playSound(Display.getDisplay(this));
- try
- {
- platformRequest("http://translate.google.com/translate_tts?q=" + textBeat.getString());
- }
- catch (Exception ex)
- {
- formData.append("Celular nao compativel");
- formData.append("www.ips-team.blogspot.com");
- formData.append("www.celularnokiac3.blogspot.com");
- }
- }
- }
- }
- public void pauseApp() {
- }
- public void destroyApp(boolean unconditional) {
- }
- }
Add Comment
Please, Sign In to add comment