dotMorten.AllJoyn.AllJoynClientLib 1.1.0

An Universal Windows apps (UWP) Device Client Library for various common AllJoyn devices.
For the Universal Windows Platform (Windows 10).

Requires NuGet 3.0.0 or higher.

Install-Package dotMorten.AllJoyn.AllJoynClientLib -Version 1.1.0
dotnet add package dotMorten.AllJoyn.AllJoynClientLib --version 1.1.0
<PackageReference Include="dotMorten.AllJoyn.AllJoynClientLib" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add dotMorten.AllJoyn.AllJoynClientLib --version 1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

AllJoynClientLib

An Universal Windows apps (UWP) Device Client Library for various common AllJoyn devices

Supported AllJoyn devices:

Sample App

The Sample app shows a simple dashboard of all devices. It also provides you with ViewModels for quick reuse in your own applications. Lastly it also shows how to create a custom device client plugin.

Install the Sample App From the store: https://www.microsoft.com/store/apps/9nblggh4wtcv

Usage:

Install nuget package:

PM> Install-Package dotMorten.AllJoyn.AllJoynClientLib

Sample code:

    //Initialize the device manager
    var manager = new AllJoynClientLib.DeviceManager();
    manager.DeviceJoined += Manager_DeviceJoined; //Listen for devices discovered
    manager.Start();
    
    // ...

    private async void Manager_DeviceJoined(object sender, DeviceClient device)
    {
      if(device is LightClient)
      { //We found a light
        var client = (LightClient)device;
        await client.SetOnOffAsync(true);         //turn on light
        if(await GetIsColorSupportedAsync())      //check the capability of light
          await client.SetColorAsync(Colors.Red); //Set the color of the light
      }
      else if (device is AllPlayClient)
      { //We found a media player
        var client = (AllPlayClient)device;
        await client.MediaPlayer.NextAsync();                   //Play next track
        var list = await client.MediaPlayer.GetPlaylistAsync(); //Get the current playlist
        await client.Volume.SetVolumeAsync(50);                 //Set volume
        client.MediaPlayer.PlayStateChanged += OnPlayStateChanged;
      }
    }

    private void OnPlayStateChanged(object sender, AllPlay.PlayState e)
    {
        //Media play state changed (start/stop/buffering/transitioning etc)
        string currentSong = e.CurrentMedia.Title;
    }

See the test app for more examples

Sample App Screenshots

image
image
image

AllJoynClientLib

An Universal Windows apps (UWP) Device Client Library for various common AllJoyn devices

Supported AllJoyn devices:

Sample App

The Sample app shows a simple dashboard of all devices. It also provides you with ViewModels for quick reuse in your own applications. Lastly it also shows how to create a custom device client plugin.

Install the Sample App From the store: https://www.microsoft.com/store/apps/9nblggh4wtcv

Usage:

Install nuget package:

PM> Install-Package dotMorten.AllJoyn.AllJoynClientLib

Sample code:

    //Initialize the device manager
    var manager = new AllJoynClientLib.DeviceManager();
    manager.DeviceJoined += Manager_DeviceJoined; //Listen for devices discovered
    manager.Start();
    
    // ...

    private async void Manager_DeviceJoined(object sender, DeviceClient device)
    {
      if(device is LightClient)
      { //We found a light
        var client = (LightClient)device;
        await client.SetOnOffAsync(true);         //turn on light
        if(await GetIsColorSupportedAsync())      //check the capability of light
          await client.SetColorAsync(Colors.Red); //Set the color of the light
      }
      else if (device is AllPlayClient)
      { //We found a media player
        var client = (AllPlayClient)device;
        await client.MediaPlayer.NextAsync();                   //Play next track
        var list = await client.MediaPlayer.GetPlaylistAsync(); //Get the current playlist
        await client.Volume.SetVolumeAsync(50);                 //Set volume
        client.MediaPlayer.PlayStateChanged += OnPlayStateChanged;
      }
    }

    private void OnPlayStateChanged(object sender, AllPlay.PlayState e)
    {
        //Media play state changed (start/stop/buffering/transitioning etc)
        string currentSong = e.CurrentMedia.Title;
    }

See the test app for more examples

Sample App Screenshots

image
image
image

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.1.0 550 6/11/2016
1.0.2 276 6/2/2016
1.0.1 277 5/31/2016
1.0.0 273 5/31/2016