Socket
Socket
Sign inDemoInstall

@kano/devices-sdk-uwp

Package Overview
Dependencies
Maintainers
21
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kano/devices-sdk-uwp

> TODO: description


Version published
Weekly downloads
6
decreased by-80%
Maintainers
21
Weekly downloads
 
Created
Source

@kano/devices-sdk-uwp

UWP implementation of the Kano devices SDK. Uses the JS UWP bindings to access the Windows Bluetooth API. Use in your JS UWP projects.

Usage

Create a new project in Visual Studio, choose Javascript > Progressive Web App.

Open the package.appxmanifest file and set the main URL to the URl of your web server. Make sure you enable Bluetooth in the Capabilities.

In a JS module in your project, insert the following (You must have server side module resolution or bundling):

import Devices from '@kano/devices-sdk-uwp/index.js';

Devices.searchForClosestDevice('wand', 5000)
    .then((dev) => {
        return dev.getSoftwareVersion()
            .then((v) => {
                console.log(v);
                return dev.setLed(1, 0x00ff00);
            })
            .then(dev.getAdvertisementName())
            .then((name) => {
                console.log(name)
                dev.on('position', (p) => {
                    console.log(p)
                });
                return dev.subscribePosition();
            });
    })
    .catch(e => console.error(e.message));

Demo

To run the demo, start the web server with node ./demo/wand/server.js. Then open the solution KanoDevicesSdk.sln in visual studio and start the project on your local machine.

FAQs

Package last updated on 04 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc