Пример #1
0
        private void initChord()
        {
            /// <summary>
            ///**************************************************
            /// 1. GetInstance
            /// ***************************************************
            /// </summary>
            Schord chord = new Schord();

            try
            {
                chord.initialize(this);
            }
            catch (SsdkUnsupportedException e)
            {
                if (e.Type == SsdkUnsupportedException.VENDOR_NOT_SUPPORTED)
                {
                    // Vender is not SAMSUNG
                    return;
                }
            }

            Log.d(TAG, TAGClass + "initChord : VersionName( " + chord.VersionName + " ), VerionCode( " + chord.VersionCode + " )");

            mSchordManager_1 = new SchordManager(this);

            /// <summary>
            ///**************************************************
            /// 2. Set some values before start If you want to use secured channel,
            /// you should enable SecureMode. Please refer
            /// UseSecureChannelFragment.java mChordManager.enableSecureMode(true);
            /// Once you will use sendFile or sendMultiFiles, you have to call
            /// setTempDirectory mChordManager.setTempDirectory(Environment.
            /// getExternalStorageDirectory().getAbsolutePath() + "/Chord");
            /// ***************************************************
            /// </summary>
            mSchordManager_1.Looper = MainLooper;

            /// <summary>
            /// Optional. If you need listening network changed, you can set callback
            /// before starting chord.
            /// </summary>
            mSchordManager_1.NetworkListener = new NetworkListenerAnonymousInnerClassHelper(this);

            IList <int?> ifcList = mSchordManager_1.AvailableInterfaceTypes;

            foreach (int?ifc in ifcList)
            {
                refreshInterfaceStatus(ifc.Value, true);
            }
        }
		private void initChord()
		{

			/// <summary>
			///**************************************************
			/// 1. GetInstance
			/// ***************************************************
			/// </summary>
			Schord chord = new Schord();
			try
			{
				chord.initialize(this);
			}
			catch (SsdkUnsupportedException e)
			{
				if (e.Type == SsdkUnsupportedException.VENDOR_NOT_SUPPORTED)
				{
					// Vender is not SAMSUNG
					return;
				}
			}

			mSchordManager_1 = new SchordManager(this);
			mSchordManager_1.Looper = MainLooper;

			/// <summary>
			///***************************************************
			/// 2. You have to enable SecureMode to use Secured channel. It is false
			/// as default. If you do not set and try to joinChannel with Secured
			/// name, it will throw IllegalArgumentException.
			/// ***************************************************
			/// </summary>
			mSchordManager_1.SecureModeEnabled = true;

			/// <summary>
			/// Optional. If you need listening network changed, you can set callback
			/// before starting chord.
			/// </summary>
			mSchordManager_1.NetworkListener = new NetworkListenerAnonymousInnerClassHelper(this);

			IList<int?> ifcList = mSchordManager_1.AvailableInterfaceTypes;
			foreach (int? ifc in ifcList)
			{
				startChord(ifc.Value);
				refreshInterfaceStatus(ifc.Value, true);
			}

		}
		private void initChord()
		{

			/// <summary>
			///**************************************************
			/// 1. GetInstance
			/// ***************************************************
			/// </summary>
			Schord chord = new Schord();
			try
			{
				chord.initialize(this);
			}
			catch (SsdkUnsupportedException e)
			{
				if (e.Type == SsdkUnsupportedException.VENDOR_NOT_SUPPORTED)
				{
					// Vender is not SAMSUNG
					return;
				}
			}

			Log.d(TAG, TAGClass + "initChord : VersionName( " + chord.VersionName + " ), VerionCode( " + chord.VersionCode + " )");

			mSchordManager_1 = new SchordManager(this);

			/// <summary>
			///**************************************************
			/// 2. Set some values before start If you want to use secured channel,
			/// you should enable SecureMode. Please refer
			/// UseSecureChannelFragment.java mChordManager.enableSecureMode(true);
			/// Once you will use sendFile or sendMultiFiles, you have to call
			/// setTempDirectory mChordManager.setTempDirectory(Environment.
			/// getExternalStorageDirectory().getAbsolutePath() + "/Chord");
			/// ***************************************************
			/// </summary>
			mSchordManager_1.Looper = MainLooper;

			/// <summary>
			/// Optional. If you need listening network changed, you can set callback
			/// before starting chord.
			/// </summary>
			mSchordManager_1.NetworkListener = new NetworkListenerAnonymousInnerClassHelper(this);

			IList<int?> ifcList = mSchordManager_1.AvailableInterfaceTypes;
			foreach (int? ifc in ifcList)
			{
				refreshInterfaceStatus(ifc.Value, true);
			}

		}