Sony's Developer World forum

    • Home
    • Forum guidelines

    Upcoming maintenance 

     

    Dear Customers and Partners.

    This website will be undergoing scheduled maintenance on June 14, 2023. Please be aware there may be disruption to the developer portal website and associated services during the scheduled maintenance period.

    This upgrade is essential to ensure the continued performance, reliability, and security of Developer World.

    We apologize for any inconvenience.

     

     

    switchNotifications error

    Audio Control API
    2
    2
    2853
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tmrobert8 last edited by

      BTW - there is a small error in switchNotifications.

      Let's say I get the switch notifications and it responds like:

      [{"enabled":[],"disabled":[{"name":"notifyPowerStatus","version":"1.0"},{"name":"notifySWUpdateInfo","version":"1.0"},{"name":"notifySettingsUpdate","version":"1.1"},{"name":"notifyStorageStatus","version":"1.1"},{"name":"notifyStorageStatus","version":"1.2"}]}]
      

      Now - if I decide to enable everything and request..

      [{"enabled":[{"name":"notifyPowerStatus","version":"1.0"},{"name":"notifySWUpdateInfo","version":"1.0"},{"name":"notifySettingsUpdate","version":"1.1"},{"name":"notifyStorageStatus","version":"1.1"},{"name":"notifyStorageStatus","version":"1.2"}],"disabled":[]}]
      

      The result comes back that nothing is enabled and I receive no events:

      [{"enabled":[],"disabled":[{"name":"notifyPowerStatus","version":"1.0"},{"name":"notifySWUpdateInfo","version":"1.0"},{"name":"notifySettingsUpdate","version":"1.1"},{"name":"notifyStorageStatus","version":"1.1"},{"name":"notifyStorageStatus","version":"1.2"}]}]
      

      The reason for this is because I included an empty disabled element. Had I simply requested this (notice no disabled element):

      [{"enabled":[{"name":"notifyPowerStatus","version":"1.0"},{"name":"notifySWUpdateInfo","version":"1.0"},{"name":"notifySettingsUpdate","version":"1.1"},{"name":"notifyStorageStatus","version":"1.1"},{"name":"notifyStorageStatus","version":"1.2"}]}]
      

      Then the response is correct and those events are enabled

      [{"enabled":[{"name":"notifyPowerStatus","version":"1.0"},{"name":"notifySWUpdateInfo","version":"1.0"},{"name":"notifySettingsUpdate","version":"1.1"},{"name":"notifyStorageStatus","version":"1.1"},{"name":"notifyStorageStatus","version":"1.2"}],"disabled":[]}]
      

      Seems like the API processing doesn't like an empty element array on the disabled element...

      1 Reply Last reply Reply Quote
      • D
        david DeveloperWorld last edited by

        Have put this on the list of improvements, will start with updating the documentation to clarify. Hopefully the API will be improved also.

        1 Reply Last reply Reply Quote
        • First post
          Last post
        Developer World
        Copyright © 2021 Sony Group Corporation. All rights reserved.
        • Contact us
        • Legal