List of usage examples for com.amazonaws.services.cognitoidp.model GetDeviceResult getDevice
public DeviceType getDevice()
The device.
From source file:io.fineo.client.auth.cognito.CognitoDevice.java
License:Open Source License
/** * Fetches device properties, in the current thread. Call this method to ensure the device properties are current. * Reading device properties from this object can return null values. * * <p>//from w ww. jav a 2s.co m * <b>Note:</b> This method will perform network operations. Calling this method in * applications' main thread will cause Android to throw NetworkOnMainThreadException. * </p> * * @param callback REQUIRED: {@link GenericHandler} callback. */ public void getDevice(DevicesHandler callback) { if (callback == null) { throw new CognitoParameterInvalidException("callback is null"); } try { GetDeviceResult getDeviceResult = getDeviceInternal(user.getCachedSession()); updateThis(getDeviceResult.getDevice()); } catch (Exception e) { callback.onFailure(e); } }