Example #1
0
        public override void OnFound(string Endpoint, ScanEndpointInfo scanEndpointInfo)
        {
            Device device = MainActivity.FindDevice(Endpoint);

            if (device == null)
            {
                device = new Device(scanEndpointInfo.Name, Endpoint, false);
                MainActivity.AvaliableDevicesList.Add(device);
                Log.Debug(MainActivity.TAG, "OnFound : " + Endpoint);
                context.UpdateAvaliableDevices();
            }
        }
Example #2
0
        public override void OnDisconnected(string EndPoint)
        {
            Log.Debug(MainActivity.TAG, "OnDisconnected with Endpoint : " + EndPoint);
            Toast.MakeText(context, EndPoint + " Disconnected ", ToastLength.Long).Show();
            Device device = MainActivity.FindDevice(EndPoint);

            if (device != null)
            {
                device.Status = false;
            }
            context.UpdateAvaliableDevices();
            NearbyConnection.AvalibleDeviceslistview.CollapseGroup(MainActivity.AvaliableDevicesList.IndexOf(device));
        }