From wiki.ginstr.com
Jump to: navigation, search

Video

Widget is represented by a button. When button is clicked camera app starts. After recording is done and user returns to app screen, above the widget it's shown a counter which defines number of videos stored.

Widget id, ${gbamID}:

mediaVideo

Back to GBAM widgets table

Datatypes

Value is stored from widget to database as video datatype.

Predefined user data

PreLoaded

Properties panel

User will configure this data in properties panels of selected widget:

GENERAL
VALIDATIONS
    <columnVideo required="true|false"></columnVideo>
ACTION
  • -
ACTION MESSAGES
  • -
DATABASE
  • "is part of database", checkbox option by default is set as checked. When checked database column is created for this widget.
  • "additional ginstr web column settings":
  • "replicate", if true, replicates audios from server to android client, add to configuration.xml:
<columnVideo>
    <replicate>true|false</replicate>
</columnVideo>

Code snippets

GBAM Code Variables

Variables which are used in code snippet below but not defined in user modifiable inputs.

Common widget code

<com.ginstr.widgets.GnTextView
        android:id="@+id/${widgetID}_label"
	android:layout_width="wrap_content"
	android:layout_height="wrap_content"
	android:text="@string/${widgetID}"
        gn:style="@style/mediaVideo_label"/>
	
<RelativeLayout
	android:layout_width="match_parent"
	android:layout_height="wrap_content">

	<com.ginstr.widgets.GnMediaAction
		android:id="@+id/${widgetID}_button"
		android:layout_width="wrap_content"
		android:layout_height="wrap_content"
		gn:s_actionType="video"
                gn:dataType="video"
                gn:style="@style/mediaVideo_button"/>

</RelativeLayout>

strings.xml

Lines to be added for each language.

<string name="${widgetID}">${widgetLabel}</string>

internal widget layout

This widget has internal structure widget_en_mediaaction_video.xml. It is optional.