Compare commits
244 Commits
2.0.0
...
3.8.3-patc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8beb75eb75 | ||
|
|
ab67f7fa10 | ||
|
|
c2bf30e268 | ||
|
|
a9567886b4 | ||
|
|
78979b424b | ||
|
|
95ececeba0 | ||
|
|
d02be57c1e | ||
|
|
239e111ee4 | ||
|
|
5d88b4e5d1 | ||
|
|
fb56f7747a | ||
|
|
b534ef0fb6 | ||
|
|
91b0f4eb00 | ||
|
|
bd210e74cb | ||
|
|
0acd81bd70 | ||
|
|
6a446a7b33 | ||
|
|
9f57971ee9 | ||
|
|
29b43d03ac | ||
|
|
cade0091a7 | ||
|
|
d90bb33764 | ||
|
|
8c64af6798 | ||
|
|
c10dabc7e8 | ||
|
|
ff25636516 | ||
|
|
43d3f05d4d | ||
|
|
3b8ec30625 | ||
|
|
44fe1a3210 | ||
|
|
9b11686dac | ||
|
|
1764da125b | ||
|
|
bf4cdf0754 | ||
|
|
45cd497d94 | ||
|
|
1db776e23d | ||
|
|
98227756df | ||
|
|
da148f78e3 | ||
|
|
883627f077 | ||
|
|
50f8350987 | ||
|
|
d098a50eaa | ||
|
|
9e50ecf341 | ||
|
|
9aa861ff74 | ||
|
|
cfadcc5e35 | ||
|
|
8b4b21e18d | ||
|
|
2814122ba4 | ||
|
|
2e94254192 | ||
|
|
a9573dbc63 | ||
|
|
92dd3adad5 | ||
|
|
ebae12f11d | ||
|
|
0dec034a55 | ||
|
|
2b3f062e5c | ||
|
|
a4b52f5895 | ||
|
|
bf9cd3ca21 | ||
|
|
0e1473ff0f | ||
|
|
7e1969d8ad | ||
|
|
e6b479726b | ||
|
|
2aec080e2f | ||
|
|
0ef41147fd | ||
|
|
cd506801cf | ||
|
|
2cafa6bab8 | ||
|
|
ceba9e827f | ||
|
|
4fef487562 | ||
|
|
dc61665f13 | ||
|
|
67251ae7ea | ||
|
|
908d7dd7e7 | ||
|
|
d07495fff6 | ||
|
|
2f8b019d83 | ||
|
|
4a72a37e2b | ||
|
|
b6a71d0b6f | ||
|
|
627ee54a67 | ||
|
|
cc6d164985 | ||
|
|
29b66de9bf | ||
|
|
d419351170 | ||
|
|
8cd7278b50 | ||
|
|
46cc7ff229 | ||
|
|
1356f13fb3 | ||
|
|
1c7f1e7c19 | ||
|
|
034f95e96e | ||
|
|
946474ad02 | ||
|
|
6bd8ec0d2b | ||
|
|
de511cf90d | ||
|
|
a9f2e267cf | ||
|
|
642cc61a2e | ||
|
|
de8c192055 | ||
|
|
05cb6c430c | ||
|
|
b07d104799 | ||
|
|
207e0807e9 | ||
|
|
373e4ddc82 | ||
|
|
b3c0b16092 | ||
|
|
8c50207f7c | ||
|
|
3bf9570d8d | ||
|
|
2a8a6ff7d9 | ||
|
|
9c8b9990c9 | ||
|
|
705863ba66 | ||
|
|
fd39b328bc | ||
|
|
90b96cb413 | ||
|
|
7894327b2c | ||
|
|
96e90d3c0a | ||
|
|
8cc844a408 | ||
|
|
9856ac8281 | ||
|
|
c9fd5d6dfb | ||
|
|
056581f52e | ||
|
|
af0ca0932f | ||
|
|
c0618458fa | ||
|
|
27eb0f78d2 | ||
|
|
169da36d0b | ||
|
|
6bd36c424a | ||
|
|
7995c4af1d | ||
|
|
5bdb9879a7 | ||
|
|
79cbae718c | ||
|
|
61fb9b7dd9 | ||
|
|
bd364ea2fd | ||
|
|
d43259d171 | ||
|
|
ce0c6ff832 | ||
|
|
1f6312d9d3 | ||
|
|
63e5ecf896 | ||
|
|
70a46ed151 | ||
|
|
f04d45f6b8 | ||
|
|
80c79d0fc6 | ||
|
|
4d8ba65f9b | ||
|
|
9df556b837 | ||
|
|
96d6b755cd | ||
|
|
3af726a6f7 | ||
|
|
041d6656bc | ||
|
|
43afb8775a | ||
|
|
39727feb8a | ||
|
|
c6d1669bdd | ||
|
|
02202051e1 | ||
|
|
d0a4530314 | ||
|
|
958c118e84 | ||
|
|
cdef7ffda8 | ||
|
|
bac4bd0884 | ||
|
|
377b07ef05 | ||
|
|
025487fbf3 | ||
|
|
ba3767da42 | ||
|
|
fc6fd3dd93 | ||
|
|
c6d9815e64 | ||
|
|
8e0c736d29 | ||
|
|
15854a2c27 | ||
|
|
3e1ee249c9 | ||
|
|
29eac1bf91 | ||
|
|
bea820ff27 | ||
|
|
a85062ce79 | ||
|
|
98b2774dc1 | ||
|
|
e823df62a8 | ||
|
|
2c40b626e4 | ||
|
|
3b5f47c9f0 | ||
|
|
4c540fbff5 | ||
|
|
b8a51374a3 | ||
|
|
099cb9849a | ||
|
|
025334d32f | ||
|
|
5adc50b963 | ||
|
|
ebbe5c882f | ||
|
|
eb3361c4b3 | ||
|
|
9c5aa56609 | ||
|
|
3e03460300 | ||
|
|
788ab524c2 | ||
|
|
eed59f468c | ||
|
|
d758f3fca1 | ||
|
|
b8ee9276a2 | ||
|
|
a77c86e87a | ||
|
|
c99d1e4d67 | ||
|
|
b53d4dfcfd | ||
|
|
bb49d6b27a | ||
|
|
2b78f83b20 | ||
|
|
38a899d32c | ||
|
|
0a0635bb71 | ||
|
|
c44575ec0e | ||
|
|
14624c717b | ||
|
|
0900df2aa2 | ||
|
|
cd06c3bb5a | ||
|
|
a6aea5496a | ||
|
|
72111053bd | ||
|
|
18f099c437 | ||
|
|
cff0a4cce2 | ||
|
|
e415961d64 | ||
|
|
b3aebeb318 | ||
|
|
c76bfeb07a | ||
|
|
a9343bf892 | ||
|
|
bf354c4103 | ||
|
|
644c52ae0e | ||
|
|
80048bcd18 | ||
|
|
cc6c1bdc22 | ||
|
|
7233b2e298 | ||
|
|
cd61ebba7f | ||
|
|
3a294dd856 | ||
|
|
45e0c82ea3 | ||
|
|
2de606d13e | ||
|
|
7a68e13398 | ||
|
|
4132338633 | ||
|
|
485bf58f14 | ||
|
|
6ad47216fb | ||
|
|
3c62315cfd | ||
|
|
7247f6b982 | ||
|
|
6a771f8035 | ||
|
|
4726055b6f | ||
|
|
2a9d4a0587 | ||
|
|
cce41e0991 | ||
|
|
599c25b099 | ||
|
|
6c3311cce1 | ||
|
|
9a359ca9a0 | ||
|
|
cc2211c36d | ||
|
|
ccf4d4fec1 | ||
|
|
0b8762a754 | ||
|
|
28a911022c | ||
|
|
996281e49a | ||
|
|
e2b546f400 | ||
|
|
8abc8e4399 | ||
|
|
ed20b4915a | ||
|
|
8b1f4dc320 | ||
|
|
f7416290fb | ||
|
|
f0b28099bf | ||
|
|
d5d11af7ce | ||
|
|
9cd717c67c | ||
|
|
c7218cb94c | ||
|
|
e4c78e0106 | ||
|
|
7457f182f3 | ||
|
|
952cb82417 | ||
|
|
3cb2c6d514 | ||
|
|
90be2f74ac | ||
|
|
53ef6c2173 | ||
|
|
373171aded | ||
|
|
58702fcbaf | ||
|
|
8b8c9d5923 | ||
|
|
d5e3947878 | ||
|
|
6edf9b74fa | ||
|
|
fcc8373560 | ||
|
|
7e8d72929a | ||
|
|
03fa70c585 | ||
|
|
8b4a35e6b7 | ||
|
|
71897bcb4e | ||
|
|
57340e52a7 | ||
|
|
197f0b482f | ||
|
|
e009224256 | ||
|
|
ad0563aee4 | ||
|
|
d120312ac9 | ||
|
|
d64b426c90 | ||
|
|
3a845dc40b | ||
|
|
700265c685 | ||
|
|
73b9eb776f | ||
|
|
372e573ea0 | ||
|
|
8ea08f9ce6 | ||
|
|
40b65f52a5 | ||
|
|
6c0676fbe5 | ||
|
|
80152e2314 | ||
|
|
2381d26729 | ||
|
|
b25f0d8547 | ||
|
|
f4e7eaf50e | ||
|
|
f40d4148a8 |
15
.idea/flutter_openim_sdk.iml
generated
@@ -15,6 +15,21 @@
|
||||
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/.dart_tool" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/.pub" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/build" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/.pub" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/.dart_tool" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/build" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/.pub" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/.dart_tool" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/build" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/.dart_tool" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/.pub" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/build" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/build" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/.pub" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/.dart_tool" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/.dart_tool" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/.pub" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/ios/.symlinks/plugins/flutter_openim_sdk/example/build" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
|
||||
41
.idea/libraries/Dart_SDK.xml
generated
@@ -1,26 +1,27 @@
|
||||
<component name="libraryTable">
|
||||
<library name="Dart SDK">
|
||||
<CLASSES>
|
||||
<root url="file://$USER_HOME$/Development/flutter/bin/cache/dart-sdk/lib/async" />
|
||||
<root url="file://$USER_HOME$/Development/flutter/bin/cache/dart-sdk/lib/cli" />
|
||||
<root url="file://$USER_HOME$/Development/flutter/bin/cache/dart-sdk/lib/collection" />
|
||||
<root url="file://$USER_HOME$/Development/flutter/bin/cache/dart-sdk/lib/convert" />
|
||||
<root url="file://$USER_HOME$/Development/flutter/bin/cache/dart-sdk/lib/core" />
|
||||
<root url="file://$USER_HOME$/Development/flutter/bin/cache/dart-sdk/lib/developer" />
|
||||
<root url="file://$USER_HOME$/Development/flutter/bin/cache/dart-sdk/lib/ffi" />
|
||||
<root url="file://$USER_HOME$/Development/flutter/bin/cache/dart-sdk/lib/html" />
|
||||
<root url="file://$USER_HOME$/Development/flutter/bin/cache/dart-sdk/lib/indexed_db" />
|
||||
<root url="file://$USER_HOME$/Development/flutter/bin/cache/dart-sdk/lib/io" />
|
||||
<root url="file://$USER_HOME$/Development/flutter/bin/cache/dart-sdk/lib/isolate" />
|
||||
<root url="file://$USER_HOME$/Development/flutter/bin/cache/dart-sdk/lib/js" />
|
||||
<root url="file://$USER_HOME$/Development/flutter/bin/cache/dart-sdk/lib/js_util" />
|
||||
<root url="file://$USER_HOME$/Development/flutter/bin/cache/dart-sdk/lib/math" />
|
||||
<root url="file://$USER_HOME$/Development/flutter/bin/cache/dart-sdk/lib/mirrors" />
|
||||
<root url="file://$USER_HOME$/Development/flutter/bin/cache/dart-sdk/lib/svg" />
|
||||
<root url="file://$USER_HOME$/Development/flutter/bin/cache/dart-sdk/lib/typed_data" />
|
||||
<root url="file://$USER_HOME$/Development/flutter/bin/cache/dart-sdk/lib/web_audio" />
|
||||
<root url="file://$USER_HOME$/Development/flutter/bin/cache/dart-sdk/lib/web_gl" />
|
||||
<root url="file://$USER_HOME$/Development/flutter/bin/cache/dart-sdk/lib/web_sql" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/async" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/cli" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/collection" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/convert" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/core" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/developer" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/ffi" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/html" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/indexed_db" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/io" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/isolate" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/js" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/js_interop" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/js_interop_unsafe" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/js_util" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/math" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/mirrors" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/svg" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/typed_data" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/web_audio" />
|
||||
<root url="file://$PROJECT_DIR$/../../install/flutter_sdk/bin/cache/dart-sdk/lib/web_gl" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
|
||||
2
.idea/misc.xml
generated
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="FrameworkDetectionExcludesConfiguration">
|
||||
<type id="android" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Android API 25 Platform" project-jdk-type="Android SDK" />
|
||||
</project>
|
||||
1
.idea/modules.xml
generated
@@ -3,6 +3,7 @@
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/flutter_openim_sdk.iml" filepath="$PROJECT_DIR$/.idea/flutter_openim_sdk.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/android/flutter_openim_sdk_android.iml" filepath="$PROJECT_DIR$/android/flutter_openim_sdk_android.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
311
CHANGELOG.md
@@ -1,3 +1,292 @@
|
||||
## 3.8.3+3
|
||||
|
||||
- [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.8.3-patch.3)
|
||||
|
||||
## 3.8.2
|
||||
|
||||
- [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.8.2)
|
||||
|
||||
## 3.8.1+2
|
||||
|
||||
- [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.8.1)
|
||||
|
||||
## 3.8.1+1
|
||||
|
||||
- [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.8.1)
|
||||
|
||||
## 3.8.1
|
||||
|
||||
- [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.8.1)
|
||||
|
||||
## 3.8.1-rc.0
|
||||
|
||||
- [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.8.1-rc.0)
|
||||
|
||||
## 3.8.0
|
||||
|
||||
- [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.8.0)
|
||||
|
||||
## 3.8.0-rc.16
|
||||
|
||||
- [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.8.0-rc.16)
|
||||
|
||||
## 3.5.1
|
||||
|
||||
- [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.5.1)
|
||||
|
||||
## 3.5.1-alpha.7
|
||||
|
||||
- [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.5.1-alpha.7)
|
||||
|
||||
## 3.5.1-alpha.2
|
||||
|
||||
- [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.5.1-alpha.2)
|
||||
|
||||
## 3.5.0-rc.1
|
||||
|
||||
- [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.5.0-rc.1)
|
||||
|
||||
## 3.4.0+1
|
||||
|
||||
- Adjust some fields and APIs.
|
||||
|
||||
## 3.4.0
|
||||
|
||||
- [Bug fixes and performance enhancements.](https://github.com/openimsdk/openim-sdk-core/releases/tag/v3.4.0)
|
||||
|
||||
## 3.3.0
|
||||
|
||||
- [Bug fixes and performance enhancements.](https://github.com/OpenIMSDK/openim-sdk-core/releases/tag/v3.3.0)
|
||||
|
||||
## 3.0.0
|
||||
|
||||
- The super update is not compatible with the previous version
|
||||
|
||||
|
||||
## 2.3.5+4
|
||||
|
||||
- Fix bug
|
||||
|
||||
## 2.3.5+3
|
||||
|
||||
- Fix bug for signaling
|
||||
- Add networkChanged method
|
||||
- Add setListenerForService method
|
||||
|
||||
## 2.3.5+2
|
||||
|
||||
- Add onRecvMessageExtensionsAdded method for OnAdvancedMsgListener
|
||||
- Add addMessageReactionExtensions method for MessageManager
|
||||
- Add getMessageListSomeReactionExtensions method for MessageManager
|
||||
- Add isExternal field for MessageManager
|
||||
- Add isReact method field MessageManager
|
||||
- Add params isExternalExtensions for initSDK
|
||||
|
||||
## 2.3.5+1
|
||||
|
||||
- Add birthTime for UserInfo
|
||||
- Add setMessageKvInfoListener method for MessageManager
|
||||
- Add setMessageReactionExtensions method for MessageManager
|
||||
- Add deleteMessageReactionExtensions method for MessageManager
|
||||
- Add getMessageListReactionExtensions method for MessageManager
|
||||
- Add onRecvMessageExtensionsChanged method for OnAdvancedMsgListener
|
||||
- Add onRecvMessageExtensionsDeleted method for OnAdvancedMsgListener
|
||||
- Add OnMessageKvInfoListener listener
|
||||
- Add class KeyValue
|
||||
- Add class UserExInfo
|
||||
- Add class SingleTypeKeyInfoSum
|
||||
- Add class MessageKv
|
||||
- Add class TypeKeySetResult
|
||||
- Add class MessageTypeKeyMapping
|
||||
|
||||
## 2.3.5
|
||||
|
||||
- Add setCustomBusinessListener method for MessageManager
|
||||
- Add OnCustomBusinessListener listener
|
||||
- Add message encryption config
|
||||
- Add message compression config
|
||||
- Add setGroupMemberInfo for GroupManager
|
||||
|
||||
## 2.3.4+6
|
||||
|
||||
- Add setAppBackgroundStatus method for IMManager
|
||||
|
||||
## 2.3.4+5
|
||||
|
||||
- Fix bug
|
||||
- Add setOneConversationBurnDuration method for ConversationManager
|
||||
- Add signalingSendCustomSignal method for SignalingManager
|
||||
- Add onReceiveCustomSignal listener for OnSignalingListener
|
||||
- Add burnDuration field for ConversationInfo
|
||||
- Add burnDuration field for AttachedInfoElem
|
||||
|
||||
## 2.3.4+4
|
||||
|
||||
- Fix bug
|
||||
- Replace maven repository address
|
||||
|
||||
## 2.3.4+3
|
||||
|
||||
- Fix bug
|
||||
|
||||
## 2.3.4+2
|
||||
|
||||
- Add streamChangedEvent listener for OnSignalingListener
|
||||
- Add signalingJoinMeeting method for SignalingManager
|
||||
- Add signalingCreateMeeting method for SignalingManager
|
||||
- Add signalingOperateStream method for SignalingManager
|
||||
- Add signalingGetMeetings method for SignalingManager
|
||||
- Add signalingCloseRoom method for SignalingManager
|
||||
- Add signalingUpdateMeetingInfo method for SignalingManager
|
||||
- Update findMessageList method
|
||||
- Add sendMessageNotOss method for MessageManager
|
||||
- Add createImageMessageByURL method for MessageManager
|
||||
- Add createSoundMessageByURL method for MessageManager
|
||||
- Add createVideoMessageByURL method for MessageManager
|
||||
- Add createFileMessageByURL method for MessageManager
|
||||
|
||||
## 2.3.4+1
|
||||
|
||||
- Add signalingGetTokenByRoomID method for SignalingManager
|
||||
|
||||
## 2.3.4
|
||||
|
||||
- Fix bug
|
||||
- Add signalGetRoomByGroupID method for SignalingManager
|
||||
- Add class RoomCallingInfo
|
||||
- Add onRoomParticipantConnected listener for OnSignalingListener
|
||||
- Add onRoomParticipantDisconnected listener for OnSignalingListener
|
||||
- Add busyLineUserIDList field for SignalingCertificate
|
||||
|
||||
## 2.3.3
|
||||
|
||||
- Fix bug
|
||||
|
||||
## 2.3.2
|
||||
|
||||
- Fix bug
|
||||
- Add createAdvancedQuoteMessage method for MessageManager
|
||||
- Add createAdvancedTextMessage method for MessageManager
|
||||
|
||||
## 2.3.0+1
|
||||
|
||||
- Fix bug
|
||||
- enum class MessageType new add customMsgNotTriggerConversation
|
||||
- enum class MessageType new add customMsgOnlineOnly
|
||||
- class IMManager new add updateFcmToken method
|
||||
- class MessageManager new add findMessageList method
|
||||
- initSDK method add encryptionKey param
|
||||
|
||||
## 2.3.0
|
||||
|
||||
- Fix bug
|
||||
- Super group
|
||||
- Add setGroupLookMemberInfo method for GroupManager
|
||||
- Add setGroupApplyMemberFriend method for GroupManager
|
||||
- Add getGroupOwnerAndAdmin method for GroupManager
|
||||
- Add revokeMessageV2 method for MessageManager
|
||||
- Add lookMemberInfo field for GroupInfo
|
||||
- Add applyMemberFriend field for GroupInfo
|
||||
- Add notificationUpdateTime field for GroupInfo
|
||||
- Add notificationUserID field for GroupInfo
|
||||
- Add inviterUserID field for GroupMembersInfo
|
||||
- Add joinSource field for joinGroup method
|
||||
- Add advanced revoke type
|
||||
- Add recvMessageRevokedV2 callback for OnAdvancedMsgListener
|
||||
- Add joinSource field for GroupApplicationInfo
|
||||
- Add inviterUserID field for GroupApplicationInfo
|
||||
- Add getAdvancedHistoryMessageList method for MessageManager
|
||||
- Add searchGroupMembers method for GroupManager
|
||||
|
||||
## 2.2.0
|
||||
|
||||
1.Fix bug </br>
|
||||
|
||||
## 2.1.0+1
|
||||
|
||||
1.Add setGroupVerification method </br>
|
||||
|
||||
## 2.1.0
|
||||
|
||||
1.Fix bug </br>
|
||||
2.Add getGroupMemberListByJoinTime method </br>
|
||||
3.Add groupMemberCount field </br>
|
||||
|
||||
## 2.0.9+3
|
||||
|
||||
1.Fix bug </br>
|
||||
2.Add setGlobalRecvMessageOpt method </br>
|
||||
|
||||
## 2.0.9+2
|
||||
|
||||
1.Fix bug </br>
|
||||
2.Add searchOrganization method </br>
|
||||
3.Add searchFriends method </br>
|
||||
4.Add getDepartmentInfo method </br>
|
||||
5.Add setGroupMemberRoleLevel method </br>
|
||||
|
||||
## 2.0.9+1
|
||||
|
||||
1.Fix bug </br>
|
||||
|
||||
## 2.0.9
|
||||
|
||||
1.Fix bug </br>
|
||||
2.Add organization fuction </br>
|
||||
3.Add uploadImage method </br>
|
||||
4.Fix login slow bug </br>
|
||||
|
||||
## 2.0.8
|
||||
|
||||
1.Fix bug </br>
|
||||
2.Change the sdk maven address </br>
|
||||
3.Sync go IM sdk version number </br>
|
||||
|
||||
## 2.0.0+6
|
||||
|
||||
1.Fix bug </br>
|
||||
2.Adapter ios emulator </br>
|
||||
3.Add modify group nickname </br>
|
||||
4.Update at message </br>
|
||||
5.ConverstaionInfo new add isNotInGroup field</br>
|
||||
6.Add at type </br>
|
||||
7.Add work moments </br>
|
||||
8.Add global search </br>
|
||||
9.Add getHistoryMessageListReverse method </br>
|
||||
10.Add getAtAllTag method </br>
|
||||
11.Add resetConversationGroupAtType method </br>
|
||||
12.Add searchGroups method </br>
|
||||
|
||||
## 2.0.0+5
|
||||
|
||||
1.Add notification parse </br>
|
||||
2.Add deleteConversationFromLocalAndSvr method </br>
|
||||
3.Add deleteMessageFromLocalAndSvr method </br>
|
||||
4.Add deleteAllMsgFromLocal method </br>
|
||||
5.Add deleteAllMsgFromLocalAndSvr method </br>
|
||||
6.Add clearC2CHistoryMessageFromLocalAndSvr method </br>
|
||||
7.Add clearGroupHistoryMessageFromLocalAndSvr method </br>
|
||||
8.Add markMessageAsReadByConID method </br>
|
||||
9.Add wakeUp method </br>
|
||||
10.Add deleteAllConversationFromLocal method </br>
|
||||
|
||||
## 2.0.0+4
|
||||
|
||||
1.Add dismiss group </br>
|
||||
2.Add search local message </br>
|
||||
3.Add private chat </br>
|
||||
4.Add group mute
|
||||
|
||||
## 2.0.0+3
|
||||
|
||||
1.Fix bug </br>
|
||||
|
||||
## 2.0.0+2
|
||||
|
||||
1.Fix some one crash </br>
|
||||
2.Add signaling function </br>
|
||||
3.Add group have read receipt
|
||||
|
||||
## 2.0.0+1
|
||||
|
||||
1.Fix multi-terminal synchronization bug fix for retracted messages </br>
|
||||
@@ -23,13 +312,13 @@
|
||||
## 1.0.8
|
||||
|
||||
1.Upgrade sdk to 1.4.4. </br>
|
||||
2.New and changed conversation return changed data and no longer return all data. </br>
|
||||
3.New conversation paging method.
|
||||
2.Add changed conversation return changed data and no longer return all data. </br>
|
||||
3.Add conversation paging method.
|
||||
|
||||
## 1.0.7
|
||||
|
||||
Upgrade sdk to 1.3.4 </br>
|
||||
New add method setConversationRecvMessageOpt and getConversationRecvMessageOpt
|
||||
Add method setConversationRecvMessageOpt and getConversationRecvMessageOpt
|
||||
|
||||
## 1.0.6
|
||||
|
||||
@@ -67,36 +356,45 @@ Fix bug
|
||||
## 0.0.9+5
|
||||
|
||||
1. Android upgrade sdk to 0.0.17 </br>
|
||||
2. New add createFileMessageFromFullPath method
|
||||
2. Add createFileMessageFromFullPath method
|
||||
|
||||
## 0.0.9+4
|
||||
|
||||
Fix ios friendship params error
|
||||
|
||||
## 0.0.9+3
|
||||
|
||||
Ios native remove method 'removeAdvancedMsgListener'
|
||||
|
||||
## 0.0.9+2
|
||||
|
||||
1. Fix bug
|
||||
2. Upgrade sdk
|
||||
|
||||
## 0.0.9+1
|
||||
|
||||
Fix bug
|
||||
|
||||
## 0.0.9
|
||||
|
||||
Add ios support
|
||||
|
||||
## 0.0.8
|
||||
|
||||
Upgrade sdk to 0.0.14 </br>
|
||||
Sending a message adds a retry mechanism
|
||||
|
||||
## 0.0.7
|
||||
|
||||
1. Add a new method to obtain conversation id based on user id or group id </br>
|
||||
2. Modify the type of conversation manager input parameter sessionType to int
|
||||
|
||||
## 0.0.6
|
||||
|
||||
Fix bug
|
||||
|
||||
## 0.0.5
|
||||
|
||||
Upgrade sdk </br>
|
||||
Fix message error bug
|
||||
|
||||
@@ -105,11 +403,14 @@ Fix message error bug
|
||||
Replace the input parameters of the createCustomMessage method from Uint8List to Map
|
||||
|
||||
## 0.0.3
|
||||
|
||||
Upgrade sdk </br>
|
||||
Fix bug </br>
|
||||
|
||||
## 0.0.2
|
||||
1. Move the markSingleMessageHasRead, markGroupMessageHasRead and getTotalUnreadMsgCount methods from the MessageManager class to the ConversationManager class. </br>
|
||||
|
||||
1. Move the markSingleMessageHasRead, markGroupMessageHasRead and getTotalUnreadMsgCount methods
|
||||
from the MessageManager class to the ConversationManager class. </br>
|
||||
2. Modify the parameters of the setFriendInfo method. </br>
|
||||
3. Modify the parameters of the createGroup and setGroupInfo methods.
|
||||
|
||||
|
||||
214
LICENSE
@@ -1,21 +1,201 @@
|
||||
MIT License
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
Copyright (c) 2018 OpenIM Corporation
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
1. Definitions.
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
163
README.md
@@ -1,23 +1,158 @@
|
||||
# flutter_openim_sdk
|
||||
[](https://pub.flutter-io.cn/packages/flutter_openim_sdk)
|
||||
[](https://pub.dev/packages/flutter_openim_sdk)
|
||||
[](https://github.com/OpenIMSDK/Open-IM-SDK-Flutter/blob/main/LICENSE)
|
||||
# Flutter Client SDK for OpenIM 👨💻💬
|
||||
|
||||
A flutter im plugin for android and ios.
|
||||
|
||||
#### [中文文档](README.zh-cn.md) | [demo(体验app源代码)](https://github.com/OpenIMSDK/Open-IM-Flutter-Demo.git) | [widget(聊天UI库)](https://github.com/hrxiang/flutter_openim_widget.git)
|
||||
|
||||

|
||||
Use this SDK to add instant messaging capabilities to your Flutter app. By connecting to a self-hosted [OpenIM](https://www.openim.online/) server, you can quickly integrate instant messaging capabilities into your app with just a few lines of code.
|
||||
|
||||
|
||||
The underlying SDK core is implemented in [OpenIM SDK Core](https://github.com/openimsdk/openim-sdk-core). Using [gomobile](https://github.com/golang/mobile), it can be compiled into an AAR file for Android integration. Android interacts with the [OpenIM SDK Core](https://github.com/openimsdk/openim-sdk-core) through JSON, and the SDK exposes a re-encapsulated API for easy usage. In terms of data storage, Android utilizes the SQLite layer provided internally by the [OpenIM SDK Core](https://github.com/openimsdk/openim-sdk-core).
|
||||
|
||||
## Getting Started
|
||||
The underlying SDK core is implemented in [OpenIM SDK Core](https://github.com/openimsdk/openim-sdk-core). Using [gomobile](https://github.com/golang/mobile), it can be compiled into an XCFramework for iOS integration. iOS interacts with the [OpenIM SDK Core](https://github.com/openimsdk/openim-sdk-core) through JSON, and the SDK exposes a re-encapsulated API for easy usage. In terms of data storage, iOS utilizes the SQLite layer provided internally by the [OpenIM SDK Core](https://github.com/openimsdk/openim-sdk-core).
|
||||
|
||||
Based on the above AAR and XCFramework packages, the IM SDK for Flutter is encapsulated through the Flutter plug-in.
|
||||
|
||||
## Documentation 📚
|
||||
|
||||
Visit [https://docs.openim.io/](https://docs.openim.io/) for detailed documentation and guides.
|
||||
|
||||
For the SDK reference, see [https://docs.openim.io/sdks/quickstart/flutter](https://docs.openim.io/sdks/quickstart/flutter).
|
||||
|
||||
## Installation 💻
|
||||
### Adding Dependencies
|
||||
```dart
|
||||
flutter_openim_sdk: lastest
|
||||
```
|
||||
|
||||
## Usage 🚀
|
||||
|
||||
The following examples demonstrate how to use the SDK.
|
||||
### Importing the SDK
|
||||
|
||||
```dart
|
||||
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
||||
```
|
||||
### Initialize
|
||||
```
|
||||
final success = await OpenIM.iMManager.initSDK(
|
||||
platform: 0, // Platform, referring to the IMPlatform class.
|
||||
apiAddr: "", // SDK's API interface address.
|
||||
wsAddr: "", // SDK's WebSocket address.
|
||||
dataDir: "", // Data storage path. For example, you can use getApplicationDocumentsDirectory() to get a path.
|
||||
logLevel: 6, // Log level (default value is 6).
|
||||
listener: OnConnectListener(
|
||||
onConnectSuccess: () {
|
||||
// Successfully connected to the server.
|
||||
},
|
||||
onConnecting: () {
|
||||
// Connecting to the server, suitable for showing a "Connecting" status on the UI.
|
||||
},
|
||||
onConnectFailed: (code, errorMsg) {
|
||||
// Failed to connect to the server, you can notify the user that the current network connection is not available.
|
||||
},
|
||||
onUserSigExpired: () {
|
||||
// User's login token (UserSig) has expired, prompting the user to log in again with a new token.
|
||||
},
|
||||
onKickedOffline: () {
|
||||
// The current user has been kicked offline, and you can prompt the user to log in again with a message like "You have been logged in on another device. Do you want to log in again?"
|
||||
},
|
||||
),
|
||||
);
|
||||
|
||||
```
|
||||
### Logging In and Listening for Connection Status
|
||||
|
||||
> Note1: You need to [deploy](https://github.com/openimsdk/open-im-server#rocket-quick-start) OpenIM Server first, the default port of OpenIM Server is 10001, 10002.
|
||||
> Note2: You need to set up the listeners first and then log in.
|
||||
|
||||
|
||||
#### 1,Add dependency in yaml
|
||||
```dart
|
||||
// Set listener
|
||||
OpenIM.iMManager
|
||||
//
|
||||
..userManager.setUserListener(OnUserListener(
|
||||
))
|
||||
// Add message listener (remove when not in use)
|
||||
..messageManager.setAdvancedMsgListener(OnAdvancedMsgListener(
|
||||
))
|
||||
|
||||
flutter_openim_sdk: latest
|
||||
// Set up message sending progress listener
|
||||
..messageManager.setMsgSendProgressListener(OnMsgSendProgressListener(
|
||||
))
|
||||
..messageManager.setCustomBusinessListener(
|
||||
)
|
||||
// Set up friend relationship listener
|
||||
..friendshipManager.setFriendshipListener(OnFriendshipListener(
|
||||
))
|
||||
|
||||
#### 2,Import package
|
||||
// Set up conversation listener
|
||||
..conversationManager.setConversationListener(OnConversationListener(
|
||||
))
|
||||
|
||||
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
||||
// Set up group listener
|
||||
..groupManager.setGroupListener(OnGroupListener(
|
||||
));
|
||||
|
||||
// Retrieve the profile of the currently logged-in user
|
||||
final userInfo = await OpenIM.iMManager.login(
|
||||
userID: "", // userID is obtained from your own business server
|
||||
token: "", // The token should be acquired by your business server by exchanging with OpenIM server based on a secret key
|
||||
);
|
||||
|
||||
```
|
||||
|
||||
To log into the IM server, you need to create an account and obtain a user ID and token. Refer to the [access token documentation](https://doc.rentsoft.cn/restapi/userManagement/userRegister) for details.
|
||||
|
||||
### Receiving and Sending Messages 💬
|
||||
|
||||
OpenIM makes it easy to send and receive messages. By default, there is no restriction on having a friend relationship to send messages (although you can configure other policies on the server). If you know the user ID of the recipient, you can conveniently send a message to them.
|
||||
|
||||
```dart
|
||||
//Send
|
||||
OpenIM.iMManager.messageManager.sendMessage(
|
||||
message: await OpenIM.iMManager.messageManager.createTextMessage(
|
||||
text: 'hello openim',
|
||||
),
|
||||
userID: userID
|
||||
).catchError((error, _){
|
||||
// Message sent successfully ✉️
|
||||
|
||||
} )
|
||||
.whenComplete(() {
|
||||
// Failed to send message ❌
|
||||
|
||||
});
|
||||
|
||||
//Receive
|
||||
OpenIM.iMManager.messageManager.setAdvancedMsgListener(OnAdvancedMsgListener(
|
||||
onRecvNewMessage:(Message msg) {
|
||||
// Received new message 📨
|
||||
|
||||
}
|
||||
))
|
||||
```
|
||||
|
||||
## Examples 🌟
|
||||
|
||||
You can find a demo Flutter app that uses the SDK in the [open-im-flutter-demo](https://github.com/openimsdk/open-im-flutter-demo) repository.
|
||||
|
||||
|
||||
## Community :busts_in_silhouette:
|
||||
|
||||
- 📚 [OpenIM Community](https://github.com/OpenIMSDK/community)
|
||||
- 💕 [OpenIM Interest Group](https://github.com/Openim-sigs)
|
||||
- 🚀 [Join our Slack community](https://join.slack.com/t/openimsdk/shared_invite/zt-2ijy1ys1f-O0aEDCr7ExRZ7mwsHAVg9A)
|
||||
- :eyes: [Join our wechat (微信群)](https://openim-1253691595.cos.ap-nanjing.myqcloud.com/WechatIMG20.jpeg)
|
||||
|
||||
## Community Meetings :calendar:
|
||||
|
||||
We want anyone to get involved in our community and contributing code, we offer gifts and rewards, and we welcome you to join us every Thursday night.
|
||||
|
||||
Our conference is in the [OpenIM Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q) 🎯, then you can search the Open-IM-Server pipeline to join
|
||||
|
||||
We take notes of each [biweekly meeting](https://github.com/orgs/OpenIMSDK/discussions/categories/meeting) in [GitHub discussions](https://github.com/openimsdk/open-im-server/discussions/categories/meeting), Our historical meeting notes, as well as replays of the meetings are available at [Google Docs :bookmark_tabs:](https://docs.google.com/document/d/1nx8MDpuG74NASx081JcCpxPgDITNTpIIos0DS6Vr9GU/edit?usp=sharing).
|
||||
|
||||
## Who are using OpenIM :eyes:
|
||||
|
||||
Check out our [user case studies](https://github.com/OpenIMSDK/community/blob/main/ADOPTERS.md) page for a list of the project users. Don't hesitate to leave a [📝comment](https://github.com/openimsdk/open-im-server/issues/379) and share your use case.
|
||||
|
||||
## License :page_facing_up:
|
||||
|
||||
OpenIM is licensed under the Apache 2.0 license. See [LICENSE](https://github.com/openimsdk/open-im-server/tree/main/LICENSE) for the full license text.
|
||||
|
||||
986
README.zh-cn.md
@@ -1,984 +1,18 @@
|
||||
## SDK使用步骤
|
||||
# flutter_openim_sdk
|
||||
<img src="https://github.com/OpenIMSDK/OpenIM-Docs/blob/main/docs/images/WechatIMG20.jpeg" alt="image" style="width: 350px; " />
|
||||
|
||||
##### 1,初始化
|
||||
[](https://pub.flutter-io.cn/packages/flutter_openim_sdk)
|
||||
[](https://pub.dev/packages/flutter_openim_sdk)
|
||||
[](https://github.com/OpenIMSDK/Open-IM-SDK-Flutter/blob/main/LICENSE)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.initSDK(
|
||||
platform: 0, // 平台,参照IMPlatform类,
|
||||
apiAddr: "", // SDK的API接口地址。如:http:xxx:10000
|
||||
wsAddr: "", // SDK的web socket地址。如: ws:xxx:17778
|
||||
dataDir: "", // 数据存储路径。如:var apath =(await getApplicationDocumentsDirectory()).path
|
||||
listener: OnConnectListener(
|
||||
onConnectSuccess: () {
|
||||
// 已经成功连接到服务器
|
||||
},
|
||||
onConnecting: () {
|
||||
// 正在连接到服务器,适合在 UI 上展示“正在连接”状态。
|
||||
},
|
||||
onConnectFailed: (code, errorMsg) {
|
||||
// 连接服务器失败,可以提示用户当前网络连接不可用
|
||||
},
|
||||
onUserSigExpired: () {
|
||||
// 登录票据已经过期,请使用新签发的 UserSig 进行登录。
|
||||
},
|
||||
onKickedOffline: () {
|
||||
// 当前用户被踢下线,此时可以 UI 提示用户“您已经在其他端登录了当前账号,是否重新登录?”
|
||||
},
|
||||
),
|
||||
).then((value){
|
||||
if(value == true){
|
||||
// 初始化成功
|
||||
}
|
||||
});
|
||||
```
|
||||
A flutter im plugin for android and ios.
|
||||
|
||||
##### 2,设置监听器
|
||||
#### [demo open source code](https://github.com/OpenIMSDK/Open-IM-Flutter-Demo.git) | [UI library source code](https://github.com/hrxiang/flutter_openim_widget.git)
|
||||
|
||||
```
|
||||
OpenIM.iMManager
|
||||
..userManager.setUserListener(OnUserListener(
|
||||
onSelfInfoUpdated: (userInfo) {
|
||||
// 当前登录用户资料变更回调
|
||||
},
|
||||
))
|
||||
..messageManager.setAdvancedMsgListener(OnAdvancedMsgListener(
|
||||
onRecvNewMessage: (message) {
|
||||
// 收到新消息,界面添加新消息
|
||||
},
|
||||
onRecvMessageRevoked: (messageID) {
|
||||
// 消息成功撤回,从界面移除消息
|
||||
},
|
||||
onRecvC2CReadReceipt: (list) {
|
||||
// 消息被阅读回执,将消息标记为已读
|
||||
},
|
||||
))
|
||||
..messageManager.setMsgSendProgressListener(OnMsgSendProgressListener(
|
||||
onProgress: (messageID, progress) {
|
||||
// 消息发送进度回调
|
||||
},
|
||||
))
|
||||
..friendshipManager.setFriendshipListener(OnFriendshipListener(
|
||||
onFriendApplicationRejected: (applicationInfo) {
|
||||
// 发出或收到的好友申请被拒绝
|
||||
},
|
||||
onFriendApplicationDeleted: (applicationInfo) {
|
||||
// 发出或收到的好友申请被删除
|
||||
},
|
||||
onFriendApplicationAdded: (applicationInfo) {
|
||||
// 发出或收到的好友申请被添加
|
||||
},
|
||||
onFriendApplicationAccepted: (applicationInfo) {
|
||||
// 发出或收到的好友申请已同意
|
||||
},
|
||||
onFriendAdded: (frinedInfo) {
|
||||
// 好友被添加
|
||||
},
|
||||
onFriendDeleted: (frinedInfo) {
|
||||
// 好友被删除
|
||||
},
|
||||
onFriendInfoChanged: (frinedInfo) {
|
||||
// 朋友的资料发生变化
|
||||
},
|
||||
onBlacklistDeleted: (blackInfo) {
|
||||
// 从黑名单删除
|
||||
},
|
||||
onBlacklistAdded: (blackInfo) {
|
||||
// 拉入黑名单
|
||||
},
|
||||
))
|
||||
..conversationManager.setConversationListener(OnConversationListener(
|
||||
onNewConversation: (list) {
|
||||
// 新增会话
|
||||
},
|
||||
onConversationChanged: (list) {
|
||||
// 已添加的会话发送改变
|
||||
},
|
||||
onTotalUnreadMessageCountChanged: (count) {
|
||||
// 未读消息数发送变化
|
||||
},
|
||||
))
|
||||
..groupManager.setGroupListener(OnGroupListener(
|
||||
onGroupMemberInfoChanged: (memberInfo) {
|
||||
// 组成员信息发生变化
|
||||
},
|
||||
onGroupMemberDeleted: (memberInfo) {
|
||||
// 组成员退出
|
||||
},
|
||||
onGroupMemberAdded: (memberInfo) {
|
||||
// 组成员进入
|
||||
},
|
||||
onGroupApplicationRejected: (applicationInfo) {
|
||||
// 发出或收到的组申请被拒绝
|
||||
},
|
||||
onGroupApplicationDeleted: (applicationInfo) {
|
||||
// 发出或收到的组申请被删除
|
||||
},
|
||||
onGroupApplicationAdded: (applicationInfo) {
|
||||
// 发出或收到的组申请有新增
|
||||
},
|
||||
onGroupApplicationAccepted: (applicationInfo) {
|
||||
// 发出或收到的组申请被接受
|
||||
},
|
||||
onJoinedGroupDeleted: (groupInfo) {
|
||||
// 退出群:退出者收到;踢出群:被踢者收到
|
||||
},
|
||||
onJoinedGroupAdded: (groupInfo) {
|
||||
// 创建群: 初始成员收到;邀请进群:被邀请者收到
|
||||
},
|
||||
onGroupInfoChanged: (groupInfo) {
|
||||
// 组资料变更
|
||||
},
|
||||
));
|
||||
```
|
||||
Scan the QR code below to experience the SDK call example Demo
|
||||
|
||||
##### 3,登录
|
||||

|
||||
|
||||
```
|
||||
OpenIM.iMManager.login(
|
||||
uid: "", // uid来自于自身业务服务器
|
||||
token: "", // token需要业务服务器根据secret向OpenIM服务端交换获取
|
||||
).then((userInfo) {
|
||||
// 返回当前登录用户的资料
|
||||
});
|
||||
```
|
||||
# [SDK Documents](https://doc.rentsoft.cn/sdks/quickstart/flutter)
|
||||
|
||||
|
||||
|
||||
## 方法名、参数、返回值说明
|
||||
|
||||
- ##### logout( 登出)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.logout().then((_){
|
||||
// 退出成功
|
||||
});
|
||||
```
|
||||
|
||||
- ##### getLoginUserInfo(获取当前登录用户的资料)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.getLoginUserInfo().then((userInfo){
|
||||
// 当前登录用户的信息
|
||||
});
|
||||
```
|
||||
|
||||
- ##### getLoginUserID(获取当前登录用户的ID)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.getLoginUserID().then((userID){
|
||||
// 当前登录用户的ID
|
||||
});
|
||||
```
|
||||
|
||||
- ##### getUsersInfo(根据用户ID批量获取用户信息)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.userManager.getUsersInfo(
|
||||
uidList: [], // 用户ID集合
|
||||
).then((userInfoList) {
|
||||
// 用户信息列表
|
||||
});
|
||||
```
|
||||
|
||||
- ##### getSelfUserInfo(获取当前登录用户的资料)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.userManager.getSelfUserInfo().then((userInfo){
|
||||
// 返回当前登录用户的资料
|
||||
});
|
||||
```
|
||||
|
||||
- ##### setSelfInfo(修改当前用登录户资料)
|
||||
|
||||
会触发当用户的onSelfInfoUpdated回调,以及好友的onFriendInfoChanged、onConversationChanged回调。
|
||||
|
||||
```
|
||||
OpenIM.iMManager.userManager.setSelfInfo(
|
||||
nickname: '', // 昵称
|
||||
faceURL: '', // 头像
|
||||
gender: 0, // 性别: 男1,女0
|
||||
phoneNumber: '', // 手机号
|
||||
email: '', //邮箱
|
||||
birth: 0, //生日
|
||||
ex: '', // 其他信息
|
||||
);
|
||||
```
|
||||
|
||||
- ##### getAllConversationList(获取所有会话)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.conversationManager.getAllConversationList().then((list) {
|
||||
// List<ConversationInfo> 会话列表
|
||||
});
|
||||
```
|
||||
|
||||
- ##### getConversationListSplit(分页获取会话)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.conversationManager.getConversationListSplit(
|
||||
offset: 0, // 偏移量,如:第1页,offet:0,count:20;第2页:offset:20;
|
||||
count: 0, // 每页数量
|
||||
).then((list) {
|
||||
// List<ConversationInfo> 会话列表
|
||||
});
|
||||
```
|
||||
|
||||
- ##### getOneConversation(获取一个会话,如果不存在会自动创建)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.conversationManager.getOneConversation(
|
||||
sourceID: "", // 如果是单聊值传userID,如果是群聊groupID
|
||||
sessionType: 1, // 如果是单聊值传1,如果是群聊值传2
|
||||
).then((info) {
|
||||
// 会话信息
|
||||
});
|
||||
```
|
||||
|
||||
- ##### getMultipleConversation(根据会话id查询会话)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.conversationManager.getMultipleConversation(
|
||||
conversationIDList: [], // 会话ID集合
|
||||
).then((list) {
|
||||
// 返回与id匹配的会话列表
|
||||
});
|
||||
```
|
||||
|
||||
- ##### deleteConversation(根据会话id删除指定会话)
|
||||
|
||||
会触onTotalUnreadMessageCountChanged回调
|
||||
|
||||
```
|
||||
OpenIM.iMManager.conversationManager.deleteConversation(
|
||||
conversationID: "", // 会话id
|
||||
).then((_) {
|
||||
// 成功
|
||||
}).catchError((_){
|
||||
// 失败
|
||||
});
|
||||
```
|
||||
|
||||
- ##### setConversationDraft(设置会话草稿)
|
||||
|
||||
会触onConversationChanged回调
|
||||
|
||||
```
|
||||
OpenIM.iMManager.conversationManager.setConversationDraft(
|
||||
conversationID: "", // 会话id
|
||||
draftText: "", // 草稿
|
||||
).then((_) {
|
||||
// 成功
|
||||
}).catchError((_){
|
||||
// 失败
|
||||
});
|
||||
```
|
||||
|
||||
- ##### pinConversation(置顶会话)
|
||||
|
||||
会触onConversationChanged回调
|
||||
|
||||
```
|
||||
OpenIM.iMManager.conversationManager.pinConversation(
|
||||
conversationID: "", // 会话id
|
||||
isPinned: true, // true:置顶;false:取消置顶
|
||||
).then((_) {
|
||||
// 成功
|
||||
}).catchError((_){
|
||||
// 失败
|
||||
});
|
||||
```
|
||||
|
||||
- ##### markGroupMessageHasRead(标记群会话已读,清除未读数)
|
||||
|
||||
会触onConversationChanged、onTotalUnreadMessageCountChanged回调
|
||||
|
||||
```
|
||||
OpenIM.iMManager.conversationManager.markGroupMessageHasRead(
|
||||
groupID: "", // 组id
|
||||
);
|
||||
```
|
||||
|
||||
- ##### getTotalUnreadMsgCount(获取未读消息总数)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.conversationManager.getTotalUnreadMsgCount().then((count){
|
||||
// 总数
|
||||
});
|
||||
```
|
||||
|
||||
- ##### getConversationIDBySessionType(查询会话id)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.conversationManager.getConversationIDBySessionType(
|
||||
sourceID: "", // 如果是单聊值传userID,如果是群聊groupID
|
||||
sessionType: 1, // 如果是单聊值传1,如果是群聊值传2
|
||||
).then((conversationID){
|
||||
// 会话ID
|
||||
});
|
||||
```
|
||||
|
||||
- ##### setConversationRecvMessageOpt(设置免打扰模式)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.conversationManager.setConversationRecvMessageOpt(
|
||||
conversationIDList: [], // 会话id列表
|
||||
status: 1, // 1:不接受消息;2:接受在线消息不接受离线消息;0:正常
|
||||
).then((_) {
|
||||
// 成功
|
||||
}).catchError((_){
|
||||
// 失败
|
||||
});
|
||||
```
|
||||
|
||||
- ##### getConversationRecvMessageOpt(查询免打扰状态)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.conversationManager.getConversationRecvMessageOpt(
|
||||
conversationIDList: [], // 会话id列表
|
||||
).then((list) {
|
||||
// 返回列表 [{"conversationId":"single_13922222222","result":0}]
|
||||
// result: 1:不接受消息;2:接受在线消息不接受离线消息;0:正常
|
||||
});
|
||||
```
|
||||
|
||||
- ##### simpleSort(自定义会话排序规则)
|
||||
|
||||
```
|
||||
var list = OpenIM.iMManager.conversationManager.simpleSort([]);// 返回排序好的列表
|
||||
```
|
||||
|
||||
- ##### getFriendsInfo(根据userID查询好友资料)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.friendshipManager.getFriendsInfo(
|
||||
uidList: [], // userId列表
|
||||
).then((list) {
|
||||
// List<UserInfo>
|
||||
});
|
||||
```
|
||||
|
||||
- ##### addFriend(发起好友申请)
|
||||
|
||||
主动申请者收到OnFriendApplicationAdded
|
||||
|
||||
被添加者收到OnFriendApplicationAdded
|
||||
|
||||
```
|
||||
OpenIM.iMManager.friendshipManager.addFriend(
|
||||
uid: "", // 用户id
|
||||
reason: '', // 发起好友申请的描述信息
|
||||
).then((_) {
|
||||
// 成功
|
||||
}).catchError((_){
|
||||
// 失败
|
||||
});
|
||||
```
|
||||
|
||||
- ##### checkFriend(检查是否是好友)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.friendshipManager.checkFriend(
|
||||
uidList: [], // userID 列表
|
||||
).then((list) {
|
||||
// List<FriendshipInfo>
|
||||
});
|
||||
```
|
||||
|
||||
- ##### deleteFriend(删除好友)
|
||||
|
||||
操作者收到OnFriendDeleted
|
||||
|
||||
```
|
||||
OpenIM.iMManager.friendshipManager.deleteFriend(
|
||||
uid: '', // userID
|
||||
).then((_) {
|
||||
// 成功
|
||||
}).catchError((_){
|
||||
// 失败
|
||||
});
|
||||
```
|
||||
|
||||
- ##### setFriendRemark(好友备注设置)
|
||||
|
||||
操作者收到OnFriendInfoChanged
|
||||
|
||||
```
|
||||
OpenIM.iMManager.friendshipManager.setFriendRemark(
|
||||
uid: '', // 好友userID
|
||||
remark: '', // 备注名
|
||||
).then((_) {
|
||||
// 成功
|
||||
}).catchError((_){
|
||||
// 失败
|
||||
});
|
||||
```
|
||||
|
||||
- ##### getFriendList(好友列表)
|
||||
|
||||
返回的数据里包含已拉入黑名单的好友,可以根据isBlacklist字段筛选。
|
||||
|
||||
```
|
||||
OpenIM.iMManager.friendshipManager.getFriendList().then((list){
|
||||
// List<UserInfo> 好友信息列表
|
||||
});
|
||||
```
|
||||
|
||||
- ##### getRecvFriendApplicationList(收到的好友申请)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.friendshipManager.getRecvFriendApplicationList().then((list) {
|
||||
// List<FriendApplicationInfo> 申请列表
|
||||
});
|
||||
```
|
||||
|
||||
- ##### getSendFriendApplicationList(发出的好友申请)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.friendshipManager.getSendFriendApplicationList().then((list){
|
||||
// List<FriendApplicationInfo> 申请列表
|
||||
});
|
||||
```
|
||||
|
||||
- ##### addBlacklist(拉黑好友)
|
||||
|
||||
操作者收到OnBlackAdded
|
||||
|
||||
```
|
||||
OpenIM.iMManager.friendshipManager.addBlacklist(
|
||||
uid: "", // 好友userID
|
||||
).then((_) {
|
||||
// 成功
|
||||
}).catchError((_){
|
||||
// 失败
|
||||
});
|
||||
```
|
||||
|
||||
- ##### getBlacklist(黑名单)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.friendshipManager.getBlacklist().then((list){
|
||||
// List<UserInfo>
|
||||
});
|
||||
```
|
||||
|
||||
- ##### removeBlacklist(移除黑名单)
|
||||
|
||||
操作者收到OnBlackDeleted
|
||||
|
||||
```
|
||||
OpenIM.iMManager.friendshipManager.removeBlacklist(
|
||||
uid: "", // userID
|
||||
).then((_) {
|
||||
// 成功
|
||||
}).catchError((_){
|
||||
// 失败
|
||||
});
|
||||
```
|
||||
|
||||
- ##### acceptFriendApplication(接受好友申请)
|
||||
|
||||
操作者收到OnFriendApplicationAccepted、OnFriendAdded
|
||||
|
||||
申请者收到OnFriendApplicationAccepted、OnFriendAdded
|
||||
|
||||
```
|
||||
OpenIM.iMManager.friendshipManager.acceptFriendApplication(
|
||||
uid: "", // userID
|
||||
handleMsg: '', // 备注信息
|
||||
).then((_) {
|
||||
// 成功
|
||||
}).catchError((_){
|
||||
// 失败
|
||||
});
|
||||
```
|
||||
|
||||
- ##### refuseFriendApplication(拒绝好友申请)
|
||||
|
||||
操作者收到OnFriendApplicationRejected
|
||||
|
||||
申请者收到OnFriendApplicationRejected
|
||||
|
||||
```
|
||||
OpenIM.iMManager.friendshipManager.refuseFriendApplication(
|
||||
uid: "", // userID
|
||||
handleMsg: '', // 备注信息
|
||||
).then((_) {
|
||||
// 成功
|
||||
}).catchError((_){
|
||||
// 失败
|
||||
});
|
||||
```
|
||||
|
||||
- ##### inviteUserToGroup(邀请进组)
|
||||
|
||||
直接进组无需同意。
|
||||
|
||||
被邀请者收到OnJoinedGroupAdded
|
||||
|
||||
群成员(不包括被邀请者)收到OnGroupMemberAdded
|
||||
|
||||
```
|
||||
OpenIM.iMManager.groupManager.inviteUserToGroup(
|
||||
groupId: '', // 组ID
|
||||
uidList: [], // 成员 userID 列表
|
||||
reason: '', // 备注信息
|
||||
).then((list){
|
||||
// List<GroupInviteResult>
|
||||
});
|
||||
}
|
||||
```
|
||||
|
||||
- ##### kickGroupMember(移除组成员)
|
||||
|
||||
被踢者收到OnJoinedGroupDeleted
|
||||
|
||||
群成员收到OnGroupMemberDeleted
|
||||
|
||||
```
|
||||
OpenIM.iMManager.groupManager.kickGroupMember(
|
||||
groupId: '', // 组ID
|
||||
uidList: [], // 成员 userID 列表
|
||||
reason: '', // 备注信息
|
||||
).then((list){
|
||||
// List<GroupInviteResult>
|
||||
});
|
||||
```
|
||||
|
||||
- ##### getGroupMembersInfo(查询组成员信息)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.groupManager.getGroupMembersInfo(
|
||||
groupId: '', // 组ID
|
||||
uidList: [], // 成员 userID 列表
|
||||
).then((list){
|
||||
// List<GroupMembersInfo>
|
||||
});
|
||||
```
|
||||
|
||||
- ##### getGroupMemberList(组成员列表)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.groupManager.getGroupMemberList(
|
||||
groupId: '', // 组ID
|
||||
filter: 0, // 1普通成员, 2群主,3管理员
|
||||
offset: 0, // 偏移量,每次开始的index值
|
||||
count: 0, // 每次拉取的数量
|
||||
).then((list){
|
||||
// List<GroupMembersInfo>
|
||||
});
|
||||
```
|
||||
|
||||
- ##### getJoinedGroupList(获取已加入的群组)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.groupManager.getJoinedGroupList().then((list){
|
||||
// List<GroupInfo>
|
||||
});
|
||||
```
|
||||
|
||||
- ##### isJoinedGroup(检查是否已入群)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.groupManager.isJoinedGroup(
|
||||
gid: '', // 组ID
|
||||
).then((joned) {
|
||||
// true已加入;false未加入
|
||||
});
|
||||
```
|
||||
|
||||
- ##### createGroup(创建组)
|
||||
|
||||
初始成员收到OnJoinedGroupAdded
|
||||
|
||||
```
|
||||
OpenIM.iMManager.groupManager.createGroup(
|
||||
groupName: '', // 组名
|
||||
faceUrl: '', // 头像
|
||||
notification: '', // 群公告
|
||||
introduction: '', // 群简介
|
||||
groupType: 0, // 类型
|
||||
ex: '', // 扩展信息
|
||||
list: [], // 成员角色集合 List<GroupMemberRole>
|
||||
).then((groupInfo){
|
||||
// 返回组信息 GroupInfo
|
||||
});
|
||||
```
|
||||
|
||||
- ##### setGroupInfo(修改组信息)
|
||||
|
||||
群成员收到OnGroupInfoChanged
|
||||
|
||||
```
|
||||
OpenIM.iMManager.groupManager.setGroupInfo(
|
||||
groupID: '',
|
||||
groupName: '', // 组名
|
||||
faceUrl: '', // 头像
|
||||
notification: '', // 群公告
|
||||
introduction: '', // 群简介
|
||||
ex: '', // 扩展信息
|
||||
);
|
||||
```
|
||||
|
||||
- ##### getGroupsInfo(根据id查询组信息)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.groupManager.getGroupsInfo(
|
||||
gidList: [], // 组id集合
|
||||
).then((list){
|
||||
// List<GroupInfo>
|
||||
});
|
||||
```
|
||||
|
||||
- ##### joinGroup(申请入群组)
|
||||
|
||||
需要通过管理员同意。
|
||||
|
||||
申请者收到OnGroupApplicationAdded
|
||||
|
||||
群主+管理员收到OnGroupApplicationAdded
|
||||
|
||||
```
|
||||
OpenIM.iMManager.groupManager.joinGroup(
|
||||
gid: '', // 组id
|
||||
reason: '', // 入群备注信息
|
||||
);
|
||||
```
|
||||
|
||||
- ##### quitGroup(退出组)
|
||||
|
||||
退出者收到OnJoinedGroupDeleted
|
||||
|
||||
群成员收到OnGroupMemberDeleted
|
||||
|
||||
```
|
||||
OpenIM.iMManager.groupManager.quitGroup(
|
||||
gid: '', // 组id
|
||||
).then((_) {
|
||||
// 成功
|
||||
}).catchError((_){
|
||||
// 失败
|
||||
});
|
||||
```
|
||||
|
||||
- ##### transferGroupOwner(群转让)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.groupManager.transferGroupOwner(
|
||||
gid: '', // 组ID
|
||||
uid: '', // 新 owner userID
|
||||
).then((_) {
|
||||
// 成功
|
||||
}).catchError((_){
|
||||
// 失败
|
||||
});
|
||||
```
|
||||
|
||||
- ##### getRecvGroupApplicationList(收到的入群申请)
|
||||
|
||||
作为群主或者管理员,获取收到的群成员申请进群列表。
|
||||
|
||||
```
|
||||
OpenIM.iMManager.groupManager.getRecvGroupApplicationList().then((list){
|
||||
// List<GroupApplicationInfo>
|
||||
});
|
||||
```
|
||||
|
||||
- ##### getSendGroupApplicationList(发出的入群申请)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.groupManager.getSendGroupApplicationList().then((list){
|
||||
// List<GroupApplicationInfo>
|
||||
});
|
||||
```
|
||||
|
||||
- ##### acceptGroupApplication(接受入群申请)
|
||||
|
||||
申请者收到OnJoinedGroupAdded OnGroupApplicationAccepted
|
||||
|
||||
群成员(不包括申请者)收到OnGroupMemberAdded
|
||||
|
||||
审批者(群主或者管理员)收到OnGroupMemberAdded OnGroupApplicationAccepted
|
||||
|
||||
```
|
||||
OpenIM.iMManager.groupManager.acceptGroupApplication(
|
||||
gid: '', // 组ID
|
||||
uid: '', // 申请人userID
|
||||
handleMsg: '', // 备注信息
|
||||
);
|
||||
```
|
||||
|
||||
- ##### refuseGroupApplication(拒绝入群申请)
|
||||
|
||||
申请者收到OnGroupApplicationRejected
|
||||
|
||||
审批者(群主或者管理员)收到OnGroupApplicationRejected
|
||||
|
||||
```
|
||||
OpenIM.iMManager.groupManager.refuseGroupApplication(
|
||||
gid: '', // 组ID
|
||||
uid: '', // 申请人userID
|
||||
handleMsg: '', // 备注信息
|
||||
);
|
||||
```
|
||||
|
||||
- ##### sendMessage(发送消息)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.messageManager.sendMessage(
|
||||
message: Message(), // 消息体
|
||||
userID: '', // 接受消息的userID
|
||||
groupID: '', // 接受消息的群ID
|
||||
offlinePushInfo: OfflinePushInfo(), // 离线推送的消息备注
|
||||
).then((_) {
|
||||
// 成功
|
||||
}).catchError((_){
|
||||
// 失败
|
||||
});
|
||||
```
|
||||
|
||||
- ##### getHistoryMessageList(获取聊天记录)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.messageManager.getHistoryMessageList(
|
||||
userID: '', // 单聊对象的userID
|
||||
groupID: '', // 群聊的组id
|
||||
startMsg: null, // 消息体
|
||||
count: 0, // 每次拉取的数量
|
||||
).then((list){
|
||||
// List<Message>
|
||||
});
|
||||
```
|
||||
|
||||
注:消息列表list,index == list.length -1 是最新的一条消息。 index == 0 是从最新的这条记录后的第19条。所以startMsg首次传null,
|
||||
|
||||
下次就是list.first(index == 0),以此类推。
|
||||
|
||||
- ##### revokeMessage(撤回消息)
|
||||
|
||||
撤回成功需要当前用户从列表里移除Message然后更新ui,而另外一方通过撤回监听(onRecvMessageRevoked)移除。
|
||||
|
||||
```
|
||||
OpenIM.iMManager.messageManager.revokeMessage(
|
||||
message: Message(), // 消息体
|
||||
).then((_) {
|
||||
// 成功
|
||||
}).catchError((_){
|
||||
// 失败
|
||||
});
|
||||
```
|
||||
|
||||
- ##### deleteMessageFromLocalStorage(删除单条消息)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.messageManager.deleteMessageFromLocalStorage(
|
||||
message: Message(),
|
||||
).then((_) {
|
||||
// 成功,从列表里移除Message,然后更新ui
|
||||
}).catchError((_){
|
||||
// 失败
|
||||
});
|
||||
```
|
||||
|
||||
- ##### insertSingleMessageToLocalStorage(向本地插入一条消息)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.messageManager.insertSingleMessageToLocalStorage(
|
||||
receiverID: '', // 接收者userID
|
||||
senderID: '', // 发送者userID
|
||||
message: Message(), // 消息体
|
||||
);
|
||||
```
|
||||
|
||||
- ##### markC2CMessageAsRead(标记c2c消息已读)
|
||||
|
||||
当调用此方法后,已读的消息会通过已读回执(onRecvC2CReadReceipt)告诉对方。
|
||||
|
||||
```
|
||||
OpenIM.iMManager.messageManager.markC2CMessageAsRead(
|
||||
userID: '', // 接收者 userID
|
||||
messageIDList: [], // 已读的消息id列表
|
||||
);
|
||||
```
|
||||
|
||||
- ##### typingStatusUpdate(正在输入提示)
|
||||
|
||||
会通过onRecvNewMessage回调
|
||||
|
||||
```
|
||||
OpenIM.iMManager.messageManager.typingStatusUpdate(
|
||||
userID: '', // 接收者 userID
|
||||
msgTip: '', // 自定义提示内容
|
||||
);
|
||||
```
|
||||
|
||||
- ##### clearC2CHistoryMessage(清空c2c聊天记录)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.messageManager.clearC2CHistoryMessage(
|
||||
uid: "", // userID
|
||||
).then((_) {
|
||||
// 成功
|
||||
}).catchError((_){
|
||||
// 失败
|
||||
});
|
||||
```
|
||||
|
||||
- ##### clearGroupHistoryMessage(清空群聊天记录)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.messageManager.clearGroupHistoryMessage(
|
||||
gid: '', // 群ID
|
||||
).then((_) {
|
||||
// 成功
|
||||
}).catchError((_){
|
||||
// 失败
|
||||
});
|
||||
```
|
||||
|
||||
- ##### createTextMessage(文本消息)
|
||||
|
||||
```
|
||||
var message = await OpenIM.iMManager.messageManager.createTextMessage(
|
||||
text: '', // 发送的内容
|
||||
);
|
||||
```
|
||||
|
||||
- ##### createTextAtMessage(@消息)
|
||||
|
||||
```
|
||||
var message = await OpenIM.iMManager.messageManager.createTextAtMessage(
|
||||
text: '', // 发送的内容
|
||||
atUidList: [], // 被@到的userID集合
|
||||
);
|
||||
```
|
||||
|
||||
- ##### createImageMessage(图片消息,相对路径)
|
||||
|
||||
```
|
||||
var message = await OpenIM.iMManager.messageManager.createImageMessage(
|
||||
imagePath: '', // 相对路径
|
||||
);
|
||||
```
|
||||
|
||||
注:initSDK时传入了数据缓存(dataDir)路径,如路径:A,这时需要你将图片复制到A路径下后,如 A/pic/a.png路径,imagePath的值:“/pic/a.png”。同以下其他消息的相对路径。
|
||||
|
||||
- ##### createImageMessageFromFullPath(图片消息全路径)
|
||||
|
||||
```
|
||||
var message = await OpenIM.iMManager.messageManager.createImageMessageFromFullPath(
|
||||
imagePath: '', // 绝对路径
|
||||
);
|
||||
```
|
||||
|
||||
- ##### createSoundMessage(语音消息,相对路径)
|
||||
|
||||
```
|
||||
var message = await OpenIM.iMManager.messageManager.createSoundMessage(
|
||||
soundPath: '', // 相对路径
|
||||
duration: 0, // 时长s
|
||||
);
|
||||
```
|
||||
|
||||
- ##### createSoundMessageFromFullPath(语音消息全路径)
|
||||
|
||||
```
|
||||
var message = await OpenIM.iMManager.messageManager.createSoundMessageFromFullPath(
|
||||
soundPath: '', // 绝对路径
|
||||
duration: 0, // 时长s
|
||||
);
|
||||
```
|
||||
|
||||
- ##### createVideoMessage(视频消息,相对路径)
|
||||
|
||||
```
|
||||
var message = await OpenIM.iMManager.messageManager.createVideoMessage(
|
||||
videoPath: '', // 相对路径
|
||||
videoType: '', // minetype
|
||||
duration: 0, // 时长s
|
||||
snapshotPath: '', // 站位缩略图
|
||||
);
|
||||
```
|
||||
|
||||
- ##### createVideoMessageFromFullPath(视频消息全路径)
|
||||
|
||||
```
|
||||
var message = await OpenIM.iMManager.messageManager.createVideoMessageFromFullPath(
|
||||
videoPath: '', // 绝对路径
|
||||
videoType: '', // minetype
|
||||
duration: 0, // 时长s
|
||||
snapshotPath: '', // 站位缩略图
|
||||
);
|
||||
```
|
||||
|
||||
- ##### createFileMessage(文件消息,相对路径)
|
||||
|
||||
```
|
||||
var message = await OpenIM.iMManager.messageManager.createFileMessage(
|
||||
filePath: '', // 相对路径
|
||||
fileName: '', // 文件名
|
||||
);
|
||||
```
|
||||
|
||||
- ##### createFileMessageFromFullPath(文件消息全路径)
|
||||
|
||||
```
|
||||
var message = await OpenIM.iMManager.messageManager.createFileMessageFromFullPath(
|
||||
filePath: '', // 绝对路径
|
||||
fileName: '', // 文件名
|
||||
);
|
||||
```
|
||||
|
||||
- ##### createForwardMessage(转发消息)
|
||||
|
||||
```
|
||||
var message = await OpenIM.iMManager.messageManager.createForwardMessage(
|
||||
message: Message(), // 被转发的消息体
|
||||
);
|
||||
```
|
||||
|
||||
- ##### createMergerMessage(合并消息)
|
||||
|
||||
```
|
||||
var message = await OpenIM.iMManager.messageManager.createMergerMessage(
|
||||
messageList: [], // 被转发的消息列表
|
||||
title: '', // 标题
|
||||
summaryList: [], // 每一条消息摘要
|
||||
);
|
||||
```
|
||||
|
||||
- ##### createLocationMessage(位置消息)
|
||||
|
||||
```
|
||||
var message = await OpenIM.iMManager.messageManager.createLocationMessage(
|
||||
latitude: 0,// 纬度
|
||||
longitude: 0, // 经度
|
||||
description: '', // 位置描述信息
|
||||
);
|
||||
```
|
||||
|
||||
- ##### createCustomMessage(自定义消息)
|
||||
|
||||
```
|
||||
var message = await OpenIM.iMManager.messageManager.createCustomMessage(
|
||||
data: '', // 自定义内容
|
||||
extension: '', // 扩展信息
|
||||
description: '', // 描述消息
|
||||
);
|
||||
```
|
||||
|
||||
- ##### createQuoteMessage(引用消息/消息回复)
|
||||
|
||||
```
|
||||
var message = await OpenIM.iMManager.messageManager.createQuoteMessage(
|
||||
text: '', // 回复内容
|
||||
quoteMsg: Message(), // 被回复的消息体
|
||||
);
|
||||
```
|
||||
|
||||
- ##### createCardMessage(名片消息)
|
||||
|
||||
```
|
||||
OpenIM.iMManager.messageManager.createCardMessage(
|
||||
data: {}, // 自定义内容
|
||||
);
|
||||
```
|
||||
@@ -1,27 +1,35 @@
|
||||
group 'io.openim.flutter_openim_sdk'
|
||||
version '1.0'
|
||||
|
||||
def dir = getCurrentProjectDir()
|
||||
|
||||
def getCurrentProjectDir() {
|
||||
String result = ""
|
||||
rootProject.allprojects { project ->
|
||||
if (project.properties.get("name").toString() == "flutter_openim_sdk") {
|
||||
result = project.properties.get("projectDir").toString()
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
maven {
|
||||
allowInsecureProtocol = true
|
||||
url 'http://121.37.25.71:8081/repository/maven-releases/'
|
||||
}
|
||||
maven { url 'https://maven.aliyun.com/repository/public' }
|
||||
maven { url 'https://maven.aliyun.com/repository/central' }
|
||||
maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
|
||||
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.5.4'
|
||||
classpath 'com.android.tools.build:gradle:7.3.1'
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.allprojects {
|
||||
repositories {
|
||||
maven {
|
||||
allowInsecureProtocol = true
|
||||
url 'http://121.37.25.71:8081/repository/maven-releases/'
|
||||
}
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
@@ -30,7 +38,7 @@ rootProject.allprojects {
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
compileSdkVersion 34
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
@@ -40,6 +48,7 @@ android {
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'io.openim:client-sdk:2.0.4@aar'
|
||||
implementation 'io.openim:core-sdk:3.8.3-patch3@aar'
|
||||
}
|
||||
9
android/libs/io/openim/core-sdk/0.0.1/core-sdk-0.0.1.pom
Normal file
@@ -0,0 +1,9 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>io.openim</groupId>
|
||||
<artifactId>core-sdk</artifactId>
|
||||
<version>0.0.1</version>
|
||||
</project>
|
||||
@@ -1,3 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="io.openim.flutter_openim_sdk">
|
||||
package="io.openim.flutter_openim_sdk">
|
||||
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
</manifest>
|
||||
@@ -1,5 +1,6 @@
|
||||
package io.openim.flutter_openim_sdk;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -9,10 +10,14 @@ import java.lang.reflect.Method;
|
||||
|
||||
import io.flutter.Log;
|
||||
import io.flutter.embedding.engine.plugins.FlutterPlugin;
|
||||
import io.flutter.embedding.engine.plugins.activity.ActivityAware;
|
||||
import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding;
|
||||
import io.flutter.plugin.common.MethodCall;
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
|
||||
import io.flutter.plugin.common.MethodChannel.Result;
|
||||
import io.openim.flutter_openim_sdk.connectivity.ConnectivityListener;
|
||||
import io.openim.flutter_openim_sdk.connectivity.VisibilityListener;
|
||||
import io.openim.flutter_openim_sdk.manager.ConversationManager;
|
||||
import io.openim.flutter_openim_sdk.manager.FriendshipManager;
|
||||
import io.openim.flutter_openim_sdk.manager.GroupManager;
|
||||
@@ -24,12 +29,12 @@ import io.openim.flutter_openim_sdk.manager.UserManager;
|
||||
/**
|
||||
* FlutterOpenimSdkPlugin
|
||||
*/
|
||||
public class FlutterOpenimSdkPlugin implements FlutterPlugin, MethodCallHandler {
|
||||
public class FlutterOpenimSdkPlugin implements FlutterPlugin, MethodCallHandler, ActivityAware {
|
||||
/// The MethodChannel that will the communication between Flutter and native Android
|
||||
///
|
||||
/// This local reference serves to register the plugin with the Flutter Engine and unregister it
|
||||
/// when the Flutter Engine is detached from the Activity
|
||||
|
||||
private static final String CHANNEL_NAME = "flutter_openim_sdk";
|
||||
public static MethodChannel channel;
|
||||
private static IMManager imManager;
|
||||
private static UserManager userManager;
|
||||
@@ -37,11 +42,13 @@ public class FlutterOpenimSdkPlugin implements FlutterPlugin, MethodCallHandler
|
||||
private static MessageManager messageManager;
|
||||
private static ConversationManager conversationManager;
|
||||
private static GroupManager groupManager;
|
||||
private static Activity activity;
|
||||
private static Context context;
|
||||
private ConnectivityListener connectivityListener;
|
||||
private VisibilityListener visibilityListener;
|
||||
public static boolean isInitialized;
|
||||
|
||||
public FlutterOpenimSdkPlugin() {
|
||||
}
|
||||
|
||||
private FlutterOpenimSdkPlugin(Context context) {
|
||||
FlutterOpenimSdkPlugin.imManager = new IMManager();
|
||||
FlutterOpenimSdkPlugin.userManager = new UserManager();
|
||||
FlutterOpenimSdkPlugin.friendshipManager = new FriendshipManager();
|
||||
@@ -50,11 +57,15 @@ public class FlutterOpenimSdkPlugin implements FlutterPlugin, MethodCallHandler
|
||||
FlutterOpenimSdkPlugin.groupManager = new GroupManager();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBinding) {
|
||||
FlutterOpenimSdkPlugin.channel = new MethodChannel(flutterPluginBinding.getBinaryMessenger(), "flutter_openim_sdk");
|
||||
FlutterOpenimSdkPlugin.channel.setMethodCallHandler(new FlutterOpenimSdkPlugin(flutterPluginBinding.getApplicationContext()));
|
||||
// channel.setMethodCallHandler(this);
|
||||
channel = new MethodChannel(flutterPluginBinding.getBinaryMessenger(), CHANNEL_NAME);
|
||||
context = flutterPluginBinding.getApplicationContext();
|
||||
channel.setMethodCallHandler(this);
|
||||
connectivityListener = new ConnectivityListener(context);
|
||||
visibilityListener = new VisibilityListener();
|
||||
connectivityListener.register();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -65,6 +76,30 @@ public class FlutterOpenimSdkPlugin implements FlutterPlugin, MethodCallHandler
|
||||
@Override
|
||||
public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) {
|
||||
FlutterOpenimSdkPlugin.channel.setMethodCallHandler(null);
|
||||
connectivityListener.unregisterReceiver();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onAttachedToActivity(@NonNull ActivityPluginBinding binding) {
|
||||
visibilityListener.register(activity = binding.getActivity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDetachedFromActivityForConfigChanges() {
|
||||
visibilityListener.unregisterReceiver(activity);
|
||||
activity = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReattachedToActivityForConfigChanges(@NonNull ActivityPluginBinding binding) {
|
||||
visibilityListener.register(activity = binding.getActivity());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDetachedFromActivity() {
|
||||
visibilityListener.unregisterReceiver(activity);
|
||||
activity = null;
|
||||
}
|
||||
|
||||
void parse(@NonNull MethodCall call, @NonNull Result result) {
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
package io.openim.flutter_openim_sdk.connectivity;
|
||||
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.Network;
|
||||
import android.net.NetworkCapabilities;
|
||||
import android.os.Build;
|
||||
|
||||
public class Connectivity {
|
||||
static final String CONNECTIVITY_NONE = "none";
|
||||
static final String CONNECTIVITY_WIFI = "wifi";
|
||||
static final String CONNECTIVITY_MOBILE = "mobile";
|
||||
static final String CONNECTIVITY_ETHERNET = "ethernet";
|
||||
static final String CONNECTIVITY_BLUETOOTH = "bluetooth";
|
||||
static final String CONNECTIVITY_VPN = "vpn";
|
||||
private final ConnectivityManager connectivityManager;
|
||||
|
||||
public Connectivity(ConnectivityManager connectivityManager) {
|
||||
this.connectivityManager = connectivityManager;
|
||||
}
|
||||
|
||||
String getNetworkType() {
|
||||
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
Network network = connectivityManager.getActiveNetwork();
|
||||
NetworkCapabilities capabilities = connectivityManager.getNetworkCapabilities(network);
|
||||
if (capabilities == null) {
|
||||
return CONNECTIVITY_NONE;
|
||||
}
|
||||
if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_WIFI)) {
|
||||
return CONNECTIVITY_WIFI;
|
||||
}
|
||||
if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_ETHERNET)) {
|
||||
return CONNECTIVITY_ETHERNET;
|
||||
}
|
||||
if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_VPN)) {
|
||||
return CONNECTIVITY_VPN;
|
||||
}
|
||||
if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_CELLULAR)) {
|
||||
return CONNECTIVITY_MOBILE;
|
||||
}
|
||||
if (capabilities.hasTransport(NetworkCapabilities.TRANSPORT_BLUETOOTH)) {
|
||||
return CONNECTIVITY_BLUETOOTH;
|
||||
}
|
||||
}
|
||||
|
||||
return getNetworkTypeLegacy();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private String getNetworkTypeLegacy() {
|
||||
// handle type for Android versions less than Android 6
|
||||
android.net.NetworkInfo info = connectivityManager.getActiveNetworkInfo();
|
||||
if (info == null || !info.isConnected()) {
|
||||
return CONNECTIVITY_NONE;
|
||||
}
|
||||
int type = info.getType();
|
||||
switch (type) {
|
||||
case ConnectivityManager.TYPE_BLUETOOTH:
|
||||
return CONNECTIVITY_BLUETOOTH;
|
||||
case ConnectivityManager.TYPE_ETHERNET:
|
||||
return CONNECTIVITY_ETHERNET;
|
||||
case ConnectivityManager.TYPE_WIFI:
|
||||
case ConnectivityManager.TYPE_WIMAX:
|
||||
return CONNECTIVITY_WIFI;
|
||||
case ConnectivityManager.TYPE_VPN:
|
||||
return CONNECTIVITY_VPN;
|
||||
case ConnectivityManager.TYPE_MOBILE:
|
||||
case ConnectivityManager.TYPE_MOBILE_DUN:
|
||||
case ConnectivityManager.TYPE_MOBILE_HIPRI:
|
||||
return CONNECTIVITY_MOBILE;
|
||||
default:
|
||||
return CONNECTIVITY_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
public ConnectivityManager getConnectivityManager() {
|
||||
return connectivityManager;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
package io.openim.flutter_openim_sdk.connectivity;
|
||||
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.Network;
|
||||
import android.os.Build;
|
||||
|
||||
import io.flutter.Log;
|
||||
import io.openim.flutter_openim_sdk.FlutterOpenimSdkPlugin;
|
||||
import open_im_sdk.Open_im_sdk;
|
||||
|
||||
|
||||
public class ConnectivityListener implements open_im_sdk_callback.Base {
|
||||
public static final String CONNECTIVITY_ACTION = "android.net.conn.CONNECTIVITY_CHANGE";
|
||||
private Context context;
|
||||
private ConnectivityManager connectivityManager;
|
||||
private Connectivity connectivity;
|
||||
private ConnectivityBroadcastReceiver receiver;
|
||||
private ConnectivityManager.NetworkCallback networkCallback;
|
||||
|
||||
public ConnectivityListener(Context context) {
|
||||
this.context = context;
|
||||
this.connectivityManager =
|
||||
(ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
this.connectivity = new Connectivity(connectivityManager);
|
||||
this.receiver = new ConnectivityBroadcastReceiver(this);
|
||||
}
|
||||
|
||||
private void onChangedNetworkStatus() {
|
||||
String status = connectivity.getNetworkType();
|
||||
if (Connectivity.CONNECTIVITY_MOBILE.equals(status) || Connectivity.CONNECTIVITY_WIFI.equals(status)) {
|
||||
Log.i("ConnectivityListener", "networkStatusChanged: " + status);
|
||||
if (FlutterOpenimSdkPlugin.isInitialized) {
|
||||
Open_im_sdk.networkStatusChanged(this, String.valueOf(System.currentTimeMillis()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void register() {
|
||||
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
networkCallback = new ConnectivityManager.NetworkCallback() {
|
||||
@Override
|
||||
public void onAvailable(Network network) {
|
||||
onChangedNetworkStatus();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLost(Network network) {
|
||||
}
|
||||
};
|
||||
connectivity.getConnectivityManager().registerDefaultNetworkCallback(networkCallback);
|
||||
} else {
|
||||
context.registerReceiver(receiver, new IntentFilter(CONNECTIVITY_ACTION));
|
||||
}
|
||||
}
|
||||
|
||||
public void unregisterReceiver() {
|
||||
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
if (networkCallback != null) {
|
||||
connectivity.getConnectivityManager().unregisterNetworkCallback(networkCallback);
|
||||
networkCallback = null;
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
context.unregisterReceiver(receiver);
|
||||
receiver = null;
|
||||
} catch (Exception e) {
|
||||
//listen never called, ignore the error
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int i, String s) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(String s) {
|
||||
|
||||
}
|
||||
|
||||
public static class ConnectivityBroadcastReceiver extends BroadcastReceiver {
|
||||
ConnectivityListener listener;
|
||||
|
||||
public ConnectivityBroadcastReceiver(ConnectivityListener listener) {
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
if (null != listener && CONNECTIVITY_ACTION.equals(intent.getAction())) {
|
||||
listener.onChangedNetworkStatus();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package io.openim.flutter_openim_sdk.connectivity;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Application;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import io.flutter.Log;
|
||||
import io.openim.flutter_openim_sdk.FlutterOpenimSdkPlugin;
|
||||
import open_im_sdk.Open_im_sdk;
|
||||
|
||||
public class VisibilityListener implements Application.ActivityLifecycleCallbacks, open_im_sdk_callback.Base {
|
||||
public void register(Activity activity) {
|
||||
if (null != activity) {
|
||||
activity.getApplication().registerActivityLifecycleCallbacks(this);
|
||||
}
|
||||
}
|
||||
|
||||
public void unregisterReceiver(Activity activity) {
|
||||
if (null != activity) {
|
||||
activity.getApplication().unregisterActivityLifecycleCallbacks(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(@NonNull Activity activity, @Nullable Bundle savedInstanceState) {
|
||||
Log.i("VisibilityListener", "onActivityCreated");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityStarted(@NonNull Activity activity) {
|
||||
Log.i("VisibilityListener", "onActivityStarted");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityResumed(@NonNull Activity activity) {
|
||||
Log.i("VisibilityListener", "onActivityResumed");
|
||||
if (FlutterOpenimSdkPlugin.isInitialized) {
|
||||
Open_im_sdk.setAppBackgroundStatus(this, String.valueOf(System.currentTimeMillis()), false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityPaused(@NonNull Activity activity) {
|
||||
Log.i("VisibilityListener", "onActivityPaused");
|
||||
if (FlutterOpenimSdkPlugin.isInitialized) {
|
||||
Open_im_sdk.setAppBackgroundStatus(this, String.valueOf(System.currentTimeMillis()), true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityStopped(@NonNull Activity activity) {
|
||||
Log.i("VisibilityListener", "onActivityStopped");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivitySaveInstanceState(@NonNull Activity activity, @NonNull Bundle outState) {
|
||||
Log.i("VisibilityListener", "onActivitySaveInstanceState");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityDestroyed(@NonNull Activity activity) {
|
||||
Log.i("VisibilityListener", "onActivityDestroyed");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int i, String s) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(String s) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -14,26 +14,50 @@ public class OnAdvancedMsgListener implements open_im_sdk_callback.OnAdvancedMsg
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRecvC2CReadReceipt(String s) {
|
||||
public void onMsgDeleted(String s) {
|
||||
final Map<String, String> values = new ArrayMap<>();
|
||||
values.put("id", id);
|
||||
values.put("haveReadMessage", s);
|
||||
CommonUtil.emitEvent("advancedMsgListener", "onRecvC2CReadReceipt", values);
|
||||
values.put("message", s);
|
||||
CommonUtil.emitEvent("advancedMsgListener", "onMsgDeleted", values);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRecvMessageRevoked(String s) {
|
||||
public void onNewRecvMessageRevoked(String s) {
|
||||
final Map<String, String> values = new ArrayMap<>();
|
||||
values.put("id", id);
|
||||
values.put("revokedMessage", s);
|
||||
CommonUtil.emitEvent("advancedMsgListener", "onRecvMessageRevoked", values);
|
||||
values.put("messageRevoked", s);
|
||||
CommonUtil.emitEvent("advancedMsgListener", "onNewRecvMessageRevoked", values);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRecvC2CReadReceipt(String s) {
|
||||
final Map<String, String> values = new ArrayMap<>();
|
||||
values.put("id", id);
|
||||
values.put("msgReceiptList", s);
|
||||
CommonUtil.emitEvent("advancedMsgListener", "onRecvC2CReadReceipt", values);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRecvNewMessage(String s) {
|
||||
final Map<String, String> values = new ArrayMap<>();
|
||||
values.put("id", id);
|
||||
values.put("newMessage", s);
|
||||
values.put("message", s);
|
||||
CommonUtil.emitEvent("advancedMsgListener", "onRecvNewMessage", values);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRecvOfflineNewMessage(String s) {
|
||||
final Map<String, String> values = new ArrayMap<>();
|
||||
values.put("id", id);
|
||||
values.put("message", s);
|
||||
CommonUtil.emitEvent("advancedMsgListener", "onRecvOfflineNewMessage", values);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRecvOnlineOnlyMessage(String s) {
|
||||
final Map<String, String> values = new ArrayMap<>();
|
||||
values.put("id", id);
|
||||
values.put("message", s);
|
||||
CommonUtil.emitEvent("advancedMsgListener", "onRecvOnlineOnlyMessage", values);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package io.openim.flutter_openim_sdk.listener;
|
||||
|
||||
|
||||
import io.flutter.Log;
|
||||
import io.flutter.plugin.common.MethodCall;
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
import open_im_sdk_callback.Base;
|
||||
@@ -8,18 +10,24 @@ import open_im_sdk_callback.Base;
|
||||
public class OnBaseListener implements Base {
|
||||
|
||||
MethodChannel.Result result;
|
||||
MethodCall call;
|
||||
|
||||
public OnBaseListener(MethodChannel.Result result) {
|
||||
public OnBaseListener(MethodChannel.Result result, MethodCall call) {
|
||||
this.result = result;
|
||||
this.call = call;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(int l, String s) {
|
||||
String threadName = Thread.currentThread().getName();
|
||||
Log.i("F-OpenIMSDK(native call flutter)", "thread: " + threadName + " method: 【 " + call.method + " 】, onError: { code:" + l + ", message:" + s + "}");
|
||||
CommonUtil.runMainThreadReturnError(result, l, s, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(String s) {
|
||||
String threadName = Thread.currentThread().getName();
|
||||
Log.i("F-OpenIMSDK(native call flutter)", "thread: " + threadName + " method: 【 " + call.method + " 】, onSuccess: " + s);
|
||||
CommonUtil.runMainThreadReturn(result, s);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,4 +31,9 @@ public class OnConnListener implements open_im_sdk_callback.OnConnListener {
|
||||
public void onUserTokenExpired() {
|
||||
CommonUtil.emitEvent("connectListener", "onUserTokenExpired", null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUserTokenInvalid(String s) {
|
||||
CommonUtil.emitEvent("connectListener", "onUserTokenInvalid", s);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,24 +10,34 @@ public class OnConversationListener implements open_im_sdk_callback.OnConversati
|
||||
CommonUtil.emitEvent("conversationListener", "onConversationChanged", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onConversationUserInputStatusChanged(String s) {
|
||||
CommonUtil.emitEvent("conversationListener", "onConversationUserInputStatusChanged", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNewConversation(String s) {
|
||||
CommonUtil.emitEvent("conversationListener", "onNewConversation", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSyncServerFailed() {
|
||||
CommonUtil.emitEvent("conversationListener", "onSyncServerFailed", null);
|
||||
public void onSyncServerFailed(boolean reinstalled) {
|
||||
CommonUtil.emitEvent("conversationListener", "onSyncServerFailed", reinstalled);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSyncServerFinish() {
|
||||
CommonUtil.emitEvent("conversationListener", "onSyncServerFinish", null);
|
||||
public void onSyncServerFinish(boolean reinstalled) {
|
||||
CommonUtil.emitEvent("conversationListener", "onSyncServerFinish", reinstalled);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSyncServerStart() {
|
||||
CommonUtil.emitEvent("conversationListener", "onSyncServerStart", null);
|
||||
public void onSyncServerStart(boolean reinstalled) {
|
||||
CommonUtil.emitEvent("conversationListener", "onSyncServerStart", reinstalled);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSyncServerProgress(long progress) {
|
||||
CommonUtil.emitEvent("conversationListener", "onSyncServerProgress", progress);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package io.openim.flutter_openim_sdk.listener;
|
||||
|
||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
|
||||
public class OnCustomBusinessListener implements open_im_sdk_callback.OnCustomBusinessListener {
|
||||
@Override
|
||||
public void onRecvCustomBusinessMessage(String s) {
|
||||
CommonUtil.emitEvent("customBusinessListener", "onRecvCustomBusinessMessage", s);
|
||||
}
|
||||
}
|
||||
@@ -6,12 +6,12 @@ public class OnFriendshipListener implements open_im_sdk_callback.OnFriendshipLi
|
||||
|
||||
@Override
|
||||
public void onBlackAdded(String s) {
|
||||
CommonUtil.emitEvent("friendListener", "onBlacklistAdded", s);
|
||||
CommonUtil.emitEvent("friendListener", "onBlackAdded", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlackDeleted(String s) {
|
||||
CommonUtil.emitEvent("friendListener", "onBlacklistDeleted", s);
|
||||
CommonUtil.emitEvent("friendListener", "onBlackDeleted", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -24,6 +24,11 @@ public class OnGroupListener implements open_im_sdk_callback.OnGroupListener {
|
||||
CommonUtil.emitEvent("groupListener", "onGroupApplicationRejected", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGroupDismissed(String s) {
|
||||
CommonUtil.emitEvent("groupListener", "onGroupDismissed", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGroupInfoChanged(String s) {
|
||||
CommonUtil.emitEvent("groupListener", "onGroupInfoChanged", s);
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
//package io.openim.flutter_openim_sdk.listener;
|
||||
//
|
||||
//import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
//
|
||||
//public class OnListenerForService implements open_im_sdk_callback.OnListenerForService {
|
||||
// @Override
|
||||
// public void onFriendApplicationAccepted(String s) {
|
||||
// CommonUtil.emitEvent("listenerForService", "onFriendApplicationAccepted", s);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onFriendApplicationAdded(String s) {
|
||||
// CommonUtil.emitEvent("listenerForService", "onFriendApplicationAdded", s);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onGroupApplicationAccepted(String s) {
|
||||
// CommonUtil.emitEvent("listenerForService", "onGroupApplicationAccepted", s);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onGroupApplicationAdded(String s) {
|
||||
// CommonUtil.emitEvent("listenerForService", "onGroupApplicationAdded", s);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onRecvNewMessage(String s) {
|
||||
// CommonUtil.emitEvent("listenerForService", "onRecvNewMessage", s);
|
||||
// }
|
||||
//}
|
||||
@@ -0,0 +1,110 @@
|
||||
package io.openim.flutter_openim_sdk.listener;
|
||||
|
||||
import android.util.ArrayMap;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import io.flutter.plugin.common.MethodCall;
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
import open_im_sdk_callback.UploadFileCallback;
|
||||
|
||||
public class OnUploadFileListener implements UploadFileCallback {
|
||||
final private MethodChannel.Result result;
|
||||
final private Object id;
|
||||
|
||||
public OnUploadFileListener(MethodChannel.Result result, MethodCall call) {
|
||||
this.result = result;
|
||||
this.id = call.argument("id");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void complete(long size, String url, long type) {
|
||||
if (null != id) {
|
||||
final Map<String, Object> values = new ArrayMap<>();
|
||||
values.put("id", id);
|
||||
values.put("size", size);
|
||||
values.put("url", url);
|
||||
values.put("type", type);
|
||||
CommonUtil.emitEvent("uploadFileListener", "complete", values);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hashPartComplete(String partHash, String fileHash) {
|
||||
if (null != id) {
|
||||
final Map<String, Object> values = new ArrayMap<>();
|
||||
values.put("id", id);
|
||||
values.put("partHash", partHash);
|
||||
values.put("fileHash", fileHash);
|
||||
CommonUtil.emitEvent("uploadFileListener", "hashPartComplete", values);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hashPartProgress(long index, long size, String partHash) {
|
||||
if (null != id) {
|
||||
final Map<String, Object> values = new ArrayMap<>();
|
||||
values.put("id", id);
|
||||
values.put("index", index);
|
||||
values.put("size", size);
|
||||
values.put("partHash", partHash);
|
||||
CommonUtil.emitEvent("uploadFileListener", "hashPartProgress", values);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void open(long size) {
|
||||
if (null != id) {
|
||||
final Map<String, Object> values = new ArrayMap<>();
|
||||
values.put("id", id);
|
||||
values.put("size", size);
|
||||
CommonUtil.emitEvent("uploadFileListener", "open", values);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void partSize(long partSize, long num) {
|
||||
if (null != id) {
|
||||
final Map<String, Object> values = new ArrayMap<>();
|
||||
values.put("id", id);
|
||||
values.put("partSize", partSize);
|
||||
values.put("num", num);
|
||||
CommonUtil.emitEvent("uploadFileListener", "partSize", values);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uploadComplete(long fileSize, long streamSize, long storageSize) {
|
||||
if (null != id) {
|
||||
final Map<String, Object> values = new ArrayMap<>();
|
||||
values.put("id", id);
|
||||
values.put("fileSize", fileSize);
|
||||
values.put("streamSize", streamSize);
|
||||
values.put("storageSize", storageSize);
|
||||
CommonUtil.emitEvent("uploadFileListener", "uploadProgress", values);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uploadID(String uploadID) {
|
||||
if (null != id) {
|
||||
final Map<String, Object> values = new ArrayMap<>();
|
||||
values.put("id", id);
|
||||
values.put("uploadID", uploadID);
|
||||
CommonUtil.emitEvent("uploadFileListener", "uploadID", values);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uploadPartComplete(long index, long partSize, String partHash) {
|
||||
if (null != id) {
|
||||
final Map<String, Object> values = new ArrayMap<>();
|
||||
values.put("id", id);
|
||||
values.put("index", index);
|
||||
values.put("partSize", partSize);
|
||||
values.put("partHash", partHash);
|
||||
CommonUtil.emitEvent("uploadFileListener", "uploadPartComplete", values);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package io.openim.flutter_openim_sdk.listener;
|
||||
|
||||
import android.util.ArrayMap;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import io.flutter.plugin.common.MethodCall;
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
import open_im_sdk_callback.UploadLogProgress;
|
||||
|
||||
public class OnUploadLogsListener implements UploadLogProgress {
|
||||
final private MethodChannel.Result result;
|
||||
|
||||
public OnUploadLogsListener(MethodChannel.Result result, MethodCall call) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onProgress(long current, long size) {
|
||||
final Map<String, Object> values = new ArrayMap<>();
|
||||
values.put("current", current);
|
||||
values.put("size", size);
|
||||
CommonUtil.emitEvent("uploadLogsListener", "onProgress", values);
|
||||
}
|
||||
}
|
||||
@@ -8,4 +8,24 @@ public class OnUserListener implements open_im_sdk_callback.OnUserListener {
|
||||
public void onSelfInfoUpdated(String s) {
|
||||
CommonUtil.emitEvent("userListener", "onSelfInfoUpdated", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUserStatusChanged(String s) {
|
||||
CommonUtil.emitEvent("userListener", "onUserStatusChanged", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUserCommandAdd(String s) {
|
||||
CommonUtil.emitEvent("userListener", "onUserCommandAdd", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUserCommandDelete(String s) {
|
||||
CommonUtil.emitEvent("userListener", "onUserCommandDelete", s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUserCommandUpdate(String s) {
|
||||
CommonUtil.emitEvent("userListener", "onUserCommandUpdate", s);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,10 @@ class BaseManager {
|
||||
}
|
||||
|
||||
static Long int2long(MethodCall methodCall, String key) {
|
||||
Integer i = value(methodCall, key);
|
||||
return Long.valueOf(i);
|
||||
Object i = value(methodCall, key);
|
||||
if (i instanceof Long) {
|
||||
return (Long) i;
|
||||
}
|
||||
return Long.valueOf((Integer) i);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,19 +11,21 @@ public class ConversationManager extends BaseManager {
|
||||
|
||||
public void setConversationListener(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setConversationListener(new OnConversationListener());
|
||||
|
||||
result.success(null);
|
||||
}
|
||||
|
||||
|
||||
public void getAllConversationList(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getAllConversationList(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID")
|
||||
);
|
||||
}
|
||||
|
||||
public void getConversationListSplit(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getConversationListSplit(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
int2long(methodCall, "offset"),
|
||||
int2long(methodCall, "count")
|
||||
@@ -32,90 +34,129 @@ public class ConversationManager extends BaseManager {
|
||||
|
||||
public void getOneConversation(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getOneConversation(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
int2long(methodCall, "sessionType"),
|
||||
value(methodCall, "sessionType"),
|
||||
value(methodCall, "sourceID")
|
||||
);
|
||||
}
|
||||
|
||||
public void getMultipleConversation(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getMultipleConversation(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "conversationIDList")
|
||||
);
|
||||
}
|
||||
|
||||
public void deleteConversation(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.deleteConversation(
|
||||
new OnBaseListener(result),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "conversationID")
|
||||
);
|
||||
}
|
||||
|
||||
public void setConversationDraft(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setConversationDraft(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "conversationID"),
|
||||
value(methodCall, "draftText")
|
||||
);
|
||||
}
|
||||
|
||||
public void pinConversation(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.pinConversation(
|
||||
new OnBaseListener(result),
|
||||
public void hideConversation(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.hideConversation(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "conversationID"),
|
||||
value(methodCall, "isPinned")
|
||||
value(methodCall, "conversationID")
|
||||
);
|
||||
}
|
||||
|
||||
// public void markSingleMessageHasRead(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.markSingleMessageHasRead(
|
||||
// new OnBaseListener(result),
|
||||
// value(methodCall, "operationID"),
|
||||
// value(methodCall, "userID")
|
||||
// );
|
||||
// }
|
||||
|
||||
public void markGroupMessageHasRead(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.markGroupMessageHasRead(
|
||||
new OnBaseListener(result),
|
||||
public void markConversationMessageAsRead(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.markConversationMessageAsRead(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "groupID")
|
||||
value(methodCall, "conversationID")
|
||||
);
|
||||
}
|
||||
|
||||
public void getTotalUnreadMsgCount(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getTotalUnreadMsgCount(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID")
|
||||
);
|
||||
}
|
||||
|
||||
public void getConversationIDBySessionType(MethodCall methodCall, MethodChannel.Result result) {
|
||||
CommonUtil.runMainThreadReturn(result, Open_im_sdk.getConversationIDBySessionType(
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "sourceID"),
|
||||
int2long(methodCall, "sessionType")));
|
||||
}
|
||||
|
||||
public void setConversationRecvMessageOpt(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setConversationRecvMessageOpt(
|
||||
new OnBaseListener(result),
|
||||
public void clearConversationAndDeleteAllMsg(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.clearConversationAndDeleteAllMsg(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "conversationIDList"),
|
||||
int2long(methodCall, "status")
|
||||
value(methodCall, "conversationID")
|
||||
);
|
||||
}
|
||||
|
||||
public void getConversationRecvMessageOpt(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getConversationRecvMessageOpt(
|
||||
new OnBaseListener(result),
|
||||
public void deleteConversationAndDeleteAllMsg(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.deleteConversationAndDeleteAllMsg(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "conversationIDList")
|
||||
value(methodCall, "conversationID")
|
||||
);
|
||||
}
|
||||
|
||||
public void getAtAllTag(MethodCall methodCall, MethodChannel.Result result) {
|
||||
CommonUtil.runMainThreadReturn(result, Open_im_sdk.getAtAllTag(value(methodCall, "operationID")));
|
||||
}
|
||||
|
||||
public void hideAllConversations(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.hideAllConversations(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID")
|
||||
);
|
||||
}
|
||||
|
||||
public void searchConversation(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.searchConversation(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "name")
|
||||
);
|
||||
}
|
||||
|
||||
public void changeInputStates(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.changeInputStates(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "conversationID"),
|
||||
value(methodCall, "focus")
|
||||
);
|
||||
}
|
||||
|
||||
public void getInputStates(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getInputStates(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "conversationID"),
|
||||
value(methodCall, "userID")
|
||||
);
|
||||
}
|
||||
|
||||
public void setConversation(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setConversation(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "conversationID"),
|
||||
jsonValue(methodCall, "req")
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public void searchConversations(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.searchConversation(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "name")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,95 +11,102 @@ public class FriendshipManager extends BaseManager {
|
||||
|
||||
public void setFriendListener(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setFriendListener(new OnFriendshipListener());
|
||||
|
||||
result.success(null);
|
||||
}
|
||||
|
||||
public void getFriendsInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getDesignatedFriendsInfo(
|
||||
new OnBaseListener(result),
|
||||
Open_im_sdk.getSpecifiedFriendsInfo(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "uidList")
|
||||
jsonValue(methodCall, "userIDList"),
|
||||
value(methodCall, "filterBlack")
|
||||
);
|
||||
}
|
||||
|
||||
public void addFriend(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.addFriend(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall)
|
||||
);
|
||||
}
|
||||
|
||||
public void getRecvFriendApplicationList(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getRecvFriendApplicationList(
|
||||
new OnBaseListener(result),
|
||||
public void getFriendApplicationListAsRecipient(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getFriendApplicationListAsRecipient(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID")
|
||||
);
|
||||
}
|
||||
|
||||
public void getSendFriendApplicationList(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getSendFriendApplicationList(
|
||||
new OnBaseListener(result),
|
||||
public void getFriendApplicationListAsApplicant(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getFriendApplicationListAsApplicant(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID")
|
||||
);
|
||||
}
|
||||
|
||||
public void getFriendList(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getFriendList(
|
||||
new OnBaseListener(result),
|
||||
value(methodCall, "operationID")
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "filterBlack")
|
||||
);
|
||||
}
|
||||
|
||||
public void setFriendRemark(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setFriendRemark(
|
||||
new OnBaseListener(result),
|
||||
public void getFriendListPage(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getFriendListPage(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall)
|
||||
value(methodCall, "offset"),
|
||||
value(methodCall, "count"),
|
||||
value(methodCall, "filterBlack")
|
||||
);
|
||||
}
|
||||
|
||||
public void addBlacklist(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.addBlack(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "uid")
|
||||
value(methodCall, "userID"),
|
||||
value(methodCall, "ex")
|
||||
);
|
||||
}
|
||||
|
||||
public void getBlacklist(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getBlackList(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID")
|
||||
);
|
||||
}
|
||||
|
||||
public void removeBlacklist(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.removeBlack(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "uid")
|
||||
value(methodCall, "userID")
|
||||
);
|
||||
}
|
||||
|
||||
public void checkFriend(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.checkFriend(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "uidList")
|
||||
jsonValue(methodCall, "userIDList")
|
||||
);
|
||||
}
|
||||
|
||||
public void deleteFriend(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.deleteFriend(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "uid")
|
||||
value(methodCall, "userID")
|
||||
);
|
||||
}
|
||||
|
||||
public void acceptFriendApplication(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.acceptFriendApplication(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall)
|
||||
);
|
||||
@@ -107,21 +114,25 @@ public class FriendshipManager extends BaseManager {
|
||||
|
||||
public void refuseFriendApplication(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.refuseFriendApplication(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall)
|
||||
);
|
||||
}
|
||||
|
||||
// public void forceSyncFriendApplication(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.forceSyncFriendApplication();
|
||||
// }
|
||||
//
|
||||
// public void forceSyncFriend(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.forceSyncFriend();
|
||||
// }
|
||||
//
|
||||
// public void forceSyncBlackList(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.forceSyncBlackList();
|
||||
// }
|
||||
public void searchFriends(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.searchFriends(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "searchParam")
|
||||
);
|
||||
}
|
||||
|
||||
public void updateFriends(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.updateFriends(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "req")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,42 +10,44 @@ public class GroupManager extends BaseManager {
|
||||
|
||||
public void setGroupListener(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setGroupListener(new OnGroupListener());
|
||||
|
||||
result.success(null);
|
||||
}
|
||||
|
||||
public void inviteUserToGroup(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.inviteUserToGroup(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "gid"),
|
||||
value(methodCall, "groupID"),
|
||||
value(methodCall, "reason"),
|
||||
jsonValue(methodCall, "uidList")
|
||||
jsonValue(methodCall, "userIDList")
|
||||
);
|
||||
}
|
||||
|
||||
public void kickGroupMember(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.kickGroupMember(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "gid"),
|
||||
value(methodCall, "groupID"),
|
||||
value(methodCall, "reason"),
|
||||
jsonValue(methodCall, "uidList")
|
||||
jsonValue(methodCall, "userIDList")
|
||||
);
|
||||
}
|
||||
|
||||
public void getGroupMembersInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getGroupMembersInfo(
|
||||
new OnBaseListener(result),
|
||||
Open_im_sdk.getSpecifiedGroupMembersInfo(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "gid"),
|
||||
jsonValue(methodCall, "uidList")
|
||||
value(methodCall, "groupID"),
|
||||
jsonValue(methodCall, "userIDList")
|
||||
);
|
||||
}
|
||||
|
||||
public void getGroupMemberList(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getGroupMemberList(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "gid"),
|
||||
value(methodCall, "groupID"),
|
||||
value(methodCall, "filter"),
|
||||
value(methodCall, "offset"),
|
||||
value(methodCall, "count")
|
||||
@@ -55,83 +57,92 @@ public class GroupManager extends BaseManager {
|
||||
|
||||
public void getJoinedGroupList(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getJoinedGroupList(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID")
|
||||
);
|
||||
}
|
||||
|
||||
public void getJoinedGroupListPage(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getJoinedGroupListPage(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "offset"),
|
||||
value(methodCall, "count")
|
||||
);
|
||||
}
|
||||
|
||||
public void createGroup(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.createGroup(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "gInfo"),
|
||||
jsonValue(methodCall, "memberList")
|
||||
jsonValue(methodCall)
|
||||
);
|
||||
}
|
||||
|
||||
public void setGroupInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setGroupInfo(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "gid"),
|
||||
jsonValue(methodCall, "gInfo")
|
||||
jsonValue(methodCall, "groupInfo")
|
||||
);
|
||||
}
|
||||
|
||||
public void getGroupsInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getGroupsInfo(
|
||||
new OnBaseListener(result),
|
||||
Open_im_sdk.getSpecifiedGroupsInfo(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "gidList")
|
||||
jsonValue(methodCall, "groupIDList")
|
||||
);
|
||||
}
|
||||
|
||||
public void joinGroup(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.joinGroup(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "gid"),
|
||||
value(methodCall, "reason")
|
||||
value(methodCall, "groupID"),
|
||||
value(methodCall, "reason"),
|
||||
value(methodCall, "joinSource"),
|
||||
value(methodCall, "ex")
|
||||
);
|
||||
}
|
||||
|
||||
public void quitGroup(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.quitGroup(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "gid")
|
||||
value(methodCall, "groupID")
|
||||
);
|
||||
}
|
||||
|
||||
public void transferGroupOwner(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.transferGroupOwner(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "gid"),
|
||||
value(methodCall, "uid")
|
||||
value(methodCall, "groupID"),
|
||||
value(methodCall, "userID")
|
||||
);
|
||||
}
|
||||
|
||||
public void getRecvGroupApplicationList(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getRecvGroupApplicationList(
|
||||
new OnBaseListener(result),
|
||||
public void getGroupApplicationListAsRecipient(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getGroupApplicationListAsRecipient(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID")
|
||||
);
|
||||
}
|
||||
|
||||
public void getSendGroupApplicationList(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getSendGroupApplicationList(
|
||||
new OnBaseListener(result),
|
||||
public void getGroupApplicationListAsApplicant(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getGroupApplicationListAsApplicant(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID")
|
||||
);
|
||||
}
|
||||
|
||||
public void acceptGroupApplication(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.acceptGroupApplication(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "gid"),
|
||||
value(methodCall, "uid"),
|
||||
value(methodCall, "groupID"),
|
||||
value(methodCall, "userID"),
|
||||
value(methodCall, "handleMsg")
|
||||
);
|
||||
|
||||
@@ -139,28 +150,94 @@ public class GroupManager extends BaseManager {
|
||||
|
||||
public void refuseGroupApplication(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.refuseGroupApplication(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "gid"),
|
||||
value(methodCall, "uid"),
|
||||
value(methodCall, "groupID"),
|
||||
value(methodCall, "userID"),
|
||||
value(methodCall, "handleMsg")
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
// public void forceSyncApplyGroupRequest(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.forceSyncApplyGroupRequest();
|
||||
// }
|
||||
//
|
||||
// public void forceSyncGroupRequest(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.forceSyncGroupRequest();
|
||||
// }
|
||||
//
|
||||
// public void forceSyncJoinedGroup(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.forceSyncJoinedGroup();
|
||||
// }
|
||||
//
|
||||
// public void forceSyncJoinedGroupMember(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.forceSyncJoinedGroupMember();
|
||||
// }
|
||||
public void dismissGroup(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.dismissGroup(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "groupID")
|
||||
);
|
||||
}
|
||||
|
||||
public void changeGroupMute(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.changeGroupMute(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "groupID"),
|
||||
value(methodCall, "mute")
|
||||
);
|
||||
}
|
||||
|
||||
public void changeGroupMemberMute(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.changeGroupMemberMute(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "groupID"),
|
||||
value(methodCall, "userID"),
|
||||
int2long(methodCall, "seconds")
|
||||
);
|
||||
}
|
||||
|
||||
public void searchGroups(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.searchGroups(new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "searchParam")
|
||||
);
|
||||
}
|
||||
|
||||
public void getGroupMemberListByJoinTimeFilter(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getGroupMemberListByJoinTimeFilter(new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "groupID"),
|
||||
value(methodCall, "offset"),
|
||||
value(methodCall, "count"),
|
||||
int2long(methodCall, "joinTimeBegin"),
|
||||
int2long(methodCall, "joinTimeEnd"),
|
||||
jsonValue(methodCall, "excludeUserIDList")
|
||||
);
|
||||
}
|
||||
|
||||
public void getGroupMemberOwnerAndAdmin(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getGroupMemberOwnerAndAdmin(new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "groupID")
|
||||
);
|
||||
}
|
||||
|
||||
public void searchGroupMembers(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.searchGroupMembers(new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "searchParam")
|
||||
);
|
||||
}
|
||||
|
||||
public void setGroupMemberInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setGroupMemberInfo(new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "info")
|
||||
);
|
||||
}
|
||||
|
||||
public void isJoinGroup(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.isJoinGroup(new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "groupID")
|
||||
);
|
||||
}
|
||||
|
||||
public void getUsersInGroup(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getUsersInGroup(new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "groupID"),
|
||||
jsonValue(methodCall, "userIDs")
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -2,64 +2,110 @@ package io.openim.flutter_openim_sdk.manager;
|
||||
|
||||
import io.flutter.plugin.common.MethodCall;
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import io.openim.flutter_openim_sdk.FlutterOpenimSdkPlugin;
|
||||
import io.openim.flutter_openim_sdk.listener.OnBaseListener;
|
||||
import io.openim.flutter_openim_sdk.listener.OnConnListener;
|
||||
import io.openim.flutter_openim_sdk.listener.OnUploadFileListener;
|
||||
import io.openim.flutter_openim_sdk.listener.OnUploadLogsListener;
|
||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
import open_im_sdk.Open_im_sdk;
|
||||
|
||||
public class IMManager extends BaseManager {
|
||||
|
||||
public void initSDK(MethodCall methodCall, MethodChannel.Result result) {
|
||||
CommonUtil.runMainThreadReturn(result, Open_im_sdk.initSDK(
|
||||
boolean initialized = Open_im_sdk.initSDK(
|
||||
new OnConnListener(),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall))
|
||||
);
|
||||
jsonValue(methodCall));
|
||||
FlutterOpenimSdkPlugin.isInitialized = initialized;
|
||||
CommonUtil.runMainThreadReturn(result, initialized);
|
||||
}
|
||||
|
||||
public void unInitSDK(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.unInitSDK(value(methodCall, "operationID"));
|
||||
}
|
||||
|
||||
public void login(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.login(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "uid"),
|
||||
value(methodCall, "userID"),
|
||||
value(methodCall, "token")
|
||||
);
|
||||
}
|
||||
|
||||
public void logout(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.logout(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID")
|
||||
);
|
||||
}
|
||||
|
||||
public void getLoginStatus(MethodCall methodCall, MethodChannel.Result result) {
|
||||
CommonUtil.runMainThreadReturn(result, Open_im_sdk.getLoginStatus());
|
||||
CommonUtil.runMainThreadReturn(result, Open_im_sdk.getLoginStatus(value(methodCall, "operationID")));
|
||||
}
|
||||
|
||||
// public void getLoginUid(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// CommonUtil.runMainThreadReturn(result, Open_im_sdk.getLoginUid());
|
||||
public void uploadFile(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.uploadFile(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall),
|
||||
new OnUploadFileListener(result, methodCall)
|
||||
);
|
||||
}
|
||||
|
||||
public void updateFcmToken(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.updateFcmToken(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "fcmToken"),
|
||||
int2long(methodCall, "expireTime")
|
||||
);
|
||||
}
|
||||
|
||||
public void uploadLogs(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.uploadLogs(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
int2long(methodCall, "line"),
|
||||
value(methodCall, "ex"),
|
||||
new OnUploadLogsListener(result, methodCall)
|
||||
);
|
||||
}
|
||||
|
||||
public void logs(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.logs(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
int2long(methodCall, "logLevel"),
|
||||
value(methodCall, "file"),
|
||||
int2long(methodCall, "line"),
|
||||
value(methodCall, "msgs"),
|
||||
value(methodCall, "err"),
|
||||
value(methodCall, "keyAndValue")
|
||||
);
|
||||
}
|
||||
|
||||
public void setAppBackgroundStatus(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setAppBackgroundStatus(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "isBackground")
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public void networkStatusChanged(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.networkStatusChanged(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID")
|
||||
);
|
||||
}
|
||||
|
||||
// public void setListenerForService(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.setListenerForService(new OnListenerForService());
|
||||
//
|
||||
// result.success(null);
|
||||
// }
|
||||
|
||||
// public void getUsersInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.getUsersInfo(
|
||||
// jsonValue(methodCall, "uidList"), new BaseListener(result));
|
||||
// }
|
||||
|
||||
// public void setSelfInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.setSelfInfo(
|
||||
// jsonValue(methodCall), new BaseListener(result));
|
||||
// }
|
||||
|
||||
// public void forceSyncLoginUerInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.forceSyncLoginUerInfo();
|
||||
// }
|
||||
|
||||
// public void forceReConn(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.forceReConn();
|
||||
// }
|
||||
|
||||
// public void setSdkLog(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.setSdkLog(value(methodCall, "sdkLog"));
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import io.flutter.plugin.common.MethodCall;
|
||||
import io.flutter.plugin.common.MethodChannel;
|
||||
import io.openim.flutter_openim_sdk.listener.OnAdvancedMsgListener;
|
||||
import io.openim.flutter_openim_sdk.listener.OnBaseListener;
|
||||
import io.openim.flutter_openim_sdk.listener.OnCustomBusinessListener;
|
||||
import io.openim.flutter_openim_sdk.listener.OnMsgSendListener;
|
||||
import io.openim.flutter_openim_sdk.util.CommonUtil;
|
||||
import open_im_sdk.Open_im_sdk;
|
||||
@@ -11,77 +12,12 @@ import open_im_sdk.Open_im_sdk;
|
||||
|
||||
public class MessageManager extends BaseManager {
|
||||
private final static String KEY_ID = "id";
|
||||
// private final static Map<String, OnAdvancedMsgListener> listeners = new HashMap<>();
|
||||
/* private static boolean initializedListener = false;
|
||||
private final static Map<String, AdvancedMsgListener> listeners = new ConcurrentHashMap<>();
|
||||
|
||||
protected void clearListeners() {
|
||||
initializedListener = false;
|
||||
listeners.clear();
|
||||
}
|
||||
|
||||
private final static OnAdvancedMsgListener sdkMsgListener = new OnAdvancedMsgListener() {
|
||||
@Override
|
||||
public void onRecvC2CReadReceipt(String s) {
|
||||
for (AdvancedMsgListener l : listeners.values()) {
|
||||
l.onRecvC2CReadReceipt(s);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRecvMessageRevoked(String s) {
|
||||
for (AdvancedMsgListener l : listeners.values()) {
|
||||
l.onRecvMessageRevoked(s);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRecvNewMessage(String s) {
|
||||
for (AdvancedMsgListener l : listeners.values()) {
|
||||
l.onRecvNewMessage(s);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public void addAdvancedMsgListener(MethodCall methodCall, MethodChannel.Result result) {
|
||||
String key = methodCall.argument(KEY_ID);
|
||||
Open_im_sdk.addAdvancedMsgListener(new AdvancedMsgListener(key));
|
||||
listeners.put(key, new AdvancedMsgListener(key));
|
||||
if (!initializedListener) {
|
||||
initializedListener = true;
|
||||
Open_im_sdk.addAdvancedMsgListener(sdkMsgListener);
|
||||
}
|
||||
}
|
||||
|
||||
public void removeAdvancedMsgListener(MethodCall methodCall, MethodChannel.Result result) {
|
||||
String key = methodCall.argument(KEY_ID);
|
||||
listeners.remove(key);
|
||||
if (listeners.isEmpty()) {
|
||||
initializedListener = false;
|
||||
Open_im_sdk.removeAdvancedMsgListener(sdkMsgListener);
|
||||
}
|
||||
}*/
|
||||
/*
|
||||
|
||||
public void addAdvancedMsgListener(MethodCall methodCall, MethodChannel.Result result) {
|
||||
String key = methodCall.argument(KEY_ID);
|
||||
if (!listeners.containsKey(key)) {
|
||||
AdvancedMsgListener listener = new AdvancedMsgListener(key);
|
||||
listeners.put(methodCall.argument(KEY_ID), listener);
|
||||
Open_im_sdk.addAdvancedMsgListener(listener);
|
||||
}
|
||||
}
|
||||
|
||||
public void removeAdvancedMsgListener(MethodCall methodCall, MethodChannel.Result result) {
|
||||
String key = methodCall.argument(KEY_ID);
|
||||
OnAdvancedMsgListener listener = listeners.remove(key);
|
||||
Open_im_sdk.removeAdvancedMsgListener(listener);
|
||||
}
|
||||
|
||||
*/
|
||||
public void setAdvancedMsgListener(MethodCall methodCall, MethodChannel.Result result) {
|
||||
String key = methodCall.argument(KEY_ID);
|
||||
Open_im_sdk.setAdvancedMsgListener(new OnAdvancedMsgListener(key));
|
||||
|
||||
result.success(null);
|
||||
}
|
||||
|
||||
public void sendMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||
@@ -91,41 +27,55 @@ public class MessageManager extends BaseManager {
|
||||
jsonValue(methodCall, "message"),
|
||||
value(methodCall, "userID"),
|
||||
value(methodCall, "groupID"),
|
||||
jsonValue(methodCall, "offlinePushInfo")
|
||||
);
|
||||
}
|
||||
|
||||
public void getHistoryMessageList(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getHistoryMessageList(
|
||||
new OnBaseListener(result),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall)
|
||||
jsonValue(methodCall, "offlinePushInfo"),
|
||||
value(methodCall, "isOnlineOnly")
|
||||
);
|
||||
}
|
||||
|
||||
public void revokeMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.revokeMessage(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall)
|
||||
value(methodCall, "conversationID"),
|
||||
value(methodCall, "clientMsgID")
|
||||
);
|
||||
}
|
||||
|
||||
public void deleteMessageFromLocalStorage(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.deleteMessageFromLocalStorage(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall)
|
||||
value(methodCall, "conversationID"),
|
||||
value(methodCall, "clientMsgID")
|
||||
);
|
||||
}
|
||||
|
||||
// public void deleteMessages(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.deleteMessages(new OnBaseListener(result), CommonUtil.getSDKJsonParam(methodCall));
|
||||
// }
|
||||
public void deleteMessageFromLocalAndSvr(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.deleteMessage(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "conversationID"),
|
||||
value(methodCall, "clientMsgID")
|
||||
);
|
||||
}
|
||||
|
||||
public void deleteAllMsgFromLocal(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.deleteAllMsgFromLocal(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID")
|
||||
);
|
||||
}
|
||||
|
||||
public void deleteAllMsgFromLocalAndSvr(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.deleteAllMsgFromLocalAndSvr(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID")
|
||||
);
|
||||
}
|
||||
|
||||
public void insertSingleMessageToLocalStorage(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.insertSingleMessageToLocalStorage(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "message"),
|
||||
value(methodCall, "receiverID"),
|
||||
@@ -133,22 +83,28 @@ public class MessageManager extends BaseManager {
|
||||
);
|
||||
}
|
||||
|
||||
// public void findMessages(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.findMessages(new OnBaseListener(result), jsonValue(methodCall, "messageIDList"));
|
||||
// }
|
||||
|
||||
public void markC2CMessageAsRead(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.markC2CMessageAsRead(
|
||||
new OnBaseListener(result),
|
||||
public void insertGroupMessageToLocalStorage(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.insertGroupMessageToLocalStorage(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "userID"),
|
||||
jsonValue(methodCall, "message"),
|
||||
value(methodCall, "groupID"),
|
||||
value(methodCall, "senderID")
|
||||
);
|
||||
}
|
||||
|
||||
public void markMessagesAsReadByMsgID(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.markMessagesAsReadByMsgID(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "conversationID"),
|
||||
jsonValue(methodCall, "messageIDList")
|
||||
);
|
||||
}
|
||||
|
||||
public void typingStatusUpdate(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.typingStatusUpdate(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "userID"),
|
||||
value(methodCall, "msgTip")
|
||||
@@ -167,7 +123,10 @@ public class MessageManager extends BaseManager {
|
||||
Open_im_sdk.createTextAtMessage(
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "text"),
|
||||
jsonValue(methodCall, "atUserList")));
|
||||
jsonValue(methodCall, "atUserIDList"),
|
||||
jsonValue(methodCall, "atUserInfoList"),
|
||||
jsonValue(methodCall, "quoteMessage")
|
||||
));
|
||||
}
|
||||
|
||||
public void createImageMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||
@@ -183,6 +142,7 @@ public class MessageManager extends BaseManager {
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "imagePath")));
|
||||
}
|
||||
|
||||
public void createSoundMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||
CommonUtil.runMainThreadReturn(result,
|
||||
Open_im_sdk.createSoundMessage(
|
||||
@@ -285,23 +245,139 @@ public class MessageManager extends BaseManager {
|
||||
));
|
||||
}
|
||||
|
||||
// public void forceSyncMsg(MethodCall methodCall, MethodChannel.Result result) {
|
||||
// Open_im_sdk.forceSyncMsg();
|
||||
// }
|
||||
|
||||
public void clearC2CHistoryMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.clearC2CHistoryMessage(
|
||||
new OnBaseListener(result),
|
||||
public void createFaceMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||
CommonUtil.runMainThreadReturn(result, Open_im_sdk.createFaceMessage(
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "userID")
|
||||
int2long(methodCall, "index"),
|
||||
value(methodCall, "data")
|
||||
));
|
||||
}
|
||||
|
||||
public void createAdvancedTextMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||
CommonUtil.runMainThreadReturn(result,
|
||||
Open_im_sdk.createAdvancedTextMessage(
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "text"),
|
||||
jsonValue(methodCall, "richMessageInfoList")
|
||||
));
|
||||
}
|
||||
|
||||
public void createAdvancedQuoteMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||
CommonUtil.runMainThreadReturn(result,
|
||||
Open_im_sdk.createAdvancedQuoteMessage(
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "quoteText"),
|
||||
jsonValue(methodCall, "quoteMessage"),
|
||||
jsonValue(methodCall, "richMessageInfoList")
|
||||
));
|
||||
}
|
||||
|
||||
public void searchLocalMessages(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.searchLocalMessages(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "filter")
|
||||
);
|
||||
}
|
||||
|
||||
public void clearGroupHistoryMessage(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.clearGroupHistoryMessage(
|
||||
new OnBaseListener(result),
|
||||
|
||||
public void clearConversationAndDeleteAllMsg(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.clearConversationAndDeleteAllMsg(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "groupID")
|
||||
value(methodCall, "conversationID")
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
public void getAdvancedHistoryMessageList(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getAdvancedHistoryMessageList(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall)
|
||||
);
|
||||
}
|
||||
|
||||
public void getAdvancedHistoryMessageListReverse(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getAdvancedHistoryMessageListReverse(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall)
|
||||
);
|
||||
}
|
||||
|
||||
public void findMessageList(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.findMessageList(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "searchParams")
|
||||
);
|
||||
}
|
||||
|
||||
public void setMessageLocalEx(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setMessageLocalEx(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "conversationID"),
|
||||
value(methodCall, "clientMsgID"),
|
||||
value(methodCall, "localEx")
|
||||
);
|
||||
}
|
||||
|
||||
public void setAppBadge(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setAppBadge(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "count")
|
||||
);
|
||||
}
|
||||
|
||||
public void sendMessageNotOss(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.sendMessageNotOss(
|
||||
new OnMsgSendListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "message"),
|
||||
value(methodCall, "userID"),
|
||||
value(methodCall, "groupID"),
|
||||
jsonValue(methodCall, "offlinePushInfo"),
|
||||
value(methodCall, "isOnlineOnly")
|
||||
);
|
||||
}
|
||||
|
||||
public void createImageMessageByURL(MethodCall methodCall, MethodChannel.Result result) {
|
||||
CommonUtil.runMainThreadReturn(result,
|
||||
Open_im_sdk.createImageMessageByURL(
|
||||
value(methodCall, "operationID"),
|
||||
value(methodCall, "sourcePath"),
|
||||
jsonValue(methodCall, "sourcePicture"),
|
||||
jsonValue(methodCall, "bigPicture"),
|
||||
jsonValue(methodCall, "snapshotPicture")));
|
||||
}
|
||||
|
||||
public void createSoundMessageByURL(MethodCall methodCall, MethodChannel.Result result) {
|
||||
CommonUtil.runMainThreadReturn(result,
|
||||
Open_im_sdk.createSoundMessageByURL(
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "soundElem")));
|
||||
}
|
||||
|
||||
public void createVideoMessageByURL(MethodCall methodCall, MethodChannel.Result result) {
|
||||
CommonUtil.runMainThreadReturn(result,
|
||||
Open_im_sdk.createVideoMessageByURL(
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "videoElem")));
|
||||
}
|
||||
|
||||
public void createFileMessageByURL(MethodCall methodCall, MethodChannel.Result result) {
|
||||
CommonUtil.runMainThreadReturn(result,
|
||||
Open_im_sdk.createFileMessageByURL(
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "fileElem")));
|
||||
}
|
||||
|
||||
public void setCustomBusinessListener(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setCustomBusinessListener(new OnCustomBusinessListener());
|
||||
|
||||
result.success(null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,26 +10,55 @@ public class UserManager extends BaseManager {
|
||||
|
||||
public void setUserListener(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setUserListener(new OnUserListener());
|
||||
|
||||
result.success(null);
|
||||
}
|
||||
|
||||
public void getUsersInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getUsersInfo(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "uidList"));
|
||||
jsonValue(methodCall, "userIDList"));
|
||||
}
|
||||
|
||||
public void setSelfInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.setSelfInfo(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall));
|
||||
}
|
||||
|
||||
public void getSelfUserInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getSelfUserInfo(
|
||||
new OnBaseListener(result),
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID")
|
||||
);
|
||||
}
|
||||
public void subscribeUsersStatus(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.subscribeUsersStatus(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "userIDs"));
|
||||
}
|
||||
|
||||
public void unsubscribeUsersStatus(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.unsubscribeUsersStatus(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "userIDs"));
|
||||
}
|
||||
|
||||
public void getSubscribeUsersStatus(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getSubscribeUsersStatus(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID")
|
||||
);
|
||||
}
|
||||
|
||||
public void getUserStatus(MethodCall methodCall, MethodChannel.Result result) {
|
||||
Open_im_sdk.getUserStatus(
|
||||
new OnBaseListener(result, methodCall),
|
||||
value(methodCall, "operationID"),
|
||||
jsonValue(methodCall, "userIDs"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ public class CommonUtil {
|
||||
}
|
||||
|
||||
public synchronized static <T> void emitEvent(String method, String type, Object errCode, String errMsg, T data) {
|
||||
String threadName = Thread.currentThread().getName();
|
||||
runMainThread(() -> {
|
||||
Map<String, Object> res = new ArrayMap<>();
|
||||
if (null != type) {
|
||||
@@ -47,7 +48,7 @@ public class CommonUtil {
|
||||
if (null != errMsg) {
|
||||
res.put("errMsg", errMsg);
|
||||
}
|
||||
Log.i("F-OpenIMSDK(native call flutter)", "{ method:" + method + ", type:" + type + " }");
|
||||
Log.i("F-OpenIMSDK(native call flutter)", "thread: " + threadName + " { method:" + method + ", type:" + type + " }");
|
||||
FlutterOpenimSdkPlugin.channel.invokeMethod(method, res);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -4,8 +4,9 @@ import org.json.JSONObject;
|
||||
|
||||
public class JsonUtil {
|
||||
public static String toString(Object o) {
|
||||
if (o == null) return null;
|
||||
if (o instanceof String) {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
buffer.append("\"");
|
||||
buffer.append(o);
|
||||
buffer.append("\"");
|
||||
|
||||
5
example/.gitignore
vendored
@@ -8,6 +8,7 @@
|
||||
.buildlog/
|
||||
.history
|
||||
.svn/
|
||||
migrate_working_dir/
|
||||
|
||||
# IntelliJ related
|
||||
*.iml
|
||||
@@ -26,14 +27,10 @@
|
||||
.dart_tool/
|
||||
.flutter-plugins
|
||||
.flutter-plugins-dependencies
|
||||
.packages
|
||||
.pub-cache/
|
||||
.pub/
|
||||
/build/
|
||||
|
||||
# Web related
|
||||
lib/generated_plugin_registrant.dart
|
||||
|
||||
# Symbolication related
|
||||
app.*.symbols
|
||||
|
||||
|
||||
@@ -4,7 +4,42 @@
|
||||
# This file should be version controlled and should not be manually edited.
|
||||
|
||||
version:
|
||||
revision: b22742018b3edf16c6cadd7b76d9db5e7f9064b5
|
||||
channel: stable
|
||||
revision: "b0850beeb25f6d5b10426284f506557f66181b36"
|
||||
channel: "stable"
|
||||
|
||||
project_type: app
|
||||
|
||||
# Tracks metadata for the flutter migrate command
|
||||
migration:
|
||||
platforms:
|
||||
- platform: root
|
||||
create_revision: b0850beeb25f6d5b10426284f506557f66181b36
|
||||
base_revision: b0850beeb25f6d5b10426284f506557f66181b36
|
||||
- platform: android
|
||||
create_revision: b0850beeb25f6d5b10426284f506557f66181b36
|
||||
base_revision: b0850beeb25f6d5b10426284f506557f66181b36
|
||||
- platform: ios
|
||||
create_revision: b0850beeb25f6d5b10426284f506557f66181b36
|
||||
base_revision: b0850beeb25f6d5b10426284f506557f66181b36
|
||||
- platform: linux
|
||||
create_revision: b0850beeb25f6d5b10426284f506557f66181b36
|
||||
base_revision: b0850beeb25f6d5b10426284f506557f66181b36
|
||||
- platform: macos
|
||||
create_revision: b0850beeb25f6d5b10426284f506557f66181b36
|
||||
base_revision: b0850beeb25f6d5b10426284f506557f66181b36
|
||||
- platform: web
|
||||
create_revision: b0850beeb25f6d5b10426284f506557f66181b36
|
||||
base_revision: b0850beeb25f6d5b10426284f506557f66181b36
|
||||
- platform: windows
|
||||
create_revision: b0850beeb25f6d5b10426284f506557f66181b36
|
||||
base_revision: b0850beeb25f6d5b10426284f506557f66181b36
|
||||
|
||||
# User provided section
|
||||
|
||||
# List of Local paths (relative to this file) that should be
|
||||
# ignored by the migrate tool.
|
||||
#
|
||||
# Files that are not part of the templates will be ignored by default.
|
||||
unmanaged_files:
|
||||
- 'lib/main.dart'
|
||||
- 'ios/Runner.xcodeproj/project.pbxproj'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# flutter_openim_sdk_example
|
||||
# example
|
||||
|
||||
Demonstrates how to use the flutter_openim_sdk plugin.
|
||||
A new Flutter project.
|
||||
|
||||
## Getting Started
|
||||
|
||||
@@ -8,9 +8,9 @@ This project is a starting point for a Flutter application.
|
||||
|
||||
A few resources to get you started if this is your first Flutter project:
|
||||
|
||||
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
|
||||
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
|
||||
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
|
||||
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
|
||||
|
||||
For help getting started with Flutter, view our
|
||||
[online documentation](https://flutter.dev/docs), which offers tutorials,
|
||||
For help getting started with Flutter development, view the
|
||||
[online documentation](https://docs.flutter.dev/), which offers tutorials,
|
||||
samples, guidance on mobile development, and a full API reference.
|
||||
|
||||
28
example/analysis_options.yaml
Normal file
@@ -0,0 +1,28 @@
|
||||
# This file configures the analyzer, which statically analyzes Dart code to
|
||||
# check for errors, warnings, and lints.
|
||||
#
|
||||
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
|
||||
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
|
||||
# invoked from the command line by running `flutter analyze`.
|
||||
|
||||
# The following line activates a set of recommended lints for Flutter apps,
|
||||
# packages, and plugins designed to encourage good coding practices.
|
||||
include: package:flutter_lints/flutter.yaml
|
||||
|
||||
linter:
|
||||
# The lint rules applied to this project can be customized in the
|
||||
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
|
||||
# included above or to enable additional rules. A list of all available lints
|
||||
# and their documentation is published at https://dart.dev/lints.
|
||||
#
|
||||
# Instead of disabling a lint rule for the entire project in the
|
||||
# section below, it can also be suppressed for a single line of code
|
||||
# or a specific dart file by using the `// ignore: name_of_lint` and
|
||||
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
|
||||
# producing the lint.
|
||||
rules:
|
||||
# avoid_print: false # Uncomment to disable the `avoid_print` rule
|
||||
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
|
||||
|
||||
# Additional information about this file can be found at
|
||||
# https://dart.dev/guides/language/analysis-options
|
||||
2
example/android/.gitignore
vendored
@@ -9,3 +9,5 @@ GeneratedPluginRegistrant.java
|
||||
# Remember to never publicly share your keystore.
|
||||
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
|
||||
key.properties
|
||||
**/*.keystore
|
||||
**/*.jks
|
||||
|
||||
@@ -1,69 +1,58 @@
|
||||
plugins {
|
||||
id "com.android.application"
|
||||
id "kotlin-android"
|
||||
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
|
||||
id "dev.flutter.flutter-gradle-plugin"
|
||||
}
|
||||
|
||||
def localProperties = new Properties()
|
||||
def localPropertiesFile = rootProject.file('local.properties')
|
||||
def localPropertiesFile = rootProject.file("local.properties")
|
||||
if (localPropertiesFile.exists()) {
|
||||
localPropertiesFile.withReader('UTF-8') { reader ->
|
||||
localPropertiesFile.withReader("UTF-8") { reader ->
|
||||
localProperties.load(reader)
|
||||
}
|
||||
}
|
||||
|
||||
def flutterRoot = localProperties.getProperty('flutter.sdk')
|
||||
if (flutterRoot == null) {
|
||||
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
|
||||
}
|
||||
|
||||
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
||||
def flutterVersionCode = localProperties.getProperty("flutter.versionCode")
|
||||
if (flutterVersionCode == null) {
|
||||
flutterVersionCode = '1'
|
||||
flutterVersionCode = "1"
|
||||
}
|
||||
|
||||
def flutterVersionName = localProperties.getProperty('flutter.versionName')
|
||||
def flutterVersionName = localProperties.getProperty("flutter.versionName")
|
||||
if (flutterVersionName == null) {
|
||||
flutterVersionName = '1.0'
|
||||
flutterVersionName = "1.0"
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
namespace = "com.example.example"
|
||||
compileSdk = flutter.compileSdkVersion
|
||||
ndkVersion = flutter.ndkVersion
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId "io.openim.flutter_openim_sdk_example"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
applicationId = "com.example.example"
|
||||
// You can update the following values to match your application needs.
|
||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||
minSdk = flutter.minSdkVersion
|
||||
targetSdk = flutter.targetSdkVersion
|
||||
versionCode = flutterVersionCode.toInteger()
|
||||
versionName = flutterVersionName
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
release {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
// signingConfig signingConfigs.debug
|
||||
|
||||
signingConfig signingConfigs.debug
|
||||
|
||||
minifyEnabled false
|
||||
shrinkResources false
|
||||
|
||||
useProguard true
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
repositories{
|
||||
flatDir {
|
||||
dirs 'libs'
|
||||
signingConfig = signingConfigs.debug
|
||||
}
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
|
||||
}
|
||||
flutter {
|
||||
source '../..'
|
||||
source = "../.."
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="io.openim.flutter_openim_sdk_example">
|
||||
<!-- Flutter needs it to communicate with the running application
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- The INTERNET permission is required for development. Specifically,
|
||||
the Flutter tool needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="io.openim.flutter_openim_sdk_example">
|
||||
<application
|
||||
android:label="flutter_openim_sdk_example"
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<application
|
||||
android:label="example"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTop"
|
||||
android:taskAffinity=""
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:hardwareAccelerated="true"
|
||||
@@ -18,15 +20,6 @@
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme"
|
||||
/>
|
||||
<!-- Displays an Android View that continues showing the launch screen
|
||||
Drawable until Flutter paints its first frame, then this splash
|
||||
screen fades out. A splash screen is useful to avoid any visual
|
||||
gap between the end of Android's launch screen and the painting of
|
||||
Flutter's first frame. -->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.SplashScreenDrawable"
|
||||
android:resource="@drawable/launch_background"
|
||||
/>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
@@ -38,4 +31,15 @@
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
</application>
|
||||
<!-- Required to query activities that can process text, see:
|
||||
https://developer.android.com/training/package-visibility and
|
||||
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
|
||||
|
||||
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
|
||||
<queries>
|
||||
<intent>
|
||||
<action android:name="android.intent.action.PROCESS_TEXT"/>
|
||||
<data android:mimeType="text/plain"/>
|
||||
</intent>
|
||||
</queries>
|
||||
</manifest>
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
package io.openim.flutter_openim_sdk_example;
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity;
|
||||
|
||||
public class MainActivity extends FlutterActivity {
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.example.example
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
|
||||
class MainActivity: FlutterActivity()
|
||||
|
Before Width: | Height: | Size: 544 B After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 442 B After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 721 B After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 7.6 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 11 KiB |
@@ -3,7 +3,7 @@
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
Flutter draws its first frame -->
|
||||
the Flutter engine draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
Flutter draws its first frame -->
|
||||
the Flutter engine draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="io.openim.flutter_openim_sdk_example">
|
||||
<!-- Flutter needs it to communicate with the running application
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- The INTERNET permission is required for development. Specifically,
|
||||
the Flutter tool needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
||||
@@ -1,35 +1,18 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
|
||||
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
|
||||
maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
|
||||
maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.5.1'
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
|
||||
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
|
||||
maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
|
||||
maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.buildDir = '../build'
|
||||
rootProject.buildDir = "../build"
|
||||
subprojects {
|
||||
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
||||
project.evaluationDependsOn(':app')
|
||||
}
|
||||
subprojects {
|
||||
project.evaluationDependsOn(":app")
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
tasks.register("clean", Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
org.gradle.jvmargs=-Xmx1536M
|
||||
org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#Fri Jun 23 08:50:38 CEST 2017
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
|
||||
|
||||
107
example/android/proguard-rules.pro
vendored
@@ -1,107 +0,0 @@
|
||||
#默认的proguard-android.txt已经增加了Annotation、native、view的setget方法、Activity参数为view的 方法、Enum枚举、Parcelable、R,此处不再写
|
||||
#------------------------------------------通用区域----------------------------------------------------
|
||||
#----------------------基本指令------------------------
|
||||
-optimizationpasses 5
|
||||
-dontusemixedcaseclassnames
|
||||
-dontskipnonpubliclibraryclasses
|
||||
-dontskipnonpubliclibraryclassmembers
|
||||
-dontpreverify
|
||||
-verbose
|
||||
-printmapping proguardMapping.txt
|
||||
-optimizations !code/simplification/cast,!field/*,!class/merging/*
|
||||
-keepattributes *Annotation*,InnerClasses
|
||||
-keepattributes Signature
|
||||
-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
#如果引用了v4或者v7包
|
||||
-dontwarn android.support.**
|
||||
-keep class android.support.** { *; }
|
||||
-keep interface android.support.** { *; }
|
||||
-keep public class * extends android.support.**
|
||||
-dontwarn android.support.**
|
||||
|
||||
#如果引用了androidx包
|
||||
-keep class com.google.android.material.** {*;}
|
||||
-keep class androidx.** {*;}
|
||||
-keep public class * extends androidx.**
|
||||
-keep interface androidx.** {*;}
|
||||
-dontwarn com.google.android.material.**
|
||||
-dontnote com.google.android.material.**
|
||||
-dontwarn androidx.**
|
||||
|
||||
#---------------------默认保留-------------------------
|
||||
## 基础保留 ##
|
||||
-keep public class * extends android.app.Fragment
|
||||
-keep public class * extends android.app.Activity
|
||||
-keep public class * extends android.app.Application
|
||||
-keep public class * extends android.app.Service
|
||||
-keep public class * extends android.content.BroadcastReceiver
|
||||
-keep public class * extends android.content.ContentProvider
|
||||
-keep public class * extends android.app.backup.BackupAgentHelper
|
||||
-keep public class * extends android.preference.Preference
|
||||
-keep public class com.android.vending.licensing.ILicensingService
|
||||
|
||||
-keep public class * extends android.view.View {
|
||||
public <init>(android.content.Context);
|
||||
public <init>(android.content.Context, android.util.AttributeSet);
|
||||
public <init>(android.content.Context, android.util.AttributeSet, int);
|
||||
public void set*(...);
|
||||
}
|
||||
# 保持自定义控件类不被混淆
|
||||
-keepclasseswithmembers class * {
|
||||
public <init>(android.content.Context, android.util.AttributeSet);
|
||||
public <init>(android.content.Context, android.util.AttributeSet, int);
|
||||
}
|
||||
#保持自定义控件类不被混淆
|
||||
-keepclassmembers class * extends android.app.Activity {
|
||||
public void *(android.view.View);
|
||||
}
|
||||
-keepclassmembers enum * { # 保持枚举 enum 类不被混淆
|
||||
public static **[] values();
|
||||
public static ** valueOf(java.lang.String);
|
||||
}
|
||||
-keep class * implements android.os.Parcelable { # 保持 Parcelable 不被混淆
|
||||
public static final android.os.Parcelable$Creator *;
|
||||
}
|
||||
-keep class * implements java.io.Serializable # 保持 Serializable 不被混淆
|
||||
#保持 Serializable 不被混淆并且enum 类也不被混淆
|
||||
-keepclassmembers class * implements java.io.Serializable {
|
||||
static final long serialVersionUID;
|
||||
private static final java.io.ObjectStreamField[] serialPersistentFields;
|
||||
!static !transient <fields>;
|
||||
!private <fields>;
|
||||
!private <methods>;
|
||||
private void writeObject(java.io.ObjectOutputStream);
|
||||
private void readObject(java.io.ObjectInputStream);
|
||||
java.lang.Object writeReplace();
|
||||
java.lang.Object readResolve();
|
||||
}
|
||||
#不混淆资源类
|
||||
-keepclassmembers class **.R$* {
|
||||
public static <fields>;
|
||||
}
|
||||
# 保持 native 方法不被混淆
|
||||
-keepclasseswithmembernames class * {
|
||||
native <methods>;
|
||||
}
|
||||
|
||||
#WebView
|
||||
-keepclassmembers class * extends android.webkit.WebView {*;}
|
||||
-keepclassmembers class * extends android.webkit.WebViewClient {*;}
|
||||
-keepclassmembers class * extends android.webkit.WebChromeClient {*;}
|
||||
-keepclassmembers class * {
|
||||
@android.webkit.JavascriptInterface <methods>;
|
||||
}
|
||||
|
||||
-keep class androidx.lifecycle.DefaultLifecycleObserver
|
||||
#-------------------------------------------项目定义区-------------------------------------------------
|
||||
#im
|
||||
-keep class io.openim.flutter_openim_sdk.** { *; }
|
||||
#Flutter Wrapper
|
||||
#-dontwarn io.flutter.**
|
||||
#-keep class io.flutter.app.** { *; }
|
||||
#-keep class io.flutter.plugin.** { *; }
|
||||
#-keep class io.flutter.util.** { *; }
|
||||
#-keep class io.flutter.view.** { *; }
|
||||
#-keep class io.flutter.** { *; }
|
||||
#-keep class io.flutter.plugins.** { *; }
|
||||
@@ -1,11 +1,25 @@
|
||||
include ':app'
|
||||
pluginManagement {
|
||||
def flutterSdkPath = {
|
||||
def properties = new Properties()
|
||||
file("local.properties").withInputStream { properties.load(it) }
|
||||
def flutterSdkPath = properties.getProperty("flutter.sdk")
|
||||
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
|
||||
return flutterSdkPath
|
||||
}()
|
||||
|
||||
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
|
||||
def properties = new Properties()
|
||||
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
|
||||
|
||||
assert localPropertiesFile.exists()
|
||||
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
|
||||
def flutterSdkPath = properties.getProperty("flutter.sdk")
|
||||
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
|
||||
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
|
||||
plugins {
|
||||
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
|
||||
id "com.android.application" version "7.3.0" apply false
|
||||
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
|
||||
}
|
||||
|
||||
include ":app"
|
||||
|
||||
1
example/ios/.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
**/dgph
|
||||
*.mode1v3
|
||||
*.mode2v3
|
||||
*.moved-aside
|
||||
|
||||
@@ -21,6 +21,6 @@
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>9.0</string>
|
||||
<string>12.0</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Uncomment this line to define a global platform for your project
|
||||
# platform :ios, '9.0'
|
||||
# platform :ios, '12.0'
|
||||
|
||||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
|
||||
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
|
||||
@@ -32,6 +32,9 @@ target 'Runner' do
|
||||
use_modular_headers!
|
||||
|
||||
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
|
||||
target 'RunnerTests' do
|
||||
inherit! :search_paths
|
||||
end
|
||||
end
|
||||
|
||||
post_install do |installer|
|
||||
|
||||
29
example/ios/Podfile.lock
Normal file
@@ -0,0 +1,29 @@
|
||||
PODS:
|
||||
- Flutter (1.0.0)
|
||||
- flutter_openim_sdk (0.0.1):
|
||||
- Flutter
|
||||
- OpenIMSDKCore (= 3.8.2)
|
||||
- OpenIMSDKCore (3.8.2)
|
||||
|
||||
DEPENDENCIES:
|
||||
- Flutter (from `Flutter`)
|
||||
- flutter_openim_sdk (from `.symlinks/plugins/flutter_openim_sdk/ios`)
|
||||
|
||||
SPEC REPOS:
|
||||
trunk:
|
||||
- OpenIMSDKCore
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
Flutter:
|
||||
:path: Flutter
|
||||
flutter_openim_sdk:
|
||||
:path: ".symlinks/plugins/flutter_openim_sdk/ios"
|
||||
|
||||
SPEC CHECKSUMS:
|
||||
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
|
||||
flutter_openim_sdk: 77bdd08fb8dda1644a0c150b8ba7324f11b32404
|
||||
OpenIMSDKCore: aaffd63079a874d9272b8b962598723cb8128d32
|
||||
|
||||
PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796
|
||||
|
||||
COCOAPODS: 1.15.2
|
||||
@@ -3,19 +3,31 @@
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 51;
|
||||
objectVersion = 54;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||
6F7F8B794B6D663E7A65A104 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1971A63CCEC4B744C25980F8 /* Pods_Runner.framework */; };
|
||||
3E0FE62DE2A4D4E61AC3FD02 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BB3D975831D21A8FACEF96B /* Pods_Runner.framework */; };
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||
F32475A5B591900F07118022 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 119B0071FAB85FAD36937602 /* Pods_RunnerTests.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 97C146E61CF9000F007C117D /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = 97C146ED1CF9000F007C117D;
|
||||
remoteInfo = Runner;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
@@ -30,16 +42,19 @@
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
076751BE520B721535096B75 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
|
||||
119B0071FAB85FAD36937602 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||
1971A63CCEC4B744C25980F8 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3A6AB9CCD90A2F5C2CE719D0 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
||||
331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
|
||||
331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
||||
4D6806EF7C87F4A8E899A73E /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
||||
5C84146D7BEE11433AA4DE9E /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||
7CF14C3CACE83F04F858C9EC /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
7D277EA428A8FDCA196F3196 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
|
||||
8BB3D975831D21A8FACEF96B /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
||||
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
@@ -47,26 +62,51 @@
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
BD60456F5D1660BF5A90F9A1 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
|
||||
F0FFA291A8BB24B66A6DCC8C /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
FA507785CCEA4423C40C3CCD /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
1B803A0F046E9658A8FCEED0 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
F32475A5B591900F07118022 /* Pods_RunnerTests.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
97C146EB1CF9000F007C117D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
6F7F8B794B6D663E7A65A104 /* Pods_Runner.framework in Frameworks */,
|
||||
3E0FE62DE2A4D4E61AC3FD02 /* Pods_Runner.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
4B877210D623EE0FDE18A08F /* Frameworks */ = {
|
||||
331C8082294A63A400263BE5 /* RunnerTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1971A63CCEC4B744C25980F8 /* Pods_Runner.framework */,
|
||||
331C807B294A618700263BE5 /* RunnerTests.swift */,
|
||||
);
|
||||
name = Frameworks;
|
||||
path = RunnerTests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8575235C80CAB4F7FB7F5B46 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FA507785CCEA4423C40C3CCD /* Pods-Runner.debug.xcconfig */,
|
||||
4D6806EF7C87F4A8E899A73E /* Pods-Runner.release.xcconfig */,
|
||||
7D277EA428A8FDCA196F3196 /* Pods-Runner.profile.xcconfig */,
|
||||
F0FFA291A8BB24B66A6DCC8C /* Pods-RunnerTests.debug.xcconfig */,
|
||||
5C84146D7BEE11433AA4DE9E /* Pods-RunnerTests.release.xcconfig */,
|
||||
BD60456F5D1660BF5A90F9A1 /* Pods-RunnerTests.profile.xcconfig */,
|
||||
);
|
||||
name = Pods;
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9740EEB11CF90186004384FC /* Flutter */ = {
|
||||
@@ -86,8 +126,9 @@
|
||||
9740EEB11CF90186004384FC /* Flutter */,
|
||||
97C146F01CF9000F007C117D /* Runner */,
|
||||
97C146EF1CF9000F007C117D /* Products */,
|
||||
E653626F5A38799455FF26C4 /* Pods */,
|
||||
4B877210D623EE0FDE18A08F /* Frameworks */,
|
||||
331C8082294A63A400263BE5 /* RunnerTests */,
|
||||
8575235C80CAB4F7FB7F5B46 /* Pods */,
|
||||
B94289CF044A7671B3BECB8E /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
@@ -95,6 +136,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
97C146EE1CF9000F007C117D /* Runner.app */,
|
||||
331C8081294A63A400263BE5 /* RunnerTests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
@@ -114,31 +156,48 @@
|
||||
path = Runner;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E653626F5A38799455FF26C4 /* Pods */ = {
|
||||
B94289CF044A7671B3BECB8E /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
7CF14C3CACE83F04F858C9EC /* Pods-Runner.debug.xcconfig */,
|
||||
3A6AB9CCD90A2F5C2CE719D0 /* Pods-Runner.release.xcconfig */,
|
||||
076751BE520B721535096B75 /* Pods-Runner.profile.xcconfig */,
|
||||
8BB3D975831D21A8FACEF96B /* Pods_Runner.framework */,
|
||||
119B0071FAB85FAD36937602 /* Pods_RunnerTests.framework */,
|
||||
);
|
||||
path = Pods;
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
331C8080294A63A400263BE5 /* RunnerTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
|
||||
buildPhases = (
|
||||
70DBF52745AF25A4FC72D8C3 /* [CP] Check Pods Manifest.lock */,
|
||||
331C807D294A63A400263BE5 /* Sources */,
|
||||
331C807F294A63A400263BE5 /* Resources */,
|
||||
1B803A0F046E9658A8FCEED0 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
331C8086294A63A400263BE5 /* PBXTargetDependency */,
|
||||
);
|
||||
name = RunnerTests;
|
||||
productName = RunnerTests;
|
||||
productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
97C146ED1CF9000F007C117D /* Runner */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||
buildPhases = (
|
||||
FA9CAD2EF743D14467F7D993 /* [CP] Check Pods Manifest.lock */,
|
||||
3DCEC8459668E43AE9B4C8D5 /* [CP] Check Pods Manifest.lock */,
|
||||
9740EEB61CF901F6004384FC /* Run Script */,
|
||||
97C146EA1CF9000F007C117D /* Sources */,
|
||||
97C146EB1CF9000F007C117D /* Frameworks */,
|
||||
97C146EC1CF9000F007C117D /* Resources */,
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||
215A1CA82008A326A8ECBF65 /* [CP] Embed Pods Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -155,9 +214,14 @@
|
||||
97C146E61CF9000F007C117D /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1300;
|
||||
BuildIndependentTargetsInParallel = YES;
|
||||
LastUpgradeCheck = 1510;
|
||||
ORGANIZATIONNAME = "";
|
||||
TargetAttributes = {
|
||||
331C8080294A63A400263BE5 = {
|
||||
CreatedOnToolsVersion = 14.0;
|
||||
TestTargetID = 97C146ED1CF9000F007C117D;
|
||||
};
|
||||
97C146ED1CF9000F007C117D = {
|
||||
CreatedOnToolsVersion = 7.3.1;
|
||||
LastSwiftMigration = 1100;
|
||||
@@ -178,11 +242,19 @@
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
97C146ED1CF9000F007C117D /* Runner */,
|
||||
331C8080294A63A400263BE5 /* RunnerTests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
331C807F294A63A400263BE5 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
97C146EC1CF9000F007C117D /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -197,29 +269,14 @@
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
215A1CA82008A326A8ECBF65 /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
|
||||
);
|
||||
name = "Thin Binary";
|
||||
outputPaths = (
|
||||
@@ -228,21 +285,7 @@
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
|
||||
};
|
||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Run Script";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
||||
};
|
||||
FA9CAD2EF743D14467F7D993 /* [CP] Check Pods Manifest.lock */ = {
|
||||
3DCEC8459668E43AE9B4C8D5 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
@@ -264,9 +307,54 @@
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
70DBF52745AF25A4FC72D8C3 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Run Script";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
331C807D294A63A400263BE5 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
97C146EA1CF9000F007C117D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
@@ -278,6 +366,14 @@
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 97C146ED1CF9000F007C117D /* Runner */;
|
||||
targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
@@ -302,6 +398,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
@@ -331,6 +428,7 @@
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
@@ -339,7 +437,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = iphoneos;
|
||||
@@ -352,18 +450,17 @@
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD)";
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
DEVELOPMENT_TEAM = BDLHL8GNFV;
|
||||
DEVELOPMENT_TEAM = V57RT7LMFH;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = io.openim.flutterOpenimSdkExample;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
@@ -371,10 +468,61 @@
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
331C8088294A63A400263BE5 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = F0FFA291A8BB24B66A6DCC8C /* Pods-RunnerTests.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.example.RunnerTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
331C8089294A63A400263BE5 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 5C84146D7BEE11433AA4DE9E /* Pods-RunnerTests.release.xcconfig */;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.example.RunnerTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
331C808A294A63A400263BE5 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = BD60456F5D1660BF5A90F9A1 /* Pods-RunnerTests.profile.xcconfig */;
|
||||
buildSettings = {
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.example.RunnerTests;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
97C147031CF9000F007C117D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
@@ -404,6 +552,7 @@
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
@@ -418,7 +567,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
@@ -430,6 +579,7 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
@@ -459,6 +609,7 @@
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
@@ -467,7 +618,7 @@
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SUPPORTED_PLATFORMS = iphoneos;
|
||||
@@ -482,18 +633,17 @@
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD)";
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
DEVELOPMENT_TEAM = BDLHL8GNFV;
|
||||
DEVELOPMENT_TEAM = V57RT7LMFH;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = io.openim.flutterOpenimSdkExample;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
@@ -506,18 +656,17 @@
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD)";
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
DEVELOPMENT_TEAM = BDLHL8GNFV;
|
||||
DEVELOPMENT_TEAM = V57RT7LMFH;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = io.openim.flutterOpenimSdkExample;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.example;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
@@ -528,6 +677,16 @@
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
331C8088294A63A400263BE5 /* Debug */,
|
||||
331C8089294A63A400263BE5 /* Release */,
|
||||
331C808A294A63A400263BE5 /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1300"
|
||||
LastUpgradeVersion = "1510"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
@@ -27,8 +27,6 @@
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
@@ -38,8 +36,19 @@
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO"
|
||||
parallelizable = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "331C8080294A63A400263BE5"
|
||||
BuildableName = "RunnerTests.xctest"
|
||||
BlueprintName = "RunnerTests"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
@@ -61,8 +70,6 @@
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Profile"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import UIKit
|
||||
import Flutter
|
||||
import UIKit
|
||||
|
||||
@UIApplicationMain
|
||||
@main
|
||||
@objc class AppDelegate: FlutterAppDelegate {
|
||||
override func application(
|
||||
_ application: UIApplication,
|
||||
|
||||
|
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 579 B |
|
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 970 B |
|
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 68 B |
|
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 68 B |
|
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 68 B |
@@ -1,10 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19455" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19454"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Flutter View Controller-->
|
||||
@@ -16,14 +14,13 @@
|
||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-26" y="-44"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Example</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
@@ -11,7 +13,7 @@
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>flutter_openim_sdk_example</string>
|
||||
<string>example</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
@@ -39,7 +41,9 @@
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||
<true/>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
12
example/ios/RunnerTests/RunnerTests.swift
Normal file
@@ -0,0 +1,12 @@
|
||||
import Flutter
|
||||
import UIKit
|
||||
import XCTest
|
||||
|
||||
class RunnerTests: XCTestCase {
|
||||
|
||||
func testExample() {
|
||||
// If you add code to the Runner application, consider adding tests here.
|
||||
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_openim_sdk/flutter_openim_sdk.dart';
|
||||
|
||||
@@ -15,6 +14,12 @@ class _MyAppState extends State<MyApp> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
OpenIM.iMManager.initSDK(
|
||||
platformID: 1,
|
||||
apiAddr: '',
|
||||
wsAddr: '',
|
||||
dataDir: '/',
|
||||
listener: OnConnectListener());
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -32,520 +37,4 @@ class _MyAppState extends State<MyApp> {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void initSDK() {
|
||||
OpenIM.iMManager
|
||||
.initSDK(
|
||||
// "当前平台,参照IMPlatform类",
|
||||
platform: 0,
|
||||
// SDK的API接口地址。如:http:xxx:10000
|
||||
apiAddr: "",
|
||||
// SDK的web socket地址。如: ws:xxx:17778
|
||||
wsAddr: "",
|
||||
// 数据存储路径。如:var apath =(await getApplicationDocumentsDirectory()).path
|
||||
dataDir: "",
|
||||
listener: OnConnectListener(
|
||||
onConnectSuccess: () {
|
||||
// 已经成功连接到服务器
|
||||
},
|
||||
onConnecting: () {
|
||||
// 正在连接到服务器,适合在 UI 上展示“正在连接”状态。
|
||||
},
|
||||
onConnectFailed: (code, errorMsg) {
|
||||
// 连接服务器失败,可以提示用户当前网络连接不可用
|
||||
},
|
||||
onUserSigExpired: () {
|
||||
// 登录票据已经过期,请使用新签发的 UserSig 进行登录。
|
||||
},
|
||||
onKickedOffline: () {
|
||||
// 当前用户被踢下线,此时可以 UI 提示用户“您已经在其他端登录了当前账号,是否重新登录?”
|
||||
},
|
||||
),
|
||||
)
|
||||
.then((value) {
|
||||
if (value == true) {
|
||||
// 初始化成功
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void setLisenter() {
|
||||
OpenIM.iMManager
|
||||
..userManager.setUserListener(OnUserListener(
|
||||
onSelfInfoUpdated: (userInfo) {
|
||||
// 当前登录用户资料变更回调
|
||||
},
|
||||
))
|
||||
..messageManager.setAdvancedMsgListener(OnAdvancedMsgListener(
|
||||
onRecvNewMessage: (message) {
|
||||
// 收到新消息,界面添加新消息
|
||||
},
|
||||
onRecvMessageRevoked: (messageID) {
|
||||
// 消息成功撤回,从界面移除消息
|
||||
},
|
||||
onRecvC2CReadReceipt: (list) {
|
||||
// 消息被阅读回执,将消息标记为已读
|
||||
},
|
||||
))
|
||||
..messageManager.setMsgSendProgressListener(OnMsgSendProgressListener(
|
||||
onProgress: (messageID, progress) {
|
||||
// 消息发送进度回调
|
||||
},
|
||||
))
|
||||
..friendshipManager.setFriendshipListener(OnFriendshipListener(
|
||||
onFriendApplicationRejected: (applicationInfo) {
|
||||
// 发出或收到的好友申请被拒绝
|
||||
},
|
||||
onFriendApplicationDeleted: (applicationInfo) {
|
||||
// 发出或收到的好友申请被删除
|
||||
},
|
||||
onFriendApplicationAdded: (applicationInfo) {
|
||||
// 发出或收到的好友申请被添加
|
||||
},
|
||||
onFriendApplicationAccepted: (applicationInfo) {
|
||||
// 发出或收到的好友申请已同意
|
||||
},
|
||||
onFriendAdded: (frinedInfo) {
|
||||
// 好友被添加
|
||||
},
|
||||
onFriendDeleted: (frinedInfo) {
|
||||
// 好友被删除
|
||||
},
|
||||
onFriendInfoChanged: (frinedInfo) {
|
||||
// 朋友的资料发生变化
|
||||
},
|
||||
onBlacklistDeleted: (blackInfo) {
|
||||
// 从黑名单删除
|
||||
},
|
||||
onBlacklistAdded: (blackInfo) {
|
||||
// 拉入黑名单
|
||||
},
|
||||
))
|
||||
..conversationManager.setConversationListener(OnConversationListener(
|
||||
onNewConversation: (list) {
|
||||
// 新增会话
|
||||
},
|
||||
onConversationChanged: (list) {
|
||||
// 已添加的会话发送改变
|
||||
},
|
||||
onTotalUnreadMessageCountChanged: (count) {
|
||||
// 未读消息数发送变化
|
||||
},
|
||||
))
|
||||
..groupManager.setGroupListener(OnGroupListener(
|
||||
onGroupMemberInfoChanged: (memberInfo) {
|
||||
// 组成员信息发生变化
|
||||
},
|
||||
onGroupMemberDeleted: (memberInfo) {
|
||||
// 组成员退出
|
||||
},
|
||||
onGroupMemberAdded: (memberInfo) {
|
||||
// 组成员进入
|
||||
},
|
||||
onGroupApplicationRejected: (applicationInfo) {
|
||||
// 发出或收到的组申请被拒绝
|
||||
},
|
||||
onGroupApplicationDeleted: (applicationInfo) {
|
||||
// 发出或收到的组申请被删除
|
||||
},
|
||||
onGroupApplicationAdded: (applicationInfo) {
|
||||
// 发出或收到的组申请有新增
|
||||
},
|
||||
onGroupApplicationAccepted: (applicationInfo) {
|
||||
// 发出或收到的组申请被接受
|
||||
},
|
||||
onJoinedGroupDeleted: (groupInfo) {
|
||||
// 退出群:退出者收到;踢出群:被踢者收到
|
||||
},
|
||||
onJoinedGroupAdded: (groupInfo) {
|
||||
// 创建群: 初始成员收到;邀请进群:被邀请者收到
|
||||
},
|
||||
onGroupInfoChanged: (groupInfo) {
|
||||
// 组资料变更
|
||||
},
|
||||
));
|
||||
}
|
||||
|
||||
void login() {
|
||||
OpenIM.iMManager
|
||||
.login(
|
||||
uid: "", // uid来自于自身业务服务器
|
||||
token: "", // token需要业务服务器根据secret向OpenIM服务端交换获取
|
||||
)
|
||||
.then((value) {
|
||||
// 返回当前登录用户的资料
|
||||
});
|
||||
}
|
||||
|
||||
void imMager() {
|
||||
OpenIM.iMManager.logout().then((_) {
|
||||
// 退出成功
|
||||
});
|
||||
|
||||
OpenIM.iMManager.getLoginUserInfo().then((userInfo) {
|
||||
// 当前登录用户的信息
|
||||
});
|
||||
|
||||
OpenIM.iMManager.getLoginUserID().then((userID) {
|
||||
// 当前登录用户的ID
|
||||
});
|
||||
}
|
||||
|
||||
void userManager() {
|
||||
OpenIM.iMManager.userManager.getUsersInfo(
|
||||
uidList: [], // 用户ID集合
|
||||
).then((userInfoList) {
|
||||
// 用户信息列表
|
||||
});
|
||||
|
||||
OpenIM.iMManager.userManager.getSelfUserInfo().then((userInfo) {
|
||||
// 返回当前登录用户的资料
|
||||
});
|
||||
|
||||
OpenIM.iMManager.userManager
|
||||
.setSelfInfo(
|
||||
nickname: '',
|
||||
// 昵称
|
||||
faceURL: '',
|
||||
// 头像
|
||||
gender: 0,
|
||||
// 性别: 男1,女0
|
||||
phoneNumber: '',
|
||||
// 手机号
|
||||
email: '',
|
||||
//邮箱
|
||||
birth: 0,
|
||||
//生日
|
||||
ex: '', // 其他信息
|
||||
)
|
||||
.then((_) {});
|
||||
}
|
||||
|
||||
void conversationManager() {
|
||||
OpenIM.iMManager.conversationManager.getAllConversationList().then((list) {
|
||||
// List<ConversationInfo> 会话列表
|
||||
});
|
||||
OpenIM.iMManager.conversationManager.getConversationListSplit(
|
||||
offset: 0, // 偏移量,如:第1页,offet:0,count:20;第2页:offset:20;
|
||||
count: 0, // 每页数量
|
||||
);
|
||||
OpenIM.iMManager.conversationManager.getOneConversation(
|
||||
sourceID: "", // 如果是单聊值传userID,如果是群聊groupID
|
||||
sessionType: 1, // 如果是单聊值传1,如果是群聊值传2
|
||||
);
|
||||
OpenIM.iMManager.conversationManager.getMultipleConversation(
|
||||
conversationIDList: [], // 会话ID集合
|
||||
).then((list) {
|
||||
// 返回与id匹配的会话列表
|
||||
});
|
||||
OpenIM.iMManager.conversationManager
|
||||
.deleteConversation(
|
||||
conversationID: "", // 会话id
|
||||
)
|
||||
.then((_) => null)
|
||||
.catchError((_) {});
|
||||
OpenIM.iMManager.conversationManager.setConversationDraft(
|
||||
conversationID: "", // 会话id
|
||||
draftText: "", // 草稿
|
||||
);
|
||||
OpenIM.iMManager.conversationManager.pinConversation(
|
||||
conversationID: "", // 会话id
|
||||
isPinned: true, // true:置顶;false:取消置顶
|
||||
);
|
||||
OpenIM.iMManager.conversationManager.markGroupMessageHasRead(
|
||||
groupID: "", // 组id
|
||||
);
|
||||
OpenIM.iMManager.conversationManager.getTotalUnreadMsgCount();
|
||||
OpenIM.iMManager.conversationManager.getConversationIDBySessionType(
|
||||
sourceID: "", // 如果是单聊值传userID,如果是群聊groupID
|
||||
sessionType: 1, // 如果是单聊值传1,如果是群聊值传2
|
||||
);
|
||||
OpenIM.iMManager.conversationManager.setConversationRecvMessageOpt(
|
||||
conversationIDList: [], // 会话id列表
|
||||
status: 1, // 1:不接受消息;2:接受在线消息不接受离线消息;0:正常
|
||||
);
|
||||
OpenIM.iMManager.conversationManager.getConversationRecvMessageOpt(
|
||||
conversationIDList: [], // 会话id列表
|
||||
);
|
||||
OpenIM.iMManager.conversationManager.simpleSort([]);
|
||||
}
|
||||
|
||||
void friendManager() {
|
||||
OpenIM.iMManager.friendshipManager.getFriendsInfo(
|
||||
uidList: [], // userId列表
|
||||
).then((list) {
|
||||
// List<UserInfo>
|
||||
});
|
||||
OpenIM.iMManager.friendshipManager.addFriend(
|
||||
uid: "", // 用户id
|
||||
reason: '', // 发起好友申请的描述信息
|
||||
);
|
||||
OpenIM.iMManager.friendshipManager
|
||||
.getRecvFriendApplicationList()
|
||||
.then((value) {
|
||||
// List<FriendApplicationInfo> 申请列表
|
||||
});
|
||||
OpenIM.iMManager.friendshipManager
|
||||
.getSendFriendApplicationList()
|
||||
.then((list) {
|
||||
// List<FriendApplicationInfo> 申请列表
|
||||
});
|
||||
OpenIM.iMManager.friendshipManager.getFriendList().then((list) {
|
||||
// List<UserInfo> 好友信息列表
|
||||
});
|
||||
OpenIM.iMManager.friendshipManager.setFriendRemark(
|
||||
uid: '', // 好友userID
|
||||
remark: '', // 备注名
|
||||
);
|
||||
OpenIM.iMManager.friendshipManager.addBlacklist(
|
||||
uid: "", // 好友userID
|
||||
);
|
||||
OpenIM.iMManager.friendshipManager.getBlacklist().then((list) {
|
||||
// List<UserInfo>
|
||||
});
|
||||
OpenIM.iMManager.friendshipManager.removeBlacklist(
|
||||
uid: "", // userID
|
||||
);
|
||||
OpenIM.iMManager.friendshipManager.checkFriend(
|
||||
uidList: [], // userID 列表
|
||||
).then((value) {
|
||||
// List<FriendshipInfo>
|
||||
});
|
||||
OpenIM.iMManager.friendshipManager.deleteFriend(
|
||||
uid: '', // userID
|
||||
);
|
||||
OpenIM.iMManager.friendshipManager.acceptFriendApplication(
|
||||
uid: "", // userID
|
||||
handleMsg: '', // 备注信息
|
||||
);
|
||||
OpenIM.iMManager.friendshipManager.refuseFriendApplication(
|
||||
uid: "", // userID
|
||||
handleMsg: '', // 备注信息
|
||||
);
|
||||
}
|
||||
|
||||
void groupManager() {
|
||||
OpenIM.iMManager.groupManager
|
||||
.inviteUserToGroup(
|
||||
groupId: '', // 组ID
|
||||
uidList: [], // 成员 userID 列表
|
||||
reason: '', // 备注信息
|
||||
)
|
||||
.then((list) {
|
||||
// List<GroupInviteResult>
|
||||
});
|
||||
|
||||
OpenIM.iMManager.groupManager.kickGroupMember(
|
||||
groupId: '', // 组ID
|
||||
uidList: [], // userID 列表
|
||||
reason: '', // 备注信息
|
||||
);
|
||||
OpenIM.iMManager.groupManager.getGroupMembersInfo(
|
||||
groupId: '', // 组ID
|
||||
uidList: [], // 成员 userID 列表
|
||||
).then((list) {
|
||||
// List<GroupMembersInfo>
|
||||
});
|
||||
|
||||
OpenIM.iMManager.groupManager
|
||||
.getGroupMemberList(
|
||||
groupId: '', // 组ID
|
||||
filter: 0, // 1普通成员, 2群主,3管理员
|
||||
offset: 0, // 偏移量,每次开始的index值
|
||||
count: 0, // 每次拉取的数量
|
||||
)
|
||||
.then((list) {
|
||||
// List<GroupMembersInfo>
|
||||
});
|
||||
|
||||
OpenIM.iMManager.groupManager.getJoinedGroupList().then((list) {
|
||||
// List<GroupInfo>
|
||||
});
|
||||
|
||||
OpenIM.iMManager.groupManager
|
||||
.isJoinedGroup(
|
||||
gid: '', // 组ID
|
||||
)
|
||||
.then((joned) {
|
||||
// true已加入;false未加入
|
||||
});
|
||||
|
||||
OpenIM.iMManager.groupManager.createGroup(
|
||||
groupName: '',
|
||||
// 组名
|
||||
faceUrl: '',
|
||||
// 头像
|
||||
notification: '',
|
||||
// 群公告
|
||||
introduction: '',
|
||||
// 群简介
|
||||
groupType: 0,
|
||||
// 类型
|
||||
ex: '',
|
||||
// 扩展信息
|
||||
list: [], // 成员角色集合 List<GroupMemberRole>
|
||||
).then((groupInfo) {
|
||||
// 返回组信息 GroupInfo
|
||||
});
|
||||
|
||||
OpenIM.iMManager.groupManager.setGroupInfo(
|
||||
groupID: '',
|
||||
groupName: '',
|
||||
// 组名
|
||||
faceUrl: '',
|
||||
// 头像
|
||||
notification: '',
|
||||
// 群公告
|
||||
introduction: '',
|
||||
// 群简介
|
||||
ex: '', // 扩展信息
|
||||
);
|
||||
|
||||
OpenIM.iMManager.groupManager.getGroupsInfo(
|
||||
gidList: [], // 组id集合
|
||||
).then((list) {
|
||||
// List<GroupInfo>
|
||||
});
|
||||
|
||||
OpenIM.iMManager.groupManager.joinGroup(
|
||||
gid: '', // 组id
|
||||
reason: '', // 入群备注信息
|
||||
);
|
||||
|
||||
OpenIM.iMManager.groupManager.quitGroup(
|
||||
gid: '', // 组id
|
||||
);
|
||||
OpenIM.iMManager.groupManager.transferGroupOwner(
|
||||
gid: '', // 组ID
|
||||
uid: '', // 新 owner userID
|
||||
);
|
||||
|
||||
OpenIM.iMManager.groupManager.getRecvGroupApplicationList().then((list) {
|
||||
// List<GroupApplicationInfo>
|
||||
});
|
||||
OpenIM.iMManager.groupManager.getSendGroupApplicationList().then((list) {
|
||||
// List<GroupApplicationInfo>
|
||||
});
|
||||
OpenIM.iMManager.groupManager.acceptGroupApplication(
|
||||
gid: '', // 组ID
|
||||
uid: '', // 申请人userID
|
||||
handleMsg: '', // 备注信息
|
||||
);
|
||||
|
||||
OpenIM.iMManager.groupManager.refuseGroupApplication(
|
||||
gid: '', // 组ID
|
||||
uid: '', // 申请人userID
|
||||
handleMsg: '', // 备注信息
|
||||
);
|
||||
}
|
||||
|
||||
void messageManager() {
|
||||
OpenIM.iMManager.messageManager.sendMessage(
|
||||
message: Message(), // 消息体
|
||||
userID: '', // 接受消息的userID
|
||||
groupID: '', // 接受消息的群ID
|
||||
offlinePushInfo: OfflinePushInfo(), // 离线推送消息备注
|
||||
);
|
||||
OpenIM.iMManager.messageManager
|
||||
.getHistoryMessageList(
|
||||
userID: '', // 单聊对象的userID
|
||||
groupID: '', // 群聊的组id
|
||||
startMsg: null, // 消息体
|
||||
count: 0, // 每次拉取的数量
|
||||
)
|
||||
.then((list) {
|
||||
// List<Message>
|
||||
});
|
||||
OpenIM.iMManager.messageManager.revokeMessage(
|
||||
message: Message(), // 消息体
|
||||
);
|
||||
OpenIM.iMManager.messageManager.deleteMessageFromLocalStorage(
|
||||
message: Message(), // 消息体
|
||||
);
|
||||
OpenIM.iMManager.messageManager.insertSingleMessageToLocalStorage(
|
||||
receiverID: '', // 接收者userID
|
||||
senderID: '', // 发送者userID
|
||||
message: Message(), // 消息体
|
||||
);
|
||||
OpenIM.iMManager.messageManager.markC2CMessageAsRead(
|
||||
userID: '', // 接收者 userID
|
||||
messageIDList: [], // 已读的消息id列表
|
||||
);
|
||||
OpenIM.iMManager.messageManager.typingStatusUpdate(
|
||||
userID: '', // 接收者 userID
|
||||
msgTip: '', // 自定义提示内容
|
||||
);
|
||||
OpenIM.iMManager.messageManager.createTextMessage(
|
||||
text: '',
|
||||
);
|
||||
OpenIM.iMManager.messageManager.createTextAtMessage(
|
||||
text: '', // 发送的内容
|
||||
atUidList: [], // 被@到的userID集合
|
||||
);
|
||||
OpenIM.iMManager.messageManager.createImageMessage(
|
||||
imagePath: '', // 图片相对路径
|
||||
);
|
||||
OpenIM.iMManager.messageManager.createImageMessageFromFullPath(
|
||||
imagePath: '', // 图片的绝对路径
|
||||
);
|
||||
OpenIM.iMManager.messageManager.createSoundMessage(
|
||||
soundPath: '', // 相对路径
|
||||
duration: 0, // 时长
|
||||
);
|
||||
OpenIM.iMManager.messageManager.createSoundMessageFromFullPath(
|
||||
soundPath: '', // 绝对路径
|
||||
duration: 0, // 时长
|
||||
);
|
||||
OpenIM.iMManager.messageManager.createVideoMessage(
|
||||
videoPath: '', // 相对路径
|
||||
videoType: '', // minetype
|
||||
duration: 0, // 时长s
|
||||
snapshotPath: '', // 站位缩略图
|
||||
);
|
||||
OpenIM.iMManager.messageManager.createVideoMessageFromFullPath(
|
||||
videoPath: '', // 相对路径
|
||||
videoType: '', // minetype
|
||||
duration: 0, // 时长s
|
||||
snapshotPath: '', // 站位缩略图
|
||||
);
|
||||
OpenIM.iMManager.messageManager.createFileMessage(
|
||||
filePath: '', // 相对路径
|
||||
fileName: '', // 文件名
|
||||
);
|
||||
OpenIM.iMManager.messageManager.createFileMessageFromFullPath(
|
||||
filePath: '', // 相对路径
|
||||
fileName: '', // 文件名
|
||||
);
|
||||
OpenIM.iMManager.messageManager.createForwardMessage(
|
||||
message: Message(), // 转发消息体
|
||||
);
|
||||
OpenIM.iMManager.messageManager.createMergerMessage(
|
||||
messageList: [], // 被转发的消息列表
|
||||
title: '', // 标题
|
||||
summaryList: [], // 每一条消息摘要
|
||||
);
|
||||
OpenIM.iMManager.messageManager.createLocationMessage(
|
||||
latitude: 0, // 纬度
|
||||
longitude: 0, // 经度
|
||||
description: '', // 位置描述信息
|
||||
);
|
||||
OpenIM.iMManager.messageManager.createCustomMessage(
|
||||
data: '', // 自定义内容
|
||||
extension: '', // 扩展信息
|
||||
description: '', // 描述消息
|
||||
);
|
||||
OpenIM.iMManager.messageManager.createQuoteMessage(
|
||||
text: '', // 回复内容
|
||||
quoteMsg: Message(), // 被回复的消息体
|
||||
);
|
||||
OpenIM.iMManager.messageManager.createCardMessage(
|
||||
data: {}, // 自定义内容
|
||||
);
|
||||
OpenIM.iMManager.messageManager.clearC2CHistoryMessage(
|
||||
uid: "", // 清空聊天记录
|
||||
);
|
||||
OpenIM.iMManager.messageManager.clearGroupHistoryMessage(
|
||||
gid: '', // 群ID
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,103 +5,147 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: async
|
||||
url: "https://pub.flutter-io.cn"
|
||||
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.8.2"
|
||||
version: "2.11.0"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: boolean_selector
|
||||
url: "https://pub.flutter-io.cn"
|
||||
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
version: "2.1.1"
|
||||
characters:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: characters
|
||||
url: "https://pub.flutter-io.cn"
|
||||
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
charcode:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: charcode
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.3.1"
|
||||
version: "1.3.0"
|
||||
clock:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: clock
|
||||
url: "https://pub.flutter-io.cn"
|
||||
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
version: "1.1.1"
|
||||
collection:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: collection
|
||||
url: "https://pub.flutter-io.cn"
|
||||
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.15.0"
|
||||
version: "1.18.0"
|
||||
cupertino_icons:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: cupertino_icons
|
||||
url: "https://pub.flutter-io.cn"
|
||||
sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.3"
|
||||
version: "1.0.8"
|
||||
fake_async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: fake_async
|
||||
url: "https://pub.flutter-io.cn"
|
||||
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
version: "1.3.1"
|
||||
flutter:
|
||||
dependency: "direct main"
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_lints:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: flutter_lints
|
||||
sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.2"
|
||||
flutter_openim_sdk:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
path: ".."
|
||||
relative: true
|
||||
source: path
|
||||
version: "1.1.1"
|
||||
version: "3.8.3+2"
|
||||
flutter_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
leak_tracker:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker
|
||||
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "10.0.5"
|
||||
leak_tracker_flutter_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker_flutter_testing
|
||||
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.5"
|
||||
leak_tracker_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker_testing
|
||||
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.1"
|
||||
lints:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: lints
|
||||
sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
matcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: matcher
|
||||
url: "https://pub.flutter-io.cn"
|
||||
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.12.11"
|
||||
version: "0.12.16+1"
|
||||
material_color_utilities:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: material_color_utilities
|
||||
url: "https://pub.flutter-io.cn"
|
||||
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.1.3"
|
||||
version: "0.11.1"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
url: "https://pub.flutter-io.cn"
|
||||
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.7.0"
|
||||
version: "1.15.0"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path
|
||||
url: "https://pub.flutter-io.cn"
|
||||
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.8.0"
|
||||
version: "1.9.0"
|
||||
sky_engine:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
@@ -111,58 +155,66 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: source_span
|
||||
url: "https://pub.flutter-io.cn"
|
||||
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.8.1"
|
||||
version: "1.10.0"
|
||||
stack_trace:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stack_trace
|
||||
url: "https://pub.flutter-io.cn"
|
||||
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.10.0"
|
||||
version: "1.11.1"
|
||||
stream_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: stream_channel
|
||||
url: "https://pub.flutter-io.cn"
|
||||
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
version: "2.1.2"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: string_scanner
|
||||
url: "https://pub.flutter-io.cn"
|
||||
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
version: "1.2.0"
|
||||
term_glyph:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: term_glyph
|
||||
url: "https://pub.flutter-io.cn"
|
||||
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
version: "1.2.1"
|
||||
test_api:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
url: "https://pub.flutter-io.cn"
|
||||
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.4.8"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: typed_data
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.3.0"
|
||||
version: "0.7.2"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vector_math
|
||||
url: "https://pub.flutter-io.cn"
|
||||
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
version: "2.1.4"
|
||||
vm_service:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vm_service
|
||||
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "14.2.5"
|
||||
sdks:
|
||||
dart: ">=2.14.0 <3.0.0"
|
||||
flutter: ">=1.20.0"
|
||||
dart: ">=3.4.4 <4.0.0"
|
||||
flutter: ">=3.18.0-18.0.pre.54"
|
||||
|
||||
@@ -2,13 +2,32 @@ name: flutter_openim_sdk_example
|
||||
description: Demonstrates how to use the flutter_openim_sdk plugin.
|
||||
|
||||
# The following line prevents the package from being accidentally published to
|
||||
# pub.dev using `pub publish`. This is preferred for private packages.
|
||||
#publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
version: 1.0.0
|
||||
# pub.dev using `flutter pub publish`. This is preferred for private packages.
|
||||
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
|
||||
# The following defines the version and build number for your application.
|
||||
# A version number is three numbers separated by dots, like 1.2.43
|
||||
# followed by an optional build number separated by a +.
|
||||
# Both the version and the builder number may be overridden in flutter
|
||||
# build by specifying --build-name and --build-number, respectively.
|
||||
# In Android, build-name is used as versionName while build-number used as versionCode.
|
||||
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
|
||||
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
|
||||
# Read more about iOS versioning at
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
# In Windows, build-name is used as the major, minor, and patch parts
|
||||
# of the product and file versions while build-number is used as the build suffix.
|
||||
version: 1.0.0+1
|
||||
|
||||
environment:
|
||||
sdk: ">=2.12.0 <3.0.0"
|
||||
sdk: '>=3.4.4 <4.0.0'
|
||||
|
||||
# Dependencies specify other packages that your package needs in order to work.
|
||||
# To automatically upgrade your package dependencies to the latest versions
|
||||
# consider running `flutter pub upgrade --major-versions`. Alternatively,
|
||||
# dependencies can be manually updated by changing the version numbers below to
|
||||
# the latest version available on pub.dev. To see which dependencies have newer
|
||||
# versions available, run `flutter pub outdated`.
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
@@ -23,16 +42,23 @@ dependencies:
|
||||
|
||||
# The following adds the Cupertino Icons font to your application.
|
||||
# Use with the CupertinoIcons class for iOS style icons.
|
||||
cupertino_icons: ^1.0.2
|
||||
cupertino_icons: ^1.0.6
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
|
||||
# The "flutter_lints" package below contains a set of recommended lints to
|
||||
# encourage good coding practices. The lint set provided by the package is
|
||||
# activated in the `analysis_options.yaml` file located at the root of your
|
||||
# package. See that file for information about deactivating specific lint
|
||||
# rules and activating additional ones.
|
||||
flutter_lints: ^3.0.0
|
||||
|
||||
# For information on the generic Dart part of this file, see the
|
||||
# following page: https://dart.dev/tools/pub/pubspec
|
||||
|
||||
# The following section is specific to Flutter.
|
||||
# The following section is specific to Flutter packages.
|
||||
flutter:
|
||||
|
||||
# The following line ensures that the Material Icons font is
|
||||
@@ -46,7 +72,7 @@ flutter:
|
||||
# - images/a_dot_ham.jpeg
|
||||
|
||||
# An image asset can refer to one or more resolution-specific "variants", see
|
||||
# https://flutter.dev/assets-and-images/#resolution-aware.
|
||||
# https://flutter.dev/assets-and-images/#resolution-aware
|
||||
|
||||
# For details regarding adding assets from package dependencies, see
|
||||
# https://flutter.dev/assets-and-images/#from-packages
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// This is a basic Flutter widget test.
|
||||
//
|
||||
// To perform an interaction with a widget in your test, use the WidgetTester
|
||||
// utility that Flutter provides. For example, you can send tap and scroll
|
||||
// utility in the flutter_test package. For example, you can send tap and scroll
|
||||
// gestures. You can also use WidgetTester to find child widgets in the widget
|
||||
// tree, read text, and verify that the values of widget properties are correct.
|
||||
|
||||
@@ -11,17 +11,20 @@ import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:flutter_openim_sdk_example/main.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('Verify Platform version', (WidgetTester tester) async {
|
||||
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
|
||||
// Build our app and trigger a frame.
|
||||
await tester.pumpWidget(MyApp());
|
||||
|
||||
// Verify that platform version is retrieved.
|
||||
expect(
|
||||
find.byWidgetPredicate(
|
||||
(Widget widget) => widget is Text &&
|
||||
widget.data!.startsWith('Running on:'),
|
||||
),
|
||||
findsOneWidget,
|
||||
);
|
||||
// Verify that our counter starts at 0.
|
||||
expect(find.text('0'), findsOneWidget);
|
||||
expect(find.text('1'), findsNothing);
|
||||
|
||||
// Tap the '+' icon and trigger a frame.
|
||||
await tester.tap(find.byIcon(Icons.add));
|
||||
await tester.pump();
|
||||
|
||||
// Verify that our counter has incremented.
|
||||
expect(find.text('0'), findsNothing);
|
||||
expect(find.text('1'), findsOneWidget);
|
||||
});
|
||||
}
|
||||
|
||||
38
ios/.gitignore
vendored
@@ -1,38 +0,0 @@
|
||||
.idea/
|
||||
.vagrant/
|
||||
.sconsign.dblite
|
||||
.svn/
|
||||
|
||||
.DS_Store
|
||||
*.swp
|
||||
profile
|
||||
|
||||
DerivedData/
|
||||
build/
|
||||
GeneratedPluginRegistrant.h
|
||||
GeneratedPluginRegistrant.m
|
||||
|
||||
.generated/
|
||||
|
||||
*.pbxuser
|
||||
*.mode1v3
|
||||
*.mode2v3
|
||||
*.perspectivev3
|
||||
|
||||
!default.pbxuser
|
||||
!default.mode1v3
|
||||
!default.mode2v3
|
||||
!default.perspectivev3
|
||||
|
||||
xcuserdata
|
||||
|
||||
*.moved-aside
|
||||
|
||||
*.pyc
|
||||
*sync/
|
||||
Icon?
|
||||
.tags*
|
||||
|
||||
/Flutter/Generated.xcconfig
|
||||
/Flutter/ephemeral/
|
||||
/Flutter/flutter_export_environment.sh
|
||||
@@ -3,9 +3,15 @@ import Foundation
|
||||
public class JsonUtil {
|
||||
|
||||
public static func toString(object: AnyObject?)->String {
|
||||
|
||||
if object is NSNull {
|
||||
return ""
|
||||
}
|
||||
|
||||
if object == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
if object is String{
|
||||
let s = object as! String
|
||||
let b = s.replacingOccurrences(of: "\"", with: "\\\"")
|
||||
|
||||
@@ -5,87 +5,111 @@ public class ConversationManager: BaseServiceManager {
|
||||
|
||||
public override func registerHandlers() {
|
||||
super.registerHandlers()
|
||||
self["setConversationListener"] = setConversationListener
|
||||
self["changeInputStates"] = changeInputStates
|
||||
self["clearConversationAndDeleteAllMsg"] = clearConversationAndDeleteAllMsg
|
||||
self["deleteConversationAndDeleteAllMsg"] = deleteConversationAndDeleteAllMsg
|
||||
self["getAllConversationList"] = getAllConversationList
|
||||
self["getConversationListSplit"] = getConversationListSplit
|
||||
self["getOneConversation"] = getOneConversation
|
||||
self["getMultipleConversation"] = getMultipleConversation
|
||||
self["deleteConversation"] = deleteConversation
|
||||
self["setConversationDraft"] = setConversationDraft
|
||||
self["pinConversation"] = pinConversation
|
||||
// self["markSingleMessageHasRead"] = markSingleMessageHasRead
|
||||
self["markGroupMessageHasRead"] = markGroupMessageHasRead
|
||||
self["getTotalUnreadMsgCount"] = getTotalUnreadMsgCount
|
||||
self["getAtAllTag"] = getAtAllTag
|
||||
self["getConversationIDBySessionType"] = getConversationIDBySessionType
|
||||
self["setConversationRecvMessageOpt"] = setConversationRecvMessageOpt
|
||||
self["getConversationRecvMessageOpt"] = getConversationRecvMessageOpt
|
||||
self["getConversationListSplit"] = getConversationListSplit
|
||||
self["getInputStates"] = getInputStates
|
||||
self["getMultipleConversation"] = getMultipleConversation
|
||||
self["getOneConversation"] = getOneConversation
|
||||
self["getTotalUnreadMsgCount"] = getTotalUnreadMsgCount
|
||||
self["hideAllConversations"] = hideAllConversations
|
||||
self["hideConversation"] = hideConversation
|
||||
self["markConversationMessageAsRead"] = markConversationMessageAsRead
|
||||
self["searchConversation"] = searchConversation
|
||||
self["setConversationDraft"] = setConversationDraft
|
||||
self["setConversationListener"] = setConversationListener
|
||||
self["setConversation"] = setConversation
|
||||
self["searchConversations"] = searchConversations
|
||||
}
|
||||
|
||||
func setConversationListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
func changeInputStates(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkChangeInputStates(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"], methodCall[bool: "focus"])
|
||||
}
|
||||
|
||||
func clearConversationAndDeleteAllMsg(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkClearConversationAndDeleteAllMsg(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"])
|
||||
}
|
||||
|
||||
func deleteConversationAndDeleteAllMsg(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkDeleteConversationAndDeleteAllMsg(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"])
|
||||
}
|
||||
|
||||
func getAllConversationList(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkGetAllConversationList(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||
}
|
||||
|
||||
func getAtAllTag(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
callBack(result, Open_im_sdkGetAtAllTag(methodCall[string: "operationID"]))
|
||||
}
|
||||
|
||||
func getConversationIDBySessionType(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
let conversationID = Open_im_sdkGetConversationIDBySessionType(methodCall[string: "operationID"], methodCall[string: "sourceID"], methodCall[int: "sessionType"])
|
||||
callBack(result, conversationID)
|
||||
}
|
||||
|
||||
func getConversationListSplit(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkGetConversationListSplit(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[int: "offset"], methodCall[int: "count"])
|
||||
}
|
||||
|
||||
func getInputStates(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkGetInputStates(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"], methodCall[string: "userID"])
|
||||
}
|
||||
|
||||
func getMultipleConversation(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkGetMultipleConversation(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "conversationIDList"])
|
||||
}
|
||||
|
||||
func getOneConversation(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkGetOneConversation(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[int32: "sessionType"], methodCall[string: "sourceID"])
|
||||
}
|
||||
|
||||
func getTotalUnreadMsgCount(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkGetTotalUnreadMsgCount(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||
}
|
||||
|
||||
func hideAllConversations(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkHideAllConversations(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||
}
|
||||
|
||||
func hideConversation(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkHideConversation(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"])
|
||||
}
|
||||
|
||||
func markConversationMessageAsRead(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkMarkConversationMessageAsRead(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"])
|
||||
}
|
||||
|
||||
func searchConversation(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkSearchConversation(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "name"])
|
||||
}
|
||||
|
||||
func setConversationDraft(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkSetConversationDraft(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"], methodCall[string: "draftText"])
|
||||
}
|
||||
|
||||
func setConversationListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkSetConversationListener(ConversationListener(channel: channel))
|
||||
callBack(result)
|
||||
}
|
||||
|
||||
func getAllConversationList(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkGetAllConversationList(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||
func setConversation(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkSetConversation(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"], methodCall[jsonString: "req"])
|
||||
}
|
||||
|
||||
func getConversationListSplit(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkGetConversationListSplit(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[int: "offset"], methodCall[int: "count"])
|
||||
}
|
||||
|
||||
func getOneConversation(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkGetOneConversation(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[int: "sessionType"], methodCall[string: "sourceID"])
|
||||
}
|
||||
|
||||
func getMultipleConversation(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkGetMultipleConversation(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "conversationIDList"])
|
||||
}
|
||||
|
||||
func deleteConversation(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkDeleteConversation(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"])
|
||||
}
|
||||
|
||||
func setConversationDraft(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSetConversationDraft(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"], methodCall[string: "draftText"])
|
||||
}
|
||||
|
||||
func pinConversation(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkPinConversation(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "conversationID"], methodCall[bool: "isPinned"])
|
||||
}
|
||||
|
||||
// func markSingleMessageHasRead(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
// Open_im_sdkMarkSingleMessageHasRead(BaseCallback(result: result), methodCall[string: "userID"])
|
||||
// }
|
||||
|
||||
func markGroupMessageHasRead(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkMarkGroupMessageHasRead(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"])
|
||||
}
|
||||
|
||||
func getTotalUnreadMsgCount(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkGetTotalUnreadMsgCount(BaseCallback(result: result), methodCall[string: "operationID"])
|
||||
}
|
||||
|
||||
func getConversationIDBySessionType(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
let conversationID = Open_im_sdkGetConversationIDBySessionType(methodCall[string: "sourceID"], methodCall[int: "sessionType"])
|
||||
callBack(result, conversationID)
|
||||
}
|
||||
|
||||
func setConversationRecvMessageOpt(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkSetConversationRecvMessageOpt(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "conversationIDList"], methodCall[int: "status"])
|
||||
}
|
||||
|
||||
func getConversationRecvMessageOpt(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||
Open_im_sdkGetConversationRecvMessageOpt(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "conversationIDList"])
|
||||
func searchConversations(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||
Open_im_sdkSearchConversation(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "name"])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class ConversationListener: NSObject, Open_im_sdk_callbackOnConversationListenerProtocol {
|
||||
|
||||
private let channel:FlutterMethodChannel
|
||||
private let channel: FlutterMethodChannel
|
||||
|
||||
init(channel:FlutterMethodChannel) {
|
||||
init(channel: FlutterMethodChannel) {
|
||||
self.channel = channel
|
||||
}
|
||||
|
||||
@@ -93,25 +117,31 @@ public class ConversationListener: NSObject, Open_im_sdk_callbackOnConversationL
|
||||
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onConversationChanged", errCode: nil, errMsg: nil, data: conversationList)
|
||||
}
|
||||
|
||||
public func onConversationUserInputStatusChanged(_ change: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onConversationUserInputStatusChanged", errCode: nil, errMsg: nil, data: change)
|
||||
}
|
||||
|
||||
public func onNewConversation(_ conversationList: String?) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onNewConversation", errCode: nil, errMsg: nil, data: conversationList)
|
||||
}
|
||||
|
||||
public func onSyncServerFailed() {
|
||||
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onSyncServerFailed", errCode: nil, errMsg: nil, data: nil)
|
||||
public func onSyncServerFailed(_ reinstalled: Bool) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onSyncServerFailed", errCode: nil, errMsg: nil, data: reinstalled)
|
||||
}
|
||||
|
||||
public func onSyncServerFinish() {
|
||||
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onSyncServerFinish", errCode: nil, errMsg: nil, data: nil)
|
||||
public func onSyncServerFinish(_ reinstalled: Bool) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onSyncServerFinish", errCode: nil, errMsg: nil, data: reinstalled)
|
||||
}
|
||||
|
||||
public func onSyncServerStart() {
|
||||
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onSyncServerStart", errCode: nil, errMsg: nil, data: nil)
|
||||
public func onSyncServerProgress(_ progress: Int) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onSyncServerProgress", errCode: nil, errMsg: nil, data: progress)
|
||||
}
|
||||
|
||||
public func onSyncServerStart(_ reinstalled: Bool) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onSyncServerStart", errCode: nil, errMsg: nil, data: reinstalled)
|
||||
}
|
||||
|
||||
public func onTotalUnreadMessageCountChanged(_ totalUnreadCount: Int32) {
|
||||
CommonUtil.emitEvent(channel: channel, method: "conversationListener", type: "onTotalUnreadMessageCountChanged", errCode: nil, errMsg: nil, data: totalUnreadCount)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||