Click or drag to resize

PropertyID.ScreensaverDatalogic Field

Contains an editable list of screensavers managed by the Datalogic Screensaver application.

Namespace: Com.Datalogic.Device.Configuration
Assembly: datalogic-xamarin-sdk (in datalogic-xamarin-sdk.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
VB
public const Int32 ScreensaverDatalogic = new Intent(Intents.ACTION_CONFIGURATION_COMMIT);
 HashMap map

Field Value

Type: Int32
Remarks
Contains an editable list of screensavers managed by the Datalogic Screensaver application. This list can be modified at runtime by adding or removing elements via the SDK or Datalogic Screensaver settings.
The type of this property is BlobProperty and the concrete implementation is DatalogicScreensaver.
To use Datalogic Screensaver, SCREENSAVER_COMPONENT must be set to "com.datalogic.settings.datalogicscreensaver/com.datalogic.settings.datalogicscreensaver.ScreensaverService".

Datalogic Screensaver continuously cycles through the screensaver list to display a carousel of screensavers. Each screensaver is represented by a ScreensaverItem which can either be an animated image or a video. A ScreensaverItem has the following parameters:

  • file: The file name with extension. The file must be either an image or a video; otherwise, it will be ignored.
  • background: The background color in the format "#RRGGBB" or "#AARRGGBB" as used by Android (Color.parseColor). This parameter is used only for images.
  • duration: The screensaver duration in seconds. Valid values are between DatalogicScreensaver.DURATION_MIN_S (0s) and DatalogicScreensaver.DURATION_MAX_S (1h). Values outside this range will be rounded to the nearest bound. This parameter is used only for images.
  • animation: The animation type defined by the ScreensaverAnimation enumeration. This parameter is used only for images.
Screensaver files must be located in the directory "/sdcard/DCIM/Screensavers". During execution, Datalogic Screensaver searches for the file in this directory and displays it only if found.
If the screensaver is an image, Datalogic Screensaver displays it over a single-colored background for the specified duration. Images with a duration of 0 are ignored.
If the screensaver is a video, it is displayed unscaled over the default background (DatalogicScreensaver.DEFAULT_BACKGROUND_COLOR) for the entire duration of the video. In this case, the background color, duration, and animation parameters are ignored. So, to clearness use these default values: Using commit intent by android app, character " must be escaped as \".

For example, to add two screensavers, an image and a video:
 Intent intent = new Intent(Intents.ACTION_CONFIGURATION_COMMIT);
 HashMap map = new HashMap();
 map.put(PropertyID.SCREENSAVER_DATALOGIC, "[[\"image.jpg\",\"#000000FF\",\"60\",\"ZIG_ZAG\"],[\"video.jpg\",\"#00000000\",\"0\",\"UNDEFINED\"]]");
 intent.putExtra(Intents.EXTRA_CONFIGURATION_CHANGED_MAP, map);
 mContext.sendBroadcast(intent);
 
To delete all devices:
 Intent intent = new Intent(Intents.ACTION_CONFIGURATION_COMMIT);
 HashMap map = new HashMap();
 map.put(PropertyID.SCREENSAVER_DATALOGIC, "[]");
 intent.putExtra(Intents.EXTRA_CONFIGURATION_CHANGED_MAP, map);
 mContext.sendBroadcast(intent);
 


To set this property via intent (Intents.ACTION_CONFIGURATION_COMMIT), use the following serialized format:
 [["file","background","duration","animation"],["file","background","duration","animation"]]
 

Using the commit intent by shell, characters , " and space must be escaped as "\," \" and " " respectively.

For example, to add two screensavers, an image and a video, with the commit intent:
 adb shell am broadcast \
 -a com.datalogic.device.intent.action.configuration.COMMIT \
 --es com.datalogic.device.intent.extra.configuration.CHANGED_MAP 'SCREENSAVER_DATALOGIC=[[\"image.jpg\""\,"\"#0000FF\""\,"10"\,"\"ZIG_ZAG\"]"\,"[\"video.mp4\""\,"\"#00000000\""\,"0"\,"\"ZIG_ZAG\"]]'
 
To delete all screensavers:
 adb shell am broadcast \
 -a com.datalogic.device.intent.action.configuration.COMMIT \
 --es com.datalogic.device.intent.extra.configuration.CHANGED_MAP 'SCREENSAVER_DATALOGIC=[]'
 

[Android Documentation]

See Also