Esempio n. 1
0
        private void start(string userName)
        {
            if (mSinchClient == null)
            {
                mSinchClient = Sinch.SinchClientBuilder.context(ApplicationContext).userId(userName).applicationKey(APP_KEY).applicationSecret(APP_SECRET).environmentHost(ENVIRONMENT).build();

                mSinchClient.SupportMessaging = true;
                mSinchClient.startListeningOnActiveConnection();

                mSinchClient.addSinchClientListener(new MySinchClientListener(this));
                mSinchClient.start();
            }
        }
		private 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.SupportCalling = true;
				mSinchClient.startListeningOnActiveConnection();

				mSinchClient.addSinchClientListener(new MySinchClientListener(this));
				mSinchClient.CallClient.addCallClientListener(new SinchCallClientListener(this));
				mSinchClient.start();
			}
		}
Esempio n. 3
0
        private 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.SupportCalling = true;
                mSinchClient.startListeningOnActiveConnection();

                mSinchClient.addSinchClientListener(new MySinchClientListener(this));
                // Permission READ_PHONE_STATE is needed to respect native calls.
                mSinchClient.CallClient.RespectNativeCalls = false;
                mSinchClient.CallClient.addCallClientListener(new SinchCallClientListener(this));
                mSinchClient.start();
            }
        }
		private 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.SupportCalling = true;
				mSinchClient.startListeningOnActiveConnection();

				mSinchClient.addSinchClientListener(new MySinchClientListener(this));
				// Permission READ_PHONE_STATE is needed to respect native calls.
				mSinchClient.CallClient.RespectNativeCalls = false;
				mSinchClient.CallClient.addCallClientListener(new SinchCallClientListener(this));
				mSinchClient.start();
			}
		}