Click here to Skip to main content
15,792,510 members
Home / Discussions / Windows Development
   

Windows Development

 
AnswerRe: How to make your own uwp app to be opened with uri-scheme? Pin
Pete O'Hanlon20-Jun-16 0:33
subeditorPete O'Hanlon20-Jun-16 0:33 
QuestionHow to read an certain line from text file with UWP app? Pin
ken762-Jun-16 10:44
ken762-Jun-16 10:44 
AnswerRe: How to read an certain line from text file with UWP app? Pin
Eddy Vluggen20-Jun-16 3:29
professionalEddy Vluggen20-Jun-16 3:29 
QuestionAbout Windows 8 App - Data storage in files using Windows.Storage namespace Pin
Member 1209249517-May-16 8:41
Member 1209249517-May-16 8:41 
AnswerRe: About Windows 8 App - Data storage in files using Windows.Storage namespace Pin
Peter_in_278017-May-16 14:25
professionalPeter_in_278017-May-16 14:25 
QuestionBluetooth with UWP Pin
Member 106839029-Apr-16 12:42
Member 106839029-Apr-16 12:42 
AnswerRe: Bluetooth with UWP Pin
Richard MacCutchan9-Apr-16 22:00
mveRichard MacCutchan9-Apr-16 22:00 
GeneralRe: Bluetooth with UWP Pin
Member 1068390211-Apr-16 6:42
Member 1068390211-Apr-16 6: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 22:31
mveRichard MacCutchan11-Apr-16 22:31 
AnswerRe: Bluetooth with UWP Pin
Member 1068390212-Apr-16 4:34
Member 1068390212-Apr-16 4:34 
AnswerRe: Bluetooth with UWP Pin
Pete O'Hanlon12-Apr-16 5:14
subeditorPete O'Hanlon12-Apr-16 5:14 
QuestionIs Win10 IoT an RTOS? Pin
Matt T Heffron26-Feb-16 12:49
professionalMatt T Heffron26-Feb-16 12:49 
AnswerRe: Is Win10 IoT an RTOS? Pin
Brisingr Aerowing26-Feb-16 18:54
professionalBrisingr Aerowing26-Feb-16 18:54 
QuestionUnable to install softwares Pin
Otekpo Emmanuel30-Nov-15 20:36
Otekpo Emmanuel30-Nov-15 20:36 
AnswerRe: Unable to install softwares Pin
Richard MacCutchan30-Nov-15 22:01
mveRichard MacCutchan30-Nov-15 22:01 
GeneralRe: Unable to install softwares Pin
Otekpo Emmanuel30-Nov-15 22:35
Otekpo Emmanuel30-Nov-15 22:35 
GeneralRe: Unable to install softwares Pin
Richard MacCutchan30-Nov-15 22:49
mveRichard MacCutchan30-Nov-15 22:49 
GeneralRe: Unable to install softwares Pin
Otekpo Emmanuel1-Dec-15 1:00
Otekpo Emmanuel1-Dec-15 1:00 
GeneralRe: Unable to install softwares Pin
Richard Deeming1-Dec-15 1:47
mveRichard Deeming1-Dec-15 1:47 
GeneralRe: Unable to install softwares (solved) Pin
Otekpo Emmanuel1-Dec-15 3:40
Otekpo Emmanuel1-Dec-15 3:40 
AnswerRe: Unable to install softwares Pin
Member 1232827615-Feb-16 2:39
Member 1232827615-Feb-16 2:39 
GeneralRe: Unable to install softwares Pin
CBWoodsr20-Apr-16 6:36
professionalCBWoodsr20-Apr-16 6:36 
QuestionUWA SQLite Change PATH Pin
Paolo Mazzon24-Oct-15 21:53
Paolo Mazzon24-Oct-15 21:53 
GeneralDisable Hardware in W10 Pin
GenJerDan4-Sep-15 11:21
GenJerDan4-Sep-15 11:21 
GeneralRe: Disable Hardware in W10 Pin
User 110609794-Sep-15 12:21
User 110609794-Sep-15 12: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.