当前位置: 首页>>代码示例>>Java>>正文


Java SinchClient类代码示例

本文整理汇总了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;
}
 
开发者ID:Paulocajr,项目名称:IPRJapp,代码行数:8,代码来源:MessageService.java

示例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();
}
 
开发者ID:Paulocajr,项目名称:IPRJapp,代码行数:9,代码来源:MessageService.java

示例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();
            }
        }
    });
}
 
开发者ID:sinch,项目名称:android-pstn-tutorial,代码行数:33,代码来源:CallActivity.java

示例4: retrieveSinchClient

import com.sinch.android.rtc.SinchClient; //导入依赖的package包/类
public static SinchClient retrieveSinchClient()
{
    return sinchClient;
}
 
开发者ID:parita-detroja,项目名称:cordova-plugin-sinch-calling,代码行数:5,代码来源:ConfigureSinch.java

示例5: onClientStopped

import com.sinch.android.rtc.SinchClient; //导入依赖的package包/类
@Override
public void onClientStopped(SinchClient client) {
    sinchClient = null;
}
 
开发者ID:Paulocajr,项目名称:IPRJapp,代码行数:5,代码来源:MessageService.java

示例6: onRegistrationCredentialsRequired

import com.sinch.android.rtc.SinchClient; //导入依赖的package包/类
@Override
public void onRegistrationCredentialsRequired(SinchClient client, ClientRegistration clientRegistration) {
}
 
开发者ID:Paulocajr,项目名称:IPRJapp,代码行数:4,代码来源:MessageService.java

示例7: onClientFailed

import com.sinch.android.rtc.SinchClient; //导入依赖的package包/类
@Override
public void onClientFailed(SinchClient client, SinchError error) {
    sinchClient = null;
}
 
开发者ID:dmeyer3691,项目名称:PetTinder,代码行数:5,代码来源:MessageService.java

示例8: onClientStarted

import com.sinch.android.rtc.SinchClient; //导入依赖的package包/类
@Override
public void onClientStarted(SinchClient client) {
    client.startListeningOnActiveConnection();
    messageClient = client.getMessageClient();
}
 
开发者ID:dmeyer3691,项目名称:PetTinder,代码行数:6,代码来源:MessageService.java

示例9: onRegistrationCredentialsRequired

import com.sinch.android.rtc.SinchClient; //导入依赖的package包/类
@Override
public void onRegistrationCredentialsRequired(SinchClient client, ClientRegistration clientRegistration) {}
 
开发者ID:dmeyer3691,项目名称:PetTinder,代码行数:3,代码来源:MessageService.java


注:本文中的com.sinch.android.rtc.SinchClient类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。