标签: android-sinch-api

Sinch 通话录音 Android

谁能告诉我如何在 Sinch Android 中记录使用 callUser 或 callConference 方法拨打的电话?文件说联系我们进行录音,但我没有得到任何具体的解决方案,试图联系但没有回应。

除此之外,我尝试使用 MediaRecorder 录制通话,但出现错误MediaRecorder: start failed: -38 using all the available AudioSources。经过一些研究,我注意到 Sinch 也在使用一些使用 MIC 的内部 AudioRecording。因此,每当我尝试使用 MediaRecorder 进行录制时,都会失败,因为录制器源已在使用中。

这是我的录音代码:

private void initRecorder() {
    recorder = new MediaRecorder();
    recorder.setAudioSource(MediaRecorder.AudioSource.VOICE_CALL); // I tried using MIC and everything but got the same error
    recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
    recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
    recorder.setOutputFile(getFilename());
    recorder.setOnErrorListener(errorListener);
    recorder.setOnInfoListener(infoListener);

    try {
        recorder.prepare();
    } catch (Throwable e) {
        e.printStackTrace();
    }
}

private void recordCall() {
    try {
        recorder.start();
    } catch (Throwable e) {
        e.printStackTrace();
    }
}
Run Code Online (Sandbox Code Playgroud)

android sinch android-sinch-api

5
推荐指数
1
解决办法
1382
查看次数

Android Sinch全屏问题

如何在Android中将Sinch的远程视图设置为全屏。

我尝试了VideoController.setResizeBehaviour,但是它不起作用。

android sinch android-sinch-api

3
推荐指数
1
解决办法
393
查看次数

Sinch 无法在后台运行(Android)

美好的一天。我正在使用 sinch 进行音频通话。我不知道该怎么做,并且没有明确的 sinch 文档(这非常令人沮丧),这让我知道如何让 sinch 客户端在后台运行以进行监听应用程序被杀时后台来电。同时我认为我强迫sinch客户端不会被终止,但每次应用程序打开时,客户端无论如何都会启动。所以如果有人遇到这样的事情,你能帮我吗并告诉我如何使用 Sinch 在后台监听来电?发布我已经启动并运行的代码。

由我的所有活动继承的基础活动。

import android.content.ComponentName;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.IBinder;
import android.support.v7.app.AppCompatActivity;
import android.widget.Toast;

import ink.service.SinchService;

/**
 * Created by USER on 2016-07-24.
 */
public abstract class BaseActivity extends AppCompatActivity implements ServiceConnection {
    private SinchService.SinchServiceInterface mSinchServiceInterface;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getApplicationContext().bindService(new Intent(this, SinchService.class), this,
                BIND_AUTO_CREATE);
    }

    @Override
    public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
        if (SinchService.class.getName().equals(componentName.getClassName())) {
            mSinchServiceInterface = (SinchService.SinchServiceInterface) iBinder;
            onServiceConnected();
        }
    }

    @Override
    public void …
Run Code Online (Sandbox Code Playgroud)

audio android call sinch android-sinch-api

0
推荐指数
1
解决办法
2298
查看次数

标签 统计

android ×3

android-sinch-api ×3

sinch ×3

audio ×1

call ×1