+
+ public void unshareFileWithLink(OCFile file, FileActivity callerActivity) {
+
+ if (isSharedSupported(callerActivity)) {
+ // Unshare the file
+ Intent service = new Intent(callerActivity, OperationsService.class);
+ service.setAction(OperationsService.ACTION_UNSHARE);
+ service.putExtra(OperationsService.EXTRA_ACCOUNT, callerActivity.getAccount());
+ service.putExtra(OperationsService.EXTRA_REMOTE_PATH, file.getRemotePath());
+ callerActivity.startService(service);
+
+ callerActivity.showLoadingDialog();
+
+ } else {
+ // Show a Message
+ Toast t = Toast.makeText(callerActivity, callerActivity.getString(R.string.share_link_no_support_share_api), Toast.LENGTH_LONG);
+ t.show();
+
+ }
+ }