Tabnine Logo
com.avos.avoscloud
Code IndexAdd Tabnine to your IDE (free)

How to use com.avos.avoscloud

Best Java code snippets using com.avos.avoscloud (Showing top 20 results out of 315)

origin: cn.leancloud.android/avoscloud-push

void onResponse4MemberBlock(AVIMOperation imop, String operation, int reqeustId, Messages.BlacklistCommand blacklistCommand) {
 if (null == blacklistCommand) {
  return;
 }
 List<String> allowedList = blacklistCommand.getAllowedPidsList();
 List<Messages.ErrorCommand> errorCommandList = blacklistCommand.getFailedPidsList();
 Bundle bundle = genBundleFromPartiallyResult(allowedList, errorCommandList);
 BroadcastUtil.sendIMLocalBroadcast(session.getSelfPeerId(), blacklistCommand.getSrcCid(), reqeustId, bundle, imop);
}
origin: cn.leancloud/leancloud-common

private boolean checkUserAuthentication(final AVCallback callback) {
 if (!this.isAuthenticated() || AVUtils.isBlankString(getObjectId())) {
  if (callback != null) {
   callback.internalDone(AVErrorUtils.createException(AVException.SESSION_MISSING,
     "No valid session token, make sure signUp or login has been called."));
  }
  return false;
 }
 return true;
}
origin: cn.leancloud/leancloud-common

 @Override
 public void onFailure(Throwable error, String content) {
  for (AVObject o : objects) {
   o.running = false;
   o.rollbackDataToOperationQueue();
   o.onSaveFailure();
  }
  LogUtil.log.d(content);
  if (callback != null)
   callback.internalDone(null, AVErrorUtils.createException(error, content));
 }
};
origin: cn.leancloud/leancloud-common

private void generateQueryPath() {
 // This method is only used for cache and currently only storage service use cache
 if (AVUtils.isBlankString(queryPath)) {
  conditions.assembleParameters();
  queryPath =
    PaasClient.storageInstance().buildUrl(queryPath(), new AVRequestParams(getParameters()));
 }
}
origin: cn.leancloud.android/avoscloud-sdk

public static void getUnreadStatusesCountInBackground(String inboxType,
  final CountCallback callback) {
 if (!checkCurrentUser(null)) {
  if (callback != null) {
   callback.internalDone(0, AVErrorUtils.sessionMissingException());
  }
  return;
 }
 String userId = AVUser.getCurrentUser().getObjectId();
 Map<String, String> map = getStatusQueryMap(userId, 0, 0, 0, inboxType, null, true, true);
 getStatusCountImpl("subscribe/statuses/count", map, callback);
}
origin: cn.leancloud.android/avoscloud-sdk

@Override
public void onSuccess(String content, AVException e) {
 AVUser user = AVUser.newAVUser();
 AVUtils.copyPropertiesFromJsonStringToAVObject(content, user);
 user.setAnonymous(true);
 AVUser.changeCurrentUser(user, true);
 if (internalCallback != null) {
  internalCallback.internalDone(user, null);
 }
}
origin: cn.leancloud.android/avoscloud-sdk

private static boolean checkCurrentUser(final AVCallback callback) {
 if (AVUser.getCurrentUser() == null) {
  if (callback != null) {
   callback.internalDone(null, AVErrorUtils.sessionMissingException());
  }
  return false;
 }
 return true;
}
origin: cn.leancloud.android/avoscloud-sdk

/**
 * Removes the previously cached result for this query, forcing the next find() to hit the
 * network. If there is no cached result for this query, then this is a no-op.
 */
public void clearCachedResult() {
 generateQueryPath();
 if (!AVUtils.isBlankString(queryPath)) {
  AVCacheManager.sharedInstance().delete(queryPath);
 }
}
origin: cn.leancloud/leancloud-common

 @Override
 public void onFailure(Throwable error, String content) {
  LogUtil.log.d(content + error);
  callback.internalDone(null, AVErrorUtils.createException(error, content));
 }
});
origin: cn.leancloud.android/avoscloud-statistics

synchronized AnalyticsEvent beginEvent(Context context, String name, String label,
  String key) {
 AnalyticsEvent event = eventByName(name, label, key, true);
 if (!AVUtils.isBlankString(label)) {
  event.setLabel(label);
 }
 event.start();
 duration.resume();
 return event;
}
origin: cn.leancloud.android/avoscloud-sdk

 @Override
 public void onFailure(Throwable error, String content) {
  super.onFailure(error, content); // To change body of overridden methods use File |
  // Settings
  // | File Templates.
  if (callback != null) {
   callback.internalDone(null, AVErrorUtils.createException(error, content));
  }
 }
});
origin: cn.leancloud.android/avoscloud-sdk

 @Override
 public void onFailure(Throwable error, String content) {
  super.onFailure(error, content);
  if (callback != null) {
   callback.internalDone(null, AVErrorUtils.createException(error, content));
  }
 }
});
origin: cn.leancloud.android/avoscloud-push

void onResponse4MemberMute(AVIMOperation imop, String operation, int requestId, Messages.ConvCommand convCommand) {
 if (null == convCommand) {
  return;
 }
 List<String> allowedList = convCommand.getAllowedPidsList();
 List<Messages.ErrorCommand> errorCommandList = convCommand.getFailedPidsList();
 Bundle bundle = genBundleFromPartiallyResult(allowedList, errorCommandList);
 BroadcastUtil.sendIMLocalBroadcast(session.getSelfPeerId(), conversationId, requestId,
   bundle, imop);
}
origin: cn.leancloud.android/avoscloud-sdk

private void init() {
 objectId = "";
 isDataReady = false;
 if (getPaasClientInstance().getDefaultACL() != null) {
  acl = new AVACL(getPaasClientInstance().getDefaultACL());
 }
 running = false;
}
origin: cn.leancloud.android/avoscloud-push

@Override
public void onSessionOpen(Context context, AVSession session, int requestId) {
 // 既然已经成功了,就往缓存里面添加一条记录
 AVSessionCacheHelper.getTagCacheInstance().addSession(session.getSelfPeerId(), session.tag);
 // 这里需要给AVIMClient那边发一个LocalBoardcastMessage
 if (requestId > CommandPacket.UNSUPPORTED_OPERATION) {
  BroadcastUtil.sendIMLocalBroadcast(session.getSelfPeerId(), null, requestId,
    AVIMOperation.CLIENT_OPEN);
 }
}
origin: cn.leancloud.android/avoscloud-push

public AVSession(String selfId, AVSessionListener sessionListener) {
 this.selfId = selfId;
 this.context = AVOSCloud.applicationContext;
 this.sessionListener = sessionListener;
 this.websocketListener = new AVDefaultWebSocketListener(this);
 pendingMessages = new PendingMessageCache<Message>(selfId, Message.class);
 conversationOperationCache = new AVIMOperationQueue(selfId);
}
origin: cn.leancloud.android/avoscloud-sdk

private boolean checkUserAuthentication(final AVCallback callback) {
 if (!this.isAuthenticated() || AVUtils.isBlankString(getObjectId())) {
  if (callback != null) {
   callback.internalDone(AVErrorUtils.createException(AVException.SESSION_MISSING,
     "No valid session token, make sure signUp or login has been called."));
  }
  return false;
 }
 return true;
}
origin: cn.leancloud.android/avoscloud-sdk

private void generateQueryPath() {
 // This method is only used for cache and currently only storage service use cache
 if (AVUtils.isBlankString(queryPath)) {
  conditions.assembleParameters();
  queryPath =
    PaasClient.storageInstance().buildUrl(queryPath(),
        new AVRequestParams(getParameters()));
 }
}
origin: cn.leancloud/leancloud-common

public static void getUnreadStatusesCountInBackground(String inboxType,
  final CountCallback callback) {
 if (!checkCurrentUser(null)) {
  if (callback != null) {
   callback.internalDone(0, AVErrorUtils.sessionMissingException());
  }
  return;
 }
 String userId = AVUser.getCurrentUser().getObjectId();
 Map<String, String> map = getStatusQueryMap(userId, 0, 0, 0, inboxType, null, true, true);
 getStatusCountImpl("subscribe/statuses/count", map, callback);
}
origin: cn.leancloud.android/avoscloud-sdk

 @Override
 public void onFailure(Throwable error, String content) {
  super.onFailure(error, content); // To change body of overridden methods use File | Settings
  // | File Templates.
  if (callback != null) {
   callback.internalDone(null, AVErrorUtils.createException(error, content));
  }
 }
}, null, null);
com.avos.avoscloud

Most used classes

  • AVOSCloud
    The AVOSCloud class contains static functions that handle global configuration for the AVOSCloud lib
  • AVException
    A AVException gets raised whenever a AVObject issues an invalid request, such as deleting or editin
  • AVObject
    The AVObject is a local representation of data that can be saved and retrieved from the AVOSCloud c
  • AVUser
  • AVFile
    AVFile is a local representation of a file that is saved to the AVOSCloud cloud. The workflow is
  • AVAnalytics,
  • AVUtils,
  • LogUtil$avlog,
  • LogUtil$log,
  • PaasClient,
  • SaveCallback,
  • AVErrorUtils,
  • AVIMClient,
  • AVIMTypedMessage,
  • AVCallback,
  • AVClassName,
  • AVPersistenceUtils,
  • AVRuntimeException,
  • FindCallback
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now