You are here

removeFavorite

public void removeFavorite(Node node) remove the specified node from the current user's favorites.
Attention: This method was added in SDK version 1.2.

Parameters

Node node
A Node object. The node to removed from the current user's list of favorites.

Returns

void

Exception

Throws an SkyVaultServiceException if the operation cannot be completed.

Example

        
  // Add and/or remove a favorite
  final String testFolderName = "Sample Folder";
  Folder testFolder = (Folder) documentFolderService.getChildByPath(documentLibrary, testFolderName);
  Log.d(TAG, "1. Test folder is favorite: "+documentFolderService.isFavorite(testFolder));
  if (documentFolderService.isFavorite(testFolder)){
  	documentFolderService.removeFavorite(testFolder);
  }
  else {
  	documentFolderService.addFavorite(testFolder);
  }
  Log.d(TAG, "2. Test folder is favorite: "+documentFolderService.isFavorite(testFolder));