2.6.0 Stable is a milestone in the versaion. Because of the considerable changes and optimizations that have been made, if you are a new user you can integrate directly without reference to the following documents. If you are preparing to upgrade the 2.6.0 version from the next 2.+ version, the developer needs to read the following document carefully.
The optimizations are as follows:
1 push overall optimization push arrival rate significantly increased
2 user information Cache design optimization
3 album Optimization (album folder, preview, etc.)
4 some UI and detail optimizations
The changes are as follows:
1 interface changes of the user information provider
The previous user information cache only made memory caches, and a new level of database caching was added after this optimization change. Of course, there are some changes to the interface
Old
Rongcontext.getinstance (). GetXXX
New
Ronguserinfomanager.getinstance (). GetXXX
Take the demo as an example to change the class:
Contactnotificationmessageprovider.java
2 Package name change (directly replace kit dependencies can be ignored here)
Io.rong.imkit.util The package name is changed to: io.rong.imkit.utils
Cases:
Import Io.rong.imkit.utils.AndroidEmoji;
Import Io.rong.imkit.utils.RongDateUtils;
3 Conflict resolution changes for third-party libraries
Eventbus is a third-party class library commonly used by Android
Version 2.6.0stable has resolved Eventbus conflict
4 changes in usage of asyncimageview (more places to change)
In a geographical location
The Addmarker method in Locationmapactivity.java
Imageview.setresource (URL, 0);
No longer need new Resource
5 Need to comment code
Rongimclient.recordnotificationevent (ID);
Rongim.getinstance (). Getrongimclient (). Clearnotifications ();
6 Push manifest Configuration
Previously old manifest's push-related broadcast services needed to be removed. Change to a new
7 Interface Call Issues
Rongim.getinstance (). Getrongimclient (). XXX method is obsolete and deprecated
In the future code, direct Rongim.getinstance (). XXX
For example:
Old
Rongim.getinstance (). Getrongimclient (). sendMessage
New
Rongim.getinstance (). sendMessage
8 Connect connection to determine the problem
Previously possible to determine if there are instances of Rongim and rongimclient and to determine and connect the cloud service-side connected status people will write like this.
if (rongim.getinstance () = null && rongim.getinstance (). Getrongimclient ()! = null) {}
But after 2.6.0, it's not recommended to write like this.
Direct access to the cloud connection state of the enumeration can be judged, the following wording
if (RongIM.getInstance().getCurrentConnectionStatus() == ConnectionStatus.CONNECTED) { }
The above eight points is the author of the resolution of the compilation error error of the class may be many but the repetition is these 1 3 4 of these three points of the problem
Upgrade 2.6.0stable interface related changes and possible errors encountered