+ // Unshare the file: Create the intent
+ Intent unshareService = new Intent(mFileActivity, OperationsService.class);
+ unshareService.setAction(OperationsService.ACTION_UNSHARE);
+ unshareService.putExtra(OperationsService.EXTRA_ACCOUNT, mFileActivity.getAccount());
+ unshareService.putExtra(OperationsService.EXTRA_REMOTE_PATH, file.getRemotePath());
+ unshareService.putExtra(OperationsService.EXTRA_SHARE_TYPE, ShareType.PUBLIC_LINK);
+ unshareService.putExtra(OperationsService.EXTRA_SHARE_WITH, "");
+
+ unshareFile(unshareService);
+ }
+
+ public void unshareFileWithUserOrGroup(OCFile file, ShareType shareType, String userOrGroup){
+
+ // Unshare the file: Create the intent
+ Intent unshareService = new Intent(mFileActivity, OperationsService.class);
+ unshareService.setAction(OperationsService.ACTION_UNSHARE);
+ unshareService.putExtra(OperationsService.EXTRA_ACCOUNT, mFileActivity.getAccount());
+ unshareService.putExtra(OperationsService.EXTRA_REMOTE_PATH, file.getRemotePath());
+ unshareService.putExtra(OperationsService.EXTRA_SHARE_TYPE, shareType);
+ unshareService.putExtra(OperationsService.EXTRA_SHARE_WITH, userOrGroup);
+
+ unshareFile(unshareService);
+ }
+
+
+ private void unshareFile(Intent unshareService){