Users

As a subclass of VoiceLayerObject users can be created and updated. Additionally user objects support adding, updating, and removing meta data. Currently users do not support removal and any attempt to remove a user will result in a RuntimeException being thrown.

User Data

A VoiceLayerUser object is not guaranteed to have a full VoiceLayerUser.data entry. To retrieve VoiceLayerUserData for a user you can do the following:

VoiceLayerUserData data = user.fetchUserData();

or

user.fetchUserData(new VoiceLayerFetchCallback<VoiceLayerUserData>() {
    @Override
    public void onFetchComplete(VoiceLayerUserData userData, VoiceLayerException exception) {

    }
});

If the user you are retrieving VoiceLayerUserData for is the authenticated user the SDK will automatically update the current user stored in the client with the retrieved VoiceLayerUserData.