Retrieving the image associated with an alarm using the MIP SDK

When you get the Alarm, you already have the camera ID and timestamp. Those two pieces of information are all you need to retrieve the image recorded at that time.

This is actually a question that comes up regularly and I have made a small sample demonstrating this. It is based on the AlarmEventViewer sample with a small addition. Please see the sample here.

Also note that Snapshots are something different. When an Analytics Event is submitted, it can optionally include one or more snapshots as metadata. These images can be anything and are not necessarily camera images. Therefore, GetSnapshots() will typically return empty for standard alarms such as Motion Detected or Motion Stopped.

PS. Perhaps you will find the answer and discussion here interesting: Camera Snapshot When Motion Detection