Following is change logs for recently release versions, you can refer to releases page for more details.
Warning: DONOT upgrade java-websocket to 1.15.0(or above), bcz it doesn't work on Android 5.1 or earlier version.
- None
- LCObject: saveEventually retries only if LCException httpStatus is 0, 429, 499, or >= 500
- None
- None
- ArchivedRequests: sendArchivedRequest retries only if LCException httpStatus is 0, 429, 499, or >= 500
- None
- None
- LCException: add new data member
httpStatus
toLCException
- None
- None
- User: add new parameter
phoneNumber
toLCUser.verifyMobilePhone
andresetPasswordBySmsCode
- None
8.2.23 is identical to 8.2.22
- None
- SMS: add new parameter
phoneNumber
forverifyMobilePhone
andresetPasswordBySmsCode
.
- Push: upgrafe mixpush SDK versions
- hms:
6.11.0.300
- honor:
7.0.41
- oppo:
3.4.0
- vivo:
3.0.0.7
- flyme:
4.3.0
- xiaomi:
5.9.9
- hms:
- None
- None
- fixed: re-enable LeanCloud#setNetworkTimeout.
- None
- None
- fixed: correct json parser for LCFile#save with prefix path(GameSave doesn't work in version 8.2.16-18).
- None
- None
- fixed: correct json field name for captcha validation result.
- None
- None
- fixed: let query callback run in main thread for CACHE_THEN_NETWORK policy.
- None
- add new module mixpush-honor: Honor notification supporting by vendor.
- enable CACHE_THEN_NETWORK policy for query#find.
- change Gson type adapter for some classes, avoid to use internal tools;
- other optimizations.
- None
- None
- fixed: revert java-websocket version to 1.4.1, for websocketclient crashed on part of old android versions(before 6.0);
- None
- None
- fixed: change number to double within gson;
- optimized: not throw NPE for file uploading while local cache is disabled;
- None
- None
- fixed: correct negative double parsing bug within gson;
- optimized: upgrade protocol-buf from 3.16.1 to 3.16.3;
- None
- None
- fixed: add timezone support for Gson Adapter(for correcting date serialization/deserialization issue).
- None
- None
- fixed: LCIMMessage#getUpdatedAt is ignored after modified message.
- None
- None
- add date format("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'") to GsonBuilder(local variable).
- compatible for android 12 within leancloud push notification(released as 8.2.9.1)
- bumps protobuf-java from 3.14.0 to 3.16.1.
- bumps gson from 2.8.6 to 2.8.9.
- None
add some functions to LCLeaderboard:
- LCLeaderboard#queryGroupStatistics(String memberType, String statisticName, List targetKeys), for querying multiple entities' statistics.
- LCLeaderboard#getGroupResults(List groupUserIds, int skip, int limit, List selectMemberKeys, List includeStatistics), for querying multiple users' rankings.
- LCLeaderboard#getAroundInGroupResults(List groupUserIds, String targetId, int limit, List selectMemberKeys, List includeStatistics), for querying around rankings within multiple users.
- None.
- None
- None
- fixed: Object#refreshInBackground doesn't work for attributes which have been deleted in remote.
- None
- add new method: LCUser#blockFriendInBackground(String objectId);
- add new method: LCUser#unblockFriendInBackground(String objectId);
- add new method: LCUser#friendshipBlockQuery();
- add new method: LCUser#friendshipBlockQuery(Class clazz);
- filter blocked user in friendship list when query friendship
- None
- add new method: LCUser#createWithSessionToken(String objectId, String sessionToken);
- None
- None
- None
- support android key within leanengine initialization with serverUrl;
- fixed typo: if (null == callback) within mixpush-vivo module;
- None
- None
- upgraded mixpush libraries: hms 5.3.0.304 -> 6.3.0.302, vivo 3.0.0.3_483 -> 3.0.0.4_484, xiaomi 4.8.2 -> 4.9.1;
- None
- None
- fixed: incorrectly parse leaderboard result with included statistics;
- bump log4j-core from 2.17.0 to 2.17.1;
- Bump log4j-core from 2.15.0 to 2.17.0
- None
- None
- compatible with Android 12;
- Bump log4j-core from 2.13.3 to 2.15.0 in leanengine module, to fix CVE-2021-44228.
- None
- None
- fixed: #204;
- add new parameter(clazz) for LCCloud#callFunctionWithCacheInBackground
static <T> Observable<T> callFunctionWithCacheInBackground(String name, Map<String, Object> params,
LCQuery.CachePolicy cachePolicy, long maxCacheAge,
Class<T> clazz);
- add new parameter(clazz) for LCCloud#callRPCWithCacheInBackground
static <T> Observable<T> callRPCWithCacheInBackground(String name, Map<String, Object> params,
LCQuery.CachePolicy cachePolicy, long maxCacheAge,
Class<T> clazz);
- None
- upgrade hms sdk version to
5.3.0.304
; - upgrade oppo sdk version to
3.0.0
; - upgrade vivo sdk version to
3.0.3
; - upgrade meizu sdk version to
4.1.4
; - upgrade fcm sdk version to
28.4.2
;
- None
- None
- fixed NPE for message recall on Android platform.
- None
- None
- make travis ci workable;
- fixed String.valueof(bytes) in PersistenceUtil;
- None
- Add LCUser#strictlyFind(QueryConditions queryConditions);
- add
consumerProguardFiles 'proguard-rules.pro'
to android modules.
- None
- None
- fixed: update realtime message within local cache.
- fixed: convert LCGeoPoint#distanceInKilometers result to
kilometer
. - some other optimizations and project reporting changes(POM).
- None
- None
- better cookie validation in leanengine, provider by @artem-smotrakov.
- use Gson.setLenient() to ignore unrecognized char in json string.
- add exception catch for 403 response of xxx.cn-n1.lcfile.com.
- None
- add leaderboard APIs.
- add LCFile#setPathPrefix(String prefix) method, enable save file with specified path.
- add LCIMConversationsQuery#whereContainedIn method.
- None.
- None
- add LCUser#queryFriendship() to query all friendship data directly.
- fixed: always use application icon as notification icon.
- None
- None
- LCUser#loginAnonymously always returns the same LCUser, except for re-installation.
- remove dependency of androidx in android sdk modules.
- Change the prefix of public class/method name from
AV
toLC
, e.g:LCIMFileMessage#getAVFile
->LCIMFileMessage#getLCFile
LCIMFileMessage#attachAVFile
->LCIMFileMessage#attachLCFile
LCIMFileMessage#isExternalAVFile
->LCIMFileMessage#isExternalLCFile
- None
- check support VIVO Push or not within VIVOPushManager#register.
- Change the prefix of public class name from
AV
toLC
, e.g:AVOSCloud
->LeanCloud
AVObject
->LCObject
,AVFile
->LCFile
,AVUser
->LCUser
,AVQuery
->LCQuery
AVCallback
->LCCallback
,AVException
->LCException
AVIMClient
->LCIMClient
,AVIMMessage
->LCIMMessage
- change enum
AVIMMessage#AVIMMessageIOType
toLCIMMessage#MessageIOType
, and redefined values:TypeIn
(formalAVIMMessageIOTypeIn
)TypeOut
(formalAVIMMessageIOTypeOut
)
- change enum
AVIMMessage#AVIMMessageStatus
toLCIMMessage#MessageStatus
, and redefined values:StatusNone
(formalAVIMMessageStatusNone
)StatusSending
(formalAVIMMessageStatusSending
)StatusSent
(formalAVIMMessageStatusSent
)StatusReceipt
(formalAVIMMessageStatusReceipt
)StatusFailed
(formalAVIMMessageStatusFailed
)StatusRecalled
(formalAVIMMessageStatusRecalled
)
- change enum
AVIMMessageQueryDirection
toLCIMMessageQueryDirection
and redefined values:DirectionUnknown
(formalAVIMMessageQueryDirectionUnknown
),DirectionFromNewToOld
(formalAVIMMessageQueryDirectionFromNewToOld
),DirectionFromOldToNew
(formalAVIMMessageQueryDirectionFromOldToNew
);
- change inner class
AVIMMessageInterval#AVIMMessageIntervalBound
toLCIMMessageInterval#MessageIntervalBound
. - remove some deprecated methods as following:
AVQuery#doCloudQueryInBackground
, please callLCCloudQuery#executeInBackground
directly.ObserverBuilder#buildSingleObserver(FindCallback<T>)
, please useObserverBuilder#buildCollectionObserver(FindCallback<T>)
directly.
- None
- upgrade sqlite database version for saving conversation create/update timestamp correctly.
- None
- None
- bugfix: can't get createdAt/updatedAt from cached AVIMConversation with Cache_Only policy.
- None
- None
- bugfix: can't deserialize AVUser with AVFile attribute from cache.
- bugfix: AVObject.saveEventually will run more times bcz not deleting cache file correctly.
- None
- None
- update firebase/fcm version to v27.0.0, hms version to v5.1.1.301
- None
- None
- fixed: AVUser#becomeWithSessionToken will throw NetworkOnMainThreadException on Android.
- None
- None
- fixed: AVStatus#sendInBackground doesnt work in lean engine.
- None
- None
- fixed: can't update Role bcz totallyOverwrite flag is incorrect.
- AVIMConversation#getMembers() deeply copy member list for avoiding concurrent exception in flutter.
- None
- None
- fixed: AVFile#save(asUser) would call super#save(asUser), binary data does not been uploaded.
- refactor user authentication mechanism in lean engine, make it workable for both cloud-code and server login in customized servlet.
- deprecated RequestUserParser class, instead of invoking AVUser#becomeWithSessionToken directly.
- AVUser#currentUser doesn't work in lean-engine. AVUser#currentUser is a short-cut for use, only working within single thread, so it is not appropriate in lean engine. We disable AVUser#currentUser at present, and add many new methods for supporting requests with particular user authentication:
AVObject#saveInBackground(AVUser asAuthenticatedUser);
AVQuery#findInBackground(AVUser asAuthenticatedUser);
All these methods should be invoked in lean engine.
AVUser#becomeWithSessionToken(String sessionToken, boolean saveToCurrentUser)
was added to change currentUser automatically.
- None
- None
- #160: add new methods for supporting member query with iterator as following:
AVIMConversation#queryBlockedMembers(int limit, String next, final AVIMConversationIterableResultCallback callback);
AVIMConversation#queryMutedMembers(int limit, String next, final AVIMConversationIterableResultCallback callback);
- fixed: #159: leanengine can't parse avobject parameter correctly.
- None
- support friendship with request confirmation, see friendship guide.
- fixed: msg timestamp decode error with gson.
- None
- None
- optimal: decouple imclient-connnection-installation binding, always query throught network for conversations with last-message.
- fixed: AVIMClientEventHandler lost prevStatus for sequence: kickoff - session/open - kickoff again.
- some internal optimizations(#149, #150, #151, #154, #155).
- None
- None
- fixed #144: can't subscribe livequery within jvm.
- fixed #142: clear query's cache result correctly(for includeACL and getFirst parameter).
- close #141: internally optimized for file uploading flow.
- None
- None
- fixed: AVUser#associateWithAuthData will remove user password if logged in with username/password.
- None
- None
- fixed: #136, support unknown type of TypedMessage in flutter sdk.
- None
- None
- fixed: #134, can't parse request correctly for conversation query with objectId.
- None
- None
- fixed: #133, can't parse lm attribute in conversation query result.
- None
- None
- fixed: parse ConversationMemberInfo list in member query, and AVUser list in follower/followee query.
- None
- None
- fixed: resolved json deserialization problem from fastjson output(such as
{"attr":new Date(12232472840)}
) in AVUser cache file.
- None
- None
- fixed: AVFile upload failed for some special external url(mime_type is null).
- None
- add static method: AVUser#requestSMSCodeForUpdatingPhoneNumberInBackground and AVUser#verifySMSCodeForUpdatingPhoneNumberInBackground
- upgrade oppo push sdk from 2.0.2 to 2.1.0
- performance optimization.
- 底层依赖的 JSON 解析库由 fastjson 切换成 Gson,升级方法可参考博客说明。
- None
- performance optimization.
- None
- add static method: AVUser#requestSMSCodeForUpdatingPhoneNumberInBackground and AVUser#verifySMSCodeForUpdatingPhoneNumberInBackground
- upgrade oppo push sdk from 2.0.2 to 2.1.0
- performance optimization.
- None
- send onUnreadMessagesCountUpdated notification before onMessage callback.
- performance optimization.
- None
- support disable hook for leanengine.
- fixed: AddUniqueOperation#apply error for AbstractList.
- None
- None
- upgrade fastjson lib to 1.2.71;
- always initialize current Installation instance through local cache file.
- None
- None
- rollback java-websocket dependency(
1.5.1
->1.4.1
)
- None
- None
- upgrade dependencies to latest version so far:
- fastjson:
1.2.68
->1.2.70
- okhttp:
4.1.1
->4.7.2
- retrofit:
2.6.1
->2.9.0
- rxjava2:
2.2.13
->2.2.19
- java-websocket:
1.4.0
->1.5.1
- fastjson:
- None
- None
- bugfixed: session auto open error due to lack of appid
- None
- None
- always fetch from network at first while lastMessage is necessary in ConversationsQuery.
- optimized for flutter plugin.
- None
- feat: support iOS push options(environment, topic, team id, request id, notification id)
- None
- None
- split mixpush by provider: hms, xiaomi, oppo, vivo, meizu.
- fixed bug: AVObject modification doesn't work within beforeXXX Hook.
- remove fastjson-android dependency from android sdk, all libraries use fastjson jvm version now.
- support
_conversationAdded/Removed
hooks within engine-core.
- fixed bugs within AVFile uploading.
- None
- AVMixPushManager support to connect HMS with specified huawei appId:
AVMixPushManager.connectHMS(Activity activity, String huaweiAppId);
- AVMixPushManager support to register Oppo with specified profile:
AVMixPushManager.registerOppoPush(Context context, String appKey, String appSecret,
String profile, AVOPPOPushAdapter callback)
- add
AVOSCloud.enablePrintAllHeaders4Debug(boolean flag)
method to print the whole request(usable for android securely initialization).
-
upgrade mixpush with latest third-party SDKs:
- xiaomi: 3.6.9 -> 3.7.5
- huawei(HMS): 2.6.3.306 -> 4.0.2.300
- oppo: 1.0.1 -> 2.0.2
- vivo: 2.3.4 -> 2.9.0.0
-
remove duplicated value within AVInstallation.channels
-
support customized subclass of AVIMTypedMessage in Kotlin.
- None
- None
- fixed: can't create conversation with signature.
- None
- None
- fixed: cannot auto re-establish websocket connection for app which enable realtime but disable push service.
- None
- add IMOption to disable auto login for Push:
/**
* 设置是否禁止推送服务的自动 login 请求
* 对于部分应用来说,如果不使用 LeanCloud 推送服务,仅仅只使用了即时通讯服务的话,可以将这个标志设为 true,以避免不必要的网络连接。
*/
AVIMOptions.getGlobalOptions().setDisableAutoLogin4Push(boolean disableAutoLogin4Push);
- some performance optimizations.
- None
- enable cache policy for cloud function calling, add following methods to AVCloud:
public static <T> Observable<T> callFunctionWithCacheInBackground(String name, Map<String, Object> params,
AVQuery.CachePolicy cachePolicy, long maxCacheAge);
public static <T> Observable<T> callRPCWithCacheInBackground(String name, Map<String, Object> params,
AVQuery.CachePolicy cachePolicy, long maxCacheAge);
- support foreground service for PushService:
PushService.setForegroundMode(true, 101, notification);
- add IMOption for persisting last notify timestamp or not:
AVIMOptions.getGlobalOptions().setAlwaysRetrieveAllNotification(true);
- upgrade realtime protocol, auto-close connection under special instruction from server, and report android os info within session open request.
- some performance optimizations.
- None
- enable specify customized PushReceiver for xiaomi/huawei/flyme mix Push. New methods in AVMixPushManager:
public static void registerXiaomiPush(Context context, String miAppId, String miAppKey, Class customizedReceiver);
public static void registerXiaomiPush(Context context, String miAppId, String miAppKey, String profile, Class customizedReceiver);
public static void registerXiaomiPush(Context context, String miAppId, String miAppKey, String profile, boolean isInternationalVendor, Class customizedReceiver);
public static void registerHMSPush(Application application, Class customizedReceiver);
public static void registerHMSPush(Application application, String profile, Class customizedReceiver);
public static boolean registerFlymePush(Context context, String flymeId, String flymeKey, String profile, Class customizedReceiver);
public static boolean registerFlymePush(Context context, String flymeId, String flymeKey, Class customizedReceiver);
- change return value type from long to int for AVIMConversation#getTemporaryExpiredat().
- update Conversation updatedAt field while receiving muted/unmuted response.
- fixed: upload file-based message at frist within AVIMConversation#updateMessage.
- some performance optimizations.
Happy New Year of the Rat.
- AVIMConversation changed #addMember/removeMember callback from AVIMConversationCallback to AVIMConversationPartiallySucceededCallback.
- AVIMConversation deprecated #getAttribute/setAttribute, you should use #get/#set instead of.
- realtime sdk will throw self-joined/self-left notification to application.
- add onMessageReceiptEx into MessageHandler, application can get operator info than onMessageReceipt interface.
- fixed: async call qiniu rest api for retrieving meta data.
- fixed: call AVIMConversationsQuery#findInBackground twice, the second one will return nothing.
- lots of performance optimization.
re-release for something wrong on sonatype.org.
- None
- None
- None
- AVObject#saveInBackground() will hold new key-value at local in default, it is also possible that the local key-value isn't correct if comparing with cloud data. If you need the exactly result after save or update, please use fetchWhenSave option. Or you can disable this feature by call:
AVOSCloud.setAutoMergeOperationDataWhenSave(false)
- AVIMConversationsQuery add three methods to support more query demand:
/**
* 是否返回成员列表
* @param isCompact 为 true 的话则不返回,为 false 的话则返回成员列表,默认为 false
* @return current instance.
*/
public AVIMConversationsQuery setCompact(boolean isCompact)
/**
* find temporary conversations in background.
* @param conversationIds conversation id list.
* @param callback callback handler.
*/
public void findTempConversationsInBackground(List<String> conversationIds, final AVIMConversationQueryCallback callback)
/**
* direct find with conditions in background.
* @param where query condition
* @param sort sort attributes
* @param skip skip number
* @param limit result maximum size
* @param flag query flag:
* 0 - Normal,
* 1 - don't need member list within a conversation item,
* 2 - attach last message data within a conversation item.
* @param callback callback function.
*/
public void directFindInBackground(String where, String sort, int skip, int limit, int flag,
final AVIMConversationQueryCallback callback)
conversations and directlyfindTempConversationsInBackground
- fixed #98: AVObject.saveAll/InBackground(objects) cannot save cascaded files.
- fixed #97: AVQuery.getInBackground(objectId) ignore include keys setting.
- None
- add AVObject#fetchIfNeededInBackground(String includeKeys) method.
- add new async methods to AVFile:
Observable<byte[]> getDataInBackground();
Observable<InputStream> getDataStreamInBackground();
- throw Exception while query#getInBackground result is null.
- fixed: AVCloud#call functions don't transfer parameters.
- None
- None
- make AVObject#getDate(key) compatible for Long/String value.
- publish Fastjson 1.1.71.android-leancloud.jar to fix double value parsing bug(such as 5.43D).
- None
- support rtmClientSign hook for Realtime.
- make Installation cache synchronized with Put/Get operation.
- fixed: cannot put Date or AVObject value into Installation while saving.
- None
- add option to keep file name within download url for method AVFile#saveInBackground():
/**
* save to cloud backend.
* @param keepFileName whether keep file name in url or not.
* @return Observable object.
*/
public Observable<AVFile> saveInBackground(boolean keepFileName);
- fixed: AVQuery#deleteInBackground() will block UI thread.
- None
- None
- fixed: can't get objectId of current AVInstallation after saveInBackground.
- None
- None
- fixed: #86 ClassCastException occurred within AVIMConveration#getMemberCount(), #queryBlockedMembers() and #getMutedMembers().
- None
- None
- fixed: #84 Cannot update AVIMConveration's name
- None
- AVPush support
flowControl
.
- None
- None
- None
- bug fixed: AVParcelableObject throw exception on Android bcz JSONType annotation doesn't work.
- bug fixed: AVStatus.statusQuery() can't get the correct data bcz where condition is lack.
- bug fixed: ObjectFieldOperation can't detect circle reference for collection value.
AVUser#followeeQuery()
和AVUser#followerQuery()
的结果由List<AVUser>
变为List<AVObject>
,开发者需要对结果再次调用getAVObject<AVUser>("follower")
orgetAVObject<AVUser>("followee")
来得到 AVUser 对象。
- support securely initialization for Android platform
- support Status API
- None
- None
- None
- fixed: #78(第三方登录 failOnNotExist 参数使用报错)
- None
- support Realtime client online/offline hook in leanengine library.
- change http User Agent to format:
LeanCloud-Java-SDK/x.x.x
. - add try-catch for crash while registerring receiver in PushService, which occurred on very few Android phones.
- None
- support more notification channel for android(8.0 or above).
PushService#createNotificationChannel(context, id, name, description, importance, ...);
- add AVOSCloud#getServerDateInBackground()
- mixpush support Xiaomi international version.
AVMixpushManager#registerXiaomiPush(context, miAppId, miAppKey, profile, isInternationalVendor)
- None
At this release, we use two versions for Android and Java SDK:
- Android SDKs‘ version is 6.0.2-androidx
- Java SDKs’ version is 6.0.2
for Android SDK, we switch to AndroidX, out of use Support Libraries no longer.
- for domestic application, developers must call AVOSCloud.initialize(context, appId, appKey, serverHost) at first instead of AVOSCloud.initialize(context, appId, appKey) on Android platform.
- support fulltext search(former In-App Search);
- fixed: AVIMAudioMessage with local file doesn't work.
- optimized RTM network status notification and auto re-connection logic.
- for domestic application, developers must call AVOSCloud.initialize(context, appId, appKey, serverHost) at first instead of AVOSCloud.initialize(context, appId, appKey) on Android platform.
- LiveQuery login command add clientTs parameter.
- upgrade dependencies:
- okhttp:
3.12.1
->4.1.1
- retrofit:
2.5.0
->2.6.1
- rxjava2:
2.2.3
->2.2.12
- rxandroid:
2.1.0
->2.1.1
- fastjson:
1.2.46
->1.2.60
- fastjson-android:
1.1.70.android
->1.1.71.android
- protobuf-java:
3.4.0
->3.9.1
- java-websocket:
1.3.9
->1.4.0
- okhttp:
- None
- Added AVLiveQueryConnectionHandler interface to monitor connection status changing, it is optional.
- fixed: make livequery workable on Android.
- AVObject#getUpdatedAt() and AVObject#getCreatedAt() will return a Date instance instead of String, they are compatiable with old sdk.
- Added new methods: AVObject#getUpdatedAtString() and AVObject#getCreatedAtString(), they will return the date string directly.
- fixed: livequery login request through wss will be executed before sending subscribe request.
- fixed: AVObject deserializer supports parse recursively, so it can correctly parse embeded AVObject more than 3 layers.
- None
- None
- 修复:在 Android 8.1(含)及以上版本中,PushService 被杀死又启动后(心跳检测断线之前),RTM 无法使用的问题
- None
- None
- fixed: JSON parse exception for null value within result map.
- None
- convert Throwable(HttpException) to Throwable(AVException) while failed to call RxJava API.
- fixed bug: PushService can't start under Android 6.0(or elder);
- None
- add new instance method to AVUser:
public void getFollowersAndFolloweesInBackground(final FollowersAndFolloweesCallback callback)
- add new static method to AVUser in order to compatible with old Android SDK.
public static <T extends AVUser> T cast(AVUser user, Class<T> clazz);
public static AVUser becomeWithSessionToken(String sessionToken);
public static <T extends AVUser> T becomeWithSessionToken(String sessionToken, Class<T> clazz);
- change AVUser#getQuery declaration as following to compatible with old Android SDK:
public static AVQuery<AVUser> getQuery()
- None
- add new static method to AVUser:
AVUser.alwaysUseSubUserClass(Class<? extends AVUser> clazz);
- add new static method to PushService. If you only use LiveQuery(exclude Push or Realtime), you can invoke this method to starting PushService(establishing websocket connection).
PushService.startIfRequired(android.content.Context context);
- upgrade okhttp.version to 3.12.1;
- fixed: instance created by
AVFile.withFile(name, file)
can't be upload correctly; - fixed: can't change http/https protocol dynamically while uploading AVFile;