/// <summary> /// Method for IR feature /// </summary> private void IRSample() { bool value; // Checks the IR feature is supported in this device var result = Information.TryGetValue <bool>("http://tizen.org/feature/consumer_ir", out value); if (!result || !value) { // IR is not supported this.Navigation.PushAsync(new SimpleResult("Wearable doesn't support IR feature")); return; } try { // Gets the information whether the IR module is available result = IR.IsAvailable; if (!result) { // IR should be available this.Navigation.PushAsync(new SimpleResult("Failed: IR\nIR should be available")); } List <int> pattern = new List <int>(); pattern.Add(10); pattern.Add(50); // Transmits the IR command IR.Transmit(10, pattern); // Operations are succeed this.Navigation.PushAsync(new SimpleResult("Succeed: IR")); } catch (Exception e) { // Operations are failed this.Navigation.PushAsync(new SimpleResult("Failed: IR\n" + e.Message)); } }