本文整理汇总了Java中com.sinch.android.rtc.SinchClient类的典型用法代码示例。如果您正苦于以下问题:Java SinchClient类的具体用法?Java SinchClient怎么用?Java SinchClient使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SinchClient类属于com.sinch.android.rtc包,在下文中一共展示了SinchClient类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onClientFailed
import com.sinch.android.rtc.SinchClient; //导入依赖的package包/类
@Override
public void onClientFailed(SinchClient client, SinchError error) {
broadcastIntent.putExtra("success", false);
broadcaster.sendBroadcast(broadcastIntent);
sinchClient = null;
}
示例2: onClientStarted
import com.sinch.android.rtc.SinchClient; //导入依赖的package包/类
@Override
public void onClientStarted(SinchClient client) {
broadcastIntent.putExtra("success", true);
broadcaster.sendBroadcast(broadcastIntent);
client.startListeningOnActiveConnection();
messageClient = client.getMessageClient();
}
示例3: onCreate
import com.sinch.android.rtc.SinchClient; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_call);
final SinchClient sinchClient = Sinch.getSinchClientBuilder()
.context(this)
.userId("current-user-id")
.applicationKey("key")
.applicationSecret("secret")
.environmentHost("sandbox.sinch.com")
.build();
sinchClient.setSupportCalling(true);
sinchClient.start();
callState = (TextView) findViewById(R.id.callState);
callButton = (Button) findViewById(R.id.callButton);
callButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (call == null) {
call = sinchClient.getCallClient().callPhoneNumber("+46000000000");
call.addCallListener(new SinchCallListener());
callButton.setText("Hang Up");
} else {
call.hangup();
}
}
});
}
示例4: retrieveSinchClient
import com.sinch.android.rtc.SinchClient; //导入依赖的package包/类
public static SinchClient retrieveSinchClient()
{
return sinchClient;
}
示例5: onClientStopped
import com.sinch.android.rtc.SinchClient; //导入依赖的package包/类
@Override
public void onClientStopped(SinchClient client) {
sinchClient = null;
}
示例6: onRegistrationCredentialsRequired
import com.sinch.android.rtc.SinchClient; //导入依赖的package包/类
@Override
public void onRegistrationCredentialsRequired(SinchClient client, ClientRegistration clientRegistration) {
}
示例7: onClientFailed
import com.sinch.android.rtc.SinchClient; //导入依赖的package包/类
@Override
public void onClientFailed(SinchClient client, SinchError error) {
sinchClient = null;
}
示例8: onClientStarted
import com.sinch.android.rtc.SinchClient; //导入依赖的package包/类
@Override
public void onClientStarted(SinchClient client) {
client.startListeningOnActiveConnection();
messageClient = client.getMessageClient();
}
示例9: onRegistrationCredentialsRequired
import com.sinch.android.rtc.SinchClient; //导入依赖的package包/类
@Override
public void onRegistrationCredentialsRequired(SinchClient client, ClientRegistration clientRegistration) {}