Skip to content

Latest commit

 

History

History
62 lines (45 loc) · 2.57 KB

devices.md

File metadata and controls

62 lines (45 loc) · 2.57 KB

Devices

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.

Get Enterprise Device Pins

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.
}

Get 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();

Delete Device Pin

A device pin can be deleted by calling the delete() method.

BoxDevicePin devicePin = new BoxDevicePin(api, id);
devicePin.delete();