public void StartSinchClient(string username) { if (mSinchClient == null) { mUserId = username; mSinchClient = Sinch.SinchClientBuilder.Context(Forms.Context).UserId(username) .ApplicationKey(APP_KEY) .ApplicationSecret(APP_SECRET) .EnvironmentHost(ENVIRONMENT).Build(); mSinchClient.SetSupportCalling(true); mSinchClient.SetSupportMessaging(true); mSinchClient.SetSupportPushNotifications(true); //mSinchClient.SetSupportManagedPush(true); mSinchClient.SetSupportActiveConnectionInBackground(true); mSinchClient.StartListeningOnActiveConnection(); mSinchClient.AddSinchClientListener(new SinchClientListener(this)); // Permission READ_PHONE_STATE is needed to respect native calls. mSinchClient.CallClient.SetRespectNativeCalls(false); mSinchClient.CallClient.AddCallClientListener(new SinchCallClientListener(this)); mSinchClient.MessageClient.AddMessageClientListener(new SinchMessageClientListener(this)); mSinchClient.Start(); Log.Debug(TAG, "Started1!!!!!!!!!!!!!!!!!!!!!11"); } }
public void StopSinchClient() { if (mSinchClient != null) { mSinchClient.Terminate(); mSinchClient = null; } }
public void OnClientStarted(ISinchClient sinchClient) { Log.Debug(TAG, "SinchClient started"); if (sinchService.mListener != null) { sinchService.mListener.OnStarted(); } }
public void OnClientStarted(ISinchClient client) { Log.Debug(TAG, "SinchClient started"); if (outer.mListener != null) { outer.mListener.OnStarted(); } }
public void OnClientFailed(ISinchClient sinchClient, ISinchError sinchError) { if (sinchService.mListener != null) { sinchService.mListener.OnStartFailed(sinchError); } sinchService.mSinchClient.Terminate(); sinchService.mSinchClient = null; }
public void OnClientFailed(ISinchClient client, ISinchError error) { if (outer.mListener != null) { outer.mListener.OnStartFailed(error); } outer.mSinchClient.Terminate(); outer.mSinchClient = null; }
void Start(String userName) { if (mSinchClient == null) { mUserId = userName; mSinchClient = Sinch.SinchClientBuilder.Context(ApplicationContext).UserId(userName) .ApplicationKey(APP_KEY) .ApplicationSecret(APP_SECRET) .EnvironmentHost(ENVIRONMENT).Build(); mSinchClient.SetSupportCalling(true); mSinchClient.StartListeningOnActiveConnection(); mSinchClient.AddSinchClientListener(new MySinchClientListener(this)); // Permission READ_PHONE_STATE is needed to respect native calls. mSinchClient.CallClient.SetRespectNativeCalls(false); mSinchClient.CallClient.AddCallClientListener(new SinchCallClientListener(this)); mSinchClient.Start(); } }
public void OnRegistrationCredentialsRequired(ISinchClient sinchClient, IClientRegistration clientReg) { //throw new NotImplementedException(); }
public void OnClientStopped(ISinchClient sinchClient) { Log.Debug(TAG, "SinchClient stopped"); }
public void OnRegistrationCredentialsRequired(ISinchClient client, IClientRegistration clientRegistration) { }