Usage Examples
Instantiation
CMMobileTimelineSDK timeline = new CMMobileTimelineSDK(accessToken, cameraId);
timeline.setVerticalRecordingsVisible(true);
timeline.setTimelineControlsVisible(true);
timeline.setZoomLevel(zoomLevel);
timeline.setTimestamp(timestamp);
timeline.hideEventTypes("objectInAreaDetected", "audioDetected");
timeline.setCameraNameVisible(false);
timeline.present(context);
val timeline = CMMobileTimelineSDK(accessToken, cameraId)
timeline.isVerticalRecordingsVisible = true
timeline.isTimelineControlsVisible = true
timeline.zoomLevel = zoomLevel
timeline.timestamp = timestamp
timeline.hideEventTypes("objectInAreaDetected", "audioDetected")
timeline.isCameraNameVisible = false
timeline.present(context)
Authentication/Authorization
Set initialization parameter accessToken.
Select Camera
Set initialization parameter cameraId.
Set Zoom Level
Zoom level | Time interval | Download & Share visible |
---|---|---|
0 (Default) | 2 hours | No |
1 | 15 minutes | No |
2 | 3 minutes | Yes |
timeline.zoomLevel = 2
Set Colors
Primary color and secondary color can be set in file colors.xml
// Default colors are primary: #0c94c8 and secondary: #333333
<color name="timeline_primary_color">#ff1326</color>
<color name="timeline_secondary_color">#1c00f9</color>
Set Font Family
Font resources has to be added in Android resources folder res/font to then configure the selected font in strings.xml
@font/poppins_regular
Hide Bottom Tab Bar GUI Component
timeline.isTimelineControlsVisible = false
Hide Vertical Recording Line GUI Component
timeline.isVerticalRecordingsVisible = false
Set Date-Time
This is an optional parameter. It will be current timestamp as default.
timeline.timestamp = timestamp
// or
timeline.timestamp = Date().time
Hide Camera Name
Hide Camera Name from the Player window on the timeline screen
timeline.isCameraNameVisible = false
Hide Event Types
Hide the specific type of events you don't want to load the timeline screen
timeline.hideEventTypes("objectInAreaDetected", "audioDetected")
Localization
Device language will be set by the SDK. Supported languages are English, Dutch, German, Japanese, Polish, Portuguese, Spanish and Turkish. For unsupported languages, the default language is English.
Updated over 1 year ago