Open DynamicView windows anywhere

So, right now, DynamicView plugin opens only if alarm is selected in AlarmManager and created temp view that deletes itself on logout. I want for it to pop up anytime it detects any alarm with camera that detected it, no matter the window, and to remove temp view from views if the window is closed. I tried to edit MessageIdFilter in BackgroundPlugin.cs by setting it to Alarm* or AlarmManager* but it didnt do anything. And for the close thing, I dont know whats the method I would need

Link to the plugin: https://github.com/milestonesys/mipsdk-samples-plugin/tree/dc06754a0d39aa5ffdf570916d687626fd7d3433/DynamicView

If you want to pick up all Alarms as they happen you should use NewAlarmIndication

https://doc.developer.milestonesys.com/html/index.html?base=miphelp/class_video_o_s_1_1_platform_1_1_messaging_1_1_message_id_1_1_server.html&tree=tree_search.html?search=newalarmindication

You can see a message handler implemented in the SCOverlayGraphOnEvent..

https://doc.developer.milestonesys.com/html/index.html?base=samples/pluginsamples/scoverlaygraphonevent/readme.html&tree=tree_1.html

On closing windows I believe the View and Windows tool plugin sample might be useful for you..

https://developer.milestonesys.com/s/article/Exploring-the-MIP-SDK-Tool-View-and-Window-Tool

https://doc.developer.milestonesys.com/html/index.html?base=samples/pluginsamples/scviewandwindow/readme.html&tree=tree_1.html

I added NewAlarmIndication as

           new MessageIdFilter(MessageId.Server.NewAlarmIndication));

But, now it dosent do anything at all

Let’s take one step back. If you debug the SCOverlayGraphOnEvent plugin sample unmodified, do you see the handler being hit when an alarm comes in?

https://developer.milestonesys.com/s/article/debugging-techniques-for-Smart-Client-plugins

Next step, if the sample work, do you do the same in the sample you modified? Try to debug..

I’m not sure what does handler being hit mean, but I got this in output when I activate user defined alarm, is this it? Or do I need to create alarm on camera and look for it somewhere else?

Application Insights Telemetry: {“name”:“AppEvents”,“time”:“2024-08-21T13:32:35.0661024Z”,“iKey”:“4a50f8fc-0e02-4536-9fa4-48cb731791f3”,“tags”:{“ai.session.id”:“919f6e66-c89f-4608-a29f-ff9b5f3db0b6”,“ai.location.ip”:“0.0.0.0”,“ai.internal.sdkVersion”:“dotnet:2.22.0-997”},“data”:{“baseType”:“EventData”,“baseData”:{“ver”:2,“name”:“User-defined event triggered: EventPanel”,“properties”:{“Outcome”:“Success”}}}}

The thread ‘[Thread Destroyed]’ (5236) has exited with code 0 (0x0).

In NewAlarmMessageHandler in the sample (SCOverlayGraphOnEvent ) put a breakpoint, if that breakpoint is hit then the handler is being hit.