protected internal override void onCreate(Bundle savedInstanceState) { base.onCreate(savedInstanceState); mType = Intent.getIntExtra("deviceType", SmcDevice.TYPE_IMAGEVIEWER); ContentView = R.layout.device_select; TextView noDevicesTextView = (TextView)findViewById(R.id.no_devices); noDevicesTextView.Visibility = View.GONE; if (FrameworkInstalled) { noDevicesTextView.Text = [email protected]_picker_no_devices; } else { noDevicesTextView.Text = [email protected]_picker_framework_not_installed; findViewById(R.id.refresh_button).Visibility = View.GONE; } ListView.EmptyView = noDevicesTextView; ListAdapter = new DevicesAdapter(this); findViewById(R.id.cancel_button).OnClickListener = this; findViewById(R.id.refresh_button).OnClickListener = this; SmcDeviceFinder df = new SmcDeviceFinder(this); df.StatusListener = this; df.start(); }
public override void onActivityCreated(Bundle savedInstanceState) { base.onActivityCreated(savedInstanceState); // The service provider needs to be created after device type is set // It could also be created in onStart or onResume, but we the sooner // we create it, the sooner we get devices. SmcDeviceFinder df = new SmcDeviceFinder(Activity); df.StatusListener = this; df.start(); }
internal RemotePlayer(PlayerController controller, Uri contentUri, string mimetype, string deviceId, int deviceType) { this.mController = controller; this.mContentUri = contentUri; this.mMimeType = mimetype; this.mDeviceId = deviceId; this.mDeviceType = deviceType; // Connect to AllShare Service. Processing continues when // service instance is received in onCreated callback method. SmcDeviceFinder df = new SmcDeviceFinder(controller.mContext); df.StatusListener = this; df.start(); }