PropertyID.UsbHostWhitelisting Field |
public const Int32 UsbHostWhitelisting = "value"
Public Const UsbHostWhitelisting As Int32 = "value"
The class of the property is BlobProperty
.
The specific implementation for this type of blob is UsbHostWhitelisting
.
To set this property by intent (Intents.ACTION_CONFIGURATION_COMMIT
) use the serialized form:
[["vid","pid","name","description","persistence"],["vid","pid","name","description","persistence"]]
WhitelistingPersistence.REBOOT
is allowed.
"
must be escaped as \"
.Intent intent = new Intent(Intents.ACTION_CONFIGURATION_COMMIT); HashMap map = new HashMap(); map.put(PropertyID.USB_HOST_WHITELISTING, "[[\"04fb\",\"96a2\",\"mouse\",\"usb\",\"REBOOT\"],[\"05fb\",\"26a2\",\"keyboard\",\"usb\",\"REBOOT\"]]"); 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.USB_HOST_WHITELISTING, "[]"); intent.putExtra(Intents.EXTRA_CONFIGURATION_CHANGED_MAP, map); mContext.sendBroadcast(intent);
,
"
and space must be escaped as "\,"
\"
and " "
respectively.adb shell am broadcast -a com.datalogic.device.intent.action.configuration.COMMIT --es com.datalogic.device.intent.extra.configuration.CHANGED_MAP 'USB_HOST_WHITELISTING=[[\"04fb\""\,"\"96a2\""\,"\"mouse\""\,"\"usb" "mouse\""\,"\"REBOOT\"]"\,"[\"06b2\""\,"\"f9a2\""\,"\"keyboard\""\,"\"usb" "keyboard\""\,"\"REBOOT\"]]'To delete all devices:
adb shell am broadcast -a com.datalogic.device.intent.action.configuration.COMMIT --es com.datalogic.device.intent.extra.configuration.CHANGED_MAP 'USB_HOST_WHITELISTING=[]'
© 2016 Datalogic S.p.A. and/or its affiliates. All rights reserved. Datalogic and the Datalogic logo are registered trademarks of Datalogic S.p.A. in many countries including the U.S.A. and the E.U. All other trademarks are the property of their respective owners.