Click here to Skip to main content
15,886,258 members
Home / Discussions / Windows Development
   

Windows Development

 
AnswerRe: How to make your own uwp app to be opened with uri-scheme? Pin
Pete O'Hanlon19-Jun-16 23:33
mvePete O'Hanlon19-Jun-16 23:33 
QuestionHow to read an certain line from text file with UWP app? Pin
ken762-Jun-16 9:44
ken762-Jun-16 9:44 
AnswerRe: How to read an certain line from text file with UWP app? Pin
Eddy Vluggen20-Jun-16 2:29
professionalEddy Vluggen20-Jun-16 2:29 
QuestionAbout Windows 8 App - Data storage in files using Windows.Storage namespace Pin
Member 1209249517-May-16 7:41
Member 1209249517-May-16 7:41 
AnswerRe: About Windows 8 App - Data storage in files using Windows.Storage namespace Pin
Peter_in_278017-May-16 13:25
professionalPeter_in_278017-May-16 13:25 
QuestionBluetooth with UWP Pin
Member 106839029-Apr-16 11:42
Member 106839029-Apr-16 11:42 
AnswerRe: Bluetooth with UWP Pin
Richard MacCutchan9-Apr-16 21:00
mveRichard MacCutchan9-Apr-16 21:00 
GeneralRe: Bluetooth with UWP Pin
Member 1068390211-Apr-16 5:42
Member 1068390211-Apr-16 5:42 
here is the code I'm working with, Trying to find paired devices
C#
using System;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.Devices.Bluetooth.Rfcomm;
using Windows.Devices.Enumeration;

// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238

namespace GI_MobileApp.Pages
{
    /// <summary>
    /// An empty page that can be used on its own or navigated to within a Frame.
    /// </summary>
    public sealed partial class BTDevicesPage : Page
    {
        private DeviceInformationCollection ServiceDeviceCollection = null;
        public static readonly Guid RfcommChatServiceUuid = Guid.Parse("00001101-0000-1000-8000-00805f9b34fb");

        public BTDevicesPage()
        {
            this.InitializeComponent();
            InitialPara();

        }
 
       
        private void tbtnConnect_Changed(object sender, RoutedEventArgs e)
        {
            on_off();
        }

        /// <summary>
        /// Method for connect and disconnect
        /// </summary>
        private void on_off()
        {
            switch (this.tbtnConnect.IsChecked)
            {
                case null:
                    this.tbtnConnect.Content = "Connect";
                    break;
                case true:
                    this.tbtnConnect.Content = "Disconnect";
                    break;
                case false:
                    this.tbtnConnect.Content = "Connect";
                    scan();
                    break;

            }
        }

      
        private async void scan()
        {
            //Find all paired devices and display them in a list
            ServiceDeviceCollection = await DeviceInformation.FindAllAsync(RfcommDeviceService.GetDeviceSelector(RfcommServiceId.SerialPort));

            if (ServiceDeviceCollection.Count > 0)
            {
                tbRxData.Text = "";
                foreach (var btDeviceice in ServiceDeviceCollection)
                {
                    tbRxData.Text = (btDeviceice.Name);
                }
                tbRxData.Visibility = Visibility;
            }
            else
            {
               
            }
        }

        
        /// <summary>
        /// Method Initialising parameters
        /// </summary>
        private void InitialPara()
        {
            this.tbtnConnect.IsChecked = null;
            this.on_off();
        }
    }
}

QuestionRe: Bluetooth with UWP Pin
Richard MacCutchan11-Apr-16 21:31
mveRichard MacCutchan11-Apr-16 21:31 
AnswerRe: Bluetooth with UWP Pin
Member 1068390212-Apr-16 3:34
Member 1068390212-Apr-16 3:34 
AnswerRe: Bluetooth with UWP Pin
Pete O'Hanlon12-Apr-16 4:14
mvePete O'Hanlon12-Apr-16 4:14 
QuestionIs Win10 IoT an RTOS? Pin
Matt T Heffron26-Feb-16 11:49
professionalMatt T Heffron26-Feb-16 11:49 
AnswerRe: Is Win10 IoT an RTOS? Pin
Brisingr Aerowing26-Feb-16 17:54
professionalBrisingr Aerowing26-Feb-16 17:54 
QuestionUnable to install softwares Pin
Otekpo Emmanuel30-Nov-15 19:36
Otekpo Emmanuel30-Nov-15 19:36 
AnswerRe: Unable to install softwares Pin
Richard MacCutchan30-Nov-15 21:01
mveRichard MacCutchan30-Nov-15 21:01 
GeneralRe: Unable to install softwares Pin
Otekpo Emmanuel30-Nov-15 21:35
Otekpo Emmanuel30-Nov-15 21:35 
GeneralRe: Unable to install softwares Pin
Richard MacCutchan30-Nov-15 21:49
mveRichard MacCutchan30-Nov-15 21:49 
GeneralRe: Unable to install softwares Pin
Otekpo Emmanuel1-Dec-15 0:00
Otekpo Emmanuel1-Dec-15 0:00 
GeneralRe: Unable to install softwares Pin
Richard Deeming1-Dec-15 0:47
mveRichard Deeming1-Dec-15 0:47 
GeneralRe: Unable to install softwares (solved) Pin
Otekpo Emmanuel1-Dec-15 2:40
Otekpo Emmanuel1-Dec-15 2:40 
AnswerRe: Unable to install softwares Pin
Member 1232827615-Feb-16 1:39
Member 1232827615-Feb-16 1:39 
GeneralRe: Unable to install softwares Pin
CBWoodsr20-Apr-16 5:36
professionalCBWoodsr20-Apr-16 5:36 
QuestionUWA SQLite Change PATH Pin
Paolo Mazzon24-Oct-15 20:53
Paolo Mazzon24-Oct-15 20:53 
GeneralDisable Hardware in W10 Pin
GenJerDan4-Sep-15 10:21
GenJerDan4-Sep-15 10:21 
GeneralRe: Disable Hardware in W10 Pin
User 110609794-Sep-15 11:21
User 110609794-Sep-15 11:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.