Device pinning is a feature that allows enterprise admins to pin their user’s corporate-managed Box account to a particular mobile device or Box Sync client.
Calling the static getEnterpriceDevicePins(BoxAPIConnection api, String enterpriseID, String... fields)
will return an iterable that will page through all of the device pins belongs to
enterprise with given ID. It is possible to specify maximum number of retrieved
items per single response by passing the maxiumum number of records to retrieve to
getEnterpriceDevicePins(BoxAPIConnection api, String enterpriseID, int limit, String... fields)
Iterable<BoxDevicePin.Info> enterpriseDevicePins = BoxDevicePin.getEnterpriceDevicePins(api, id);
for (BoxDevicePin.Info devicePin : enterpriseDevicePins) {
// Do something with the device pin.
}
Existing collections can be retrieved by calling the getInfo(String... fields)
method.
Optional parameters can be used to retrieve specific fields of the Device Pin object.
BoxDevicePin devicePin = new BoxDevicePin(api, id);
BoxDevicePin.Info devicePinInfo = devicePin.getInfo();
A device pin can be deleted by calling the delete()
method.
BoxDevicePin devicePin = new BoxDevicePin(api, id);
devicePin.delete();