小编Aji*_*jit的帖子

android中的Skype调用检测

就像使用phoneStateListener进行电话呼叫检测一样,我想在android中检测来自Skype的呼叫.是否有Skype的听众,如电话呼叫.请提出一些建议.

android skype

6
推荐指数
2
解决办法
2293
查看次数

TTS:成功从onInit()返回,但仍然有第一次说话的延迟

使用的代码:

public class TexttoSpeechActivity extends Activity implements OnInitListener {
    private TextToSpeech tts;
    private Button btnSpeak;
    private EditText txtText;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        tts = new TextToSpeech(this, this);
        btnSpeak = (Button) findViewById(R.id.btnSpeak);
        txtText = (EditText) findViewById(R.id.txtText);

        btnSpeak.setOnClickListener(new View.OnClickListener() {

            public void onClick(View arg0) {
                speakOut();
            }

        });
    }

    @Override
    public void onDestroy() {
        // Don't forget to shutdown!
        if (tts != null) {
            tts.stop();
            tts.shutdown();
        }
        super.onDestroy();
    }

    public void onInit(int status) {
        if (status == TextToSpeech.SUCCESS) …
Run Code Online (Sandbox Code Playgroud)

android text-to-speech

5
推荐指数
0
解决办法
798
查看次数

标签 统计

android ×2

skype ×1

text-to-speech ×1