Uploading Branding Materials for NeuroAccess

Uploading Branding Materials for NeuroAccess

1. Introduction

Branding in NeuroAccess lets you customize the look of your NeuroAccess app for end users. By publishing colors and images to the broker’s PubSub service, any client connected can pick up your brand automatically.

2. Prerequisites

  • Access to the PubSub service on your broker
  • Hosted ResourceDictionary XAML and image files (see steps below)

3. Architecture Overview

3.1 Hosting branding description in the PubSub service

NeuroAccess, when connecting to a broker, looks for a node named NeuroAccessBranding and expects it to have an item with ID Branding, containing a <BrandingDescriptor> payload. The app downloads and caches this data for a set period.

3.2 The NeuroAccessBranding node

  • Node name: NeuroAccessBranding
  • Item ID: Branding
  • Payload: <BrandingDescriptor> element

4. Branding Descriptor Schema

The descriptor lives in the Branding PubSub item and must match the XML schema. See the full schema here: NeuroAccessBrandingV1.xsd

Key elements:

  • <Version major="2" minor="5" patch="1"/> — last supported NeuroAccess release version
  • <ColorsUri>…</ColorsUri> — HTTP or XMPP URI to a MAUI ResourceDictionary
  • <Images> with one or more <ImageRef id="…" uri="…" contentType="…"/>

4.1 Versioning

Although NeuroAccess currently ignores the version at the time of writing, it is critical for future compatibility. By incrementing semantic version attributes (major, minor, patch), you can publish new branding descriptors that only newer versions of the app will apply. This allows you to roll out multiple themes in parallel—each keyed by version—without changing the schema or node name.

Note: NeuroAccess currently always looks for a Branding item. So at the time of writing, publishing multiple versioned themes is not supported. Also the versioning is only planned to allow for the app to resolve conflict between multiple items. In the case the app is version 2.6.0 and the provided theme is 2.5.1 it will still use that.

5. Step-by-Step Guide

5.1 Prepare your color palette

  1. Create MyColors.xaml:

<ResourceDictionary
  xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
  xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">

<Color x:Key="ExamplePrimaryColor">#123456</Color>
<Color x:Key="ExampleSecondaryColor">#ABCDEF</Color>
</ResourceDictionary>
  1. Host it so it’s reachable at one of:

  • HTTP (for example, https://neuron.example.com/MyColors.xaml)
  • XMPP PubSub: publish it as an item with ID Colors on NeuroAccessBranding, then URI: xmpp:NeuroAccessBranding@pubsub.example.neuron.com/Colors

Tip: Using XMPP URIs keeps everything within the broker—no external server required.

5.2 Prepare image assets

  1. Upload images so they are accessible using HTTP: https://neuron.example.com/<filename>
  2. Recommended IDs (add more if needed):
  • banner_large_light
  • banner_large_dark
  • banner_small_light
  • banner_small_dark
  1. Record each asset’s ID, URI (for example, https://neuron.example.com/banner-large-light.png), and contentType (for example, image/png).

Tip: You can store image files in the broker’s Root folder so they’re publicly accessible at a simple HTTP URL (for example, https://neuron.example.com/BrandingMaterial/banner.png).

5.3 Publish theme descriptor

Create the Branding item payload:

<BrandingDescriptor xmlns='urn:neuroaccess:branding:1.0'>
  <Version major='1' minor='0' patch='0'/>
  <ColorsUri>
    xmpp:NeuroAccessBranding@pubsub.example.neuron.com/Colors
  </ColorsUri>
  <Images>
    <ImageRef
      id='banner_large_light'
      uri='https://neuron.example.com/banner-large-light.png'
      contentType='image/png'/>
    <ImageRef
      id='banner_large_dark'
      uri='https://neuron.example.com/banner-large-dark.png'
      contentType='image/png'/>
  </Images>
</BrandingDescriptor>

And publish it on the pubsub node NeuroAccessBranding with the item id Branding

5.4 Verify in NeuroAccess

  1. Connect using NeuroAccess to your broker.
  2. The app fetches NeuroAccessBrandingBranding.
  3. It applies your colors and images in the UI.

6. Troubleshooting

  • No branding?

  • Verify node: NeuroAccessBranding
  • Verify item IDs: Colors, Branding
  • Clear cache in NeuroAccess settings and restart
  • Images not showing?
  • Open URIs in a browser
  • Check contentType values

7. Conclusion

A ResourceDictionary and image files let you brand your NeuroAccess app entirely via PubSub—no app update needed. Version descriptors for seamless theme updates.

8. References

#access, #neuroaccess, #neuro-access, #branding, #theme


Posts tagged #neuroaccess

No more posts with the given tag could be found. You can go back to the main view by selecting Home in the menu above.