juggleim-rnsdk 0.1.8 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build/.transforms/42b8ab7e96b9440b0e91d2ecba5f579c/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$1.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$10.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$11.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$12.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$13.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$14.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$15.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$16.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$17.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$18.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$19.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$2.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$20.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$21.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$22.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$23.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$24.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$3.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$4.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$5.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$6.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$7.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$8.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager$9.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/juggleim/JuggleIMManager.dex +0 -0
- package/android/build/.transforms/a3b636e0768beb7635f48b7f77613c33/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
- package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$1.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$10.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$11.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$12.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$13.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$14.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$15.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$16.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$17.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$18.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$19.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$2.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$20.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$21.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$22.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$23.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$24.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$3.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$4.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$5.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$6.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$7.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$8.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager$9.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/juggleim/JuggleIMManager.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$1.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$10.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$11.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$12.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$13.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$14.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$15.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$16.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$17.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$18.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$19.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$2.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$20.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$21.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$22.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$23.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$24.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$3.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$4.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$5.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$6.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$7.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$8.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager$9.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/juggleim/JuggleIMManager.class +0 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/{JuggleIMManager$1.class.uniqueId24 → JuggleIMManager$1.class.uniqueId25} +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$10.class.uniqueId0 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$11.class.uniqueId14 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$12.class.uniqueId23 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$13.class.uniqueId7 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$14.class.uniqueId16 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$15.class.uniqueId6 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$16.class.uniqueId11 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$17.class.uniqueId24 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$18.class.uniqueId8 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$19.class.uniqueId21 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$2.class.uniqueId3 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$20.class.uniqueId5 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$21.class.uniqueId13 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$22.class.uniqueId19 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$23.class.uniqueId10 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$24.class.uniqueId15 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/{JuggleIMManager$3.class.uniqueId17 → JuggleIMManager$3.class.uniqueId18} +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/{JuggleIMManager$4.class.uniqueId21 → JuggleIMManager$4.class.uniqueId22} +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$5.class.uniqueId9 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$6.class.uniqueId12 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$7.class.uniqueId4 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/{JuggleIMManager$9.class.uniqueId19 → JuggleIMManager$8.class.uniqueId17} +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/{JuggleIMManager$8.class.uniqueId16 → JuggleIMManager$9.class.uniqueId20} +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager.class.uniqueId1 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/src/main/java/com/juggleim/JuggleIMManager.java +31 -1
- package/ios/JuggleIMManager.m +27 -1
- package/package.json +1 -1
- package/src/call/JuggleIMCall.ts +57 -0
- package/src/index.d.ts +7 -0
- package/src/index.js +10 -13
- package/src/types.js +117 -0
- package/README.md +0 -552
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$12.class.uniqueId22 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$14.class.uniqueId15 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$17.class.uniqueId23 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$19.class.uniqueId20 +0 -0
- package/android/build/tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/JuggleIMManager$22.class.uniqueId18 +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -45,6 +45,8 @@ import java.nio.charset.StandardCharsets;
|
|
|
45
45
|
import org.json.JSONObject;
|
|
46
46
|
import org.json.JSONArray;
|
|
47
47
|
import org.json.JSONException;
|
|
48
|
+
import android.graphics.Bitmap;
|
|
49
|
+
import android.graphics.BitmapFactory;
|
|
48
50
|
|
|
49
51
|
import javax.annotation.Nonnull;
|
|
50
52
|
|
|
@@ -795,6 +797,33 @@ public class JuggleIMManager extends ReactContextBaseJavaModule {
|
|
|
795
797
|
promise.resolve(convertConversationInfoToMap(conversationInfo));
|
|
796
798
|
}
|
|
797
799
|
|
|
800
|
+
/**
|
|
801
|
+
* 上传图片
|
|
802
|
+
*/
|
|
803
|
+
@ReactMethod
|
|
804
|
+
public void uploadImage(String localPath, Promise promise) {
|
|
805
|
+
try {
|
|
806
|
+
String path = localPath;
|
|
807
|
+
if (path.startsWith("file://")) {
|
|
808
|
+
path = path.substring(7);
|
|
809
|
+
}
|
|
810
|
+
JIM.getInstance().getMessageManager().uploadImage(localPath, new JIMConst.IResultCallback<String>() {
|
|
811
|
+
@Override
|
|
812
|
+
public void onSuccess(String s) {
|
|
813
|
+
promise.resolve(s);
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
@Override
|
|
817
|
+
public void onError(int i) {
|
|
818
|
+
promise.reject(String.valueOf(i), "Upload failed with code: " + i);
|
|
819
|
+
}
|
|
820
|
+
});
|
|
821
|
+
} catch (Exception e) {
|
|
822
|
+
e.printStackTrace();
|
|
823
|
+
promise.reject("-1", e.getMessage());
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
|
|
798
827
|
/**
|
|
799
828
|
* 创建会话信息
|
|
800
829
|
*/
|
|
@@ -1066,7 +1095,8 @@ public class JuggleIMManager extends ReactContextBaseJavaModule {
|
|
|
1066
1095
|
getOptions.setStartTime((long) options.getDouble("startTime"));
|
|
1067
1096
|
}
|
|
1068
1097
|
|
|
1069
|
-
JIMConst.PullDirection pullDirection = direction == 0 ? JIMConst.PullDirection.NEWER
|
|
1098
|
+
JIMConst.PullDirection pullDirection = direction == 0 ? JIMConst.PullDirection.NEWER
|
|
1099
|
+
: JIMConst.PullDirection.OLDER;
|
|
1070
1100
|
JIM.getInstance().getMessageManager().getMessages(
|
|
1071
1101
|
conversation,
|
|
1072
1102
|
pullDirection,
|
package/ios/JuggleIMManager.m
CHANGED
|
@@ -652,6 +652,32 @@ RCT_EXPORT_METHOD(getConversationInfo : (NSDictionary *)
|
|
|
652
652
|
}
|
|
653
653
|
}
|
|
654
654
|
|
|
655
|
+
/**
|
|
656
|
+
* 上传图片
|
|
657
|
+
*/
|
|
658
|
+
RCT_EXPORT_METHOD(uploadImage : (NSString *)localPath resolver : (
|
|
659
|
+
RCTPromiseResolveBlock)resolve rejecter : (RCTPromiseRejectBlock)reject) {
|
|
660
|
+
NSString *path = localPath;
|
|
661
|
+
if ([path hasPrefix:@"file://"]) {
|
|
662
|
+
path = [path substringFromIndex:7];
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
UIImage *image = [UIImage imageWithContentsOfFile:path];
|
|
666
|
+
if (!image) {
|
|
667
|
+
reject(@"-1", @"Image decode failed", nil);
|
|
668
|
+
return;
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
[JIM.shared.messageManager uploadImage:image
|
|
672
|
+
success:^(NSString *url) {
|
|
673
|
+
resolve(url);
|
|
674
|
+
}
|
|
675
|
+
error:^(JErrorCode code) {
|
|
676
|
+
reject([NSString stringWithFormat:@"%ld", (long)code], @"Upload failed",
|
|
677
|
+
nil);
|
|
678
|
+
}];
|
|
679
|
+
}
|
|
680
|
+
|
|
655
681
|
/**
|
|
656
682
|
* 创建会话信息
|
|
657
683
|
*/
|
|
@@ -1167,7 +1193,7 @@ RCT_EXPORT_METHOD(getMessages : (NSDictionary *)conversationDict direction : (
|
|
|
1167
1193
|
|
|
1168
1194
|
JPullDirection pullDirection =
|
|
1169
1195
|
direction == 0 ? JPullDirectionNewer : JPullDirectionOlder;
|
|
1170
|
-
|
|
1196
|
+
NSLog(@"getMessages start");
|
|
1171
1197
|
[JIM.shared.messageManager
|
|
1172
1198
|
getMessages:conversation
|
|
1173
1199
|
direction:pullDirection
|
package/package.json
CHANGED
package/src/call/JuggleIMCall.ts
CHANGED
|
@@ -9,46 +9,98 @@ const { JuggleIMCallModule } = NativeModules;
|
|
|
9
9
|
const eventEmitter = new NativeEventEmitter(JuggleIMCallModule);
|
|
10
10
|
|
|
11
11
|
export interface CallReceiveListener {
|
|
12
|
+
/**
|
|
13
|
+
* 收到通话请求的回调
|
|
14
|
+
* @param callSession 通话会话对象
|
|
15
|
+
*/
|
|
12
16
|
onCallReceive(callSession: CallSession): void;
|
|
13
17
|
}
|
|
14
18
|
|
|
15
19
|
export interface ConversationCallListener {
|
|
20
|
+
/**
|
|
21
|
+
* 会话中通话信息更新的回调
|
|
22
|
+
* @param callInfo 通话信息
|
|
23
|
+
* @param conversation 所属会话
|
|
24
|
+
* @param isFinished 通话是否已结束
|
|
25
|
+
*/
|
|
16
26
|
onCallInfoUpdate(callInfo: CallInfo, conversation: Conversation, isFinished: boolean): void;
|
|
17
27
|
}
|
|
18
28
|
|
|
19
29
|
export default class JuggleIMCall {
|
|
30
|
+
/**
|
|
31
|
+
* 初始化 Zego 引擎
|
|
32
|
+
* @param appId Zego App ID
|
|
33
|
+
*/
|
|
20
34
|
static initZegoEngine(appId: number): void {
|
|
21
35
|
JuggleIMCallModule.initZegoEngine(appId);
|
|
22
36
|
}
|
|
23
37
|
|
|
38
|
+
/**
|
|
39
|
+
* 初始化 LiveKit 引擎
|
|
40
|
+
*/
|
|
24
41
|
static initLiveKitEngine(): void {
|
|
25
42
|
JuggleIMCallModule.initLiveKitEngine();
|
|
26
43
|
}
|
|
27
44
|
|
|
45
|
+
/**
|
|
46
|
+
* 初始化 Agora 引擎
|
|
47
|
+
* @param appId Agora App ID
|
|
48
|
+
*/
|
|
28
49
|
static initAgoraEngine(appId: string): void {
|
|
29
50
|
JuggleIMCallModule.initAgoraEngine(appId);
|
|
30
51
|
}
|
|
31
52
|
|
|
53
|
+
/**
|
|
54
|
+
* 发起单人通话
|
|
55
|
+
* @param userId 对方用户 ID
|
|
56
|
+
* @param mediaType 通话媒体类型 (音频/视频)
|
|
57
|
+
* @param extra 扩展信息
|
|
58
|
+
* @returns Promise<CallSession> 通话会话对象
|
|
59
|
+
*/
|
|
32
60
|
static startSingleCall(userId: string, mediaType: CallMediaType, extra?: string): Promise<CallSession> {
|
|
33
61
|
return JuggleIMCallModule.startSingleCall(userId, mediaType, extra || "")
|
|
34
62
|
.then((session: any) => new CallSession(session));
|
|
35
63
|
}
|
|
36
64
|
|
|
65
|
+
/**
|
|
66
|
+
* 发起群组/多人通话
|
|
67
|
+
* @param userIdList 参与者用户 ID 列表
|
|
68
|
+
* @param mediaType 通话媒体类型 (音频/视频)
|
|
69
|
+
* @param extra 扩展信息
|
|
70
|
+
* @param conversation 关联的会话信息 (可选)
|
|
71
|
+
* @returns Promise<CallSession> 通话会话对象
|
|
72
|
+
*/
|
|
37
73
|
static startMultiCall(userIdList: string[], mediaType: CallMediaType, extra?: string, conversation?: Conversation): Promise<CallSession> {
|
|
38
74
|
return JuggleIMCallModule.startMultiCall(userIdList, mediaType, extra || "", conversation)
|
|
39
75
|
.then((session: any) => new CallSession(session));
|
|
40
76
|
}
|
|
41
77
|
|
|
78
|
+
/**
|
|
79
|
+
* 加入通话
|
|
80
|
+
* @param callId 通话 ID
|
|
81
|
+
* @returns Promise<CallSession> 通话会话对象
|
|
82
|
+
*/
|
|
42
83
|
static joinCall(callId: string): Promise<CallSession> {
|
|
43
84
|
return JuggleIMCallModule.joinCall(callId)
|
|
44
85
|
.then((session: any) => new CallSession(session));
|
|
45
86
|
}
|
|
46
87
|
|
|
88
|
+
/**
|
|
89
|
+
* 获取通话会话实例
|
|
90
|
+
* @param callId 通话 ID
|
|
91
|
+
* @returns Promise<CallSession | null> 通话会话对象,如果不存在则返回 null
|
|
92
|
+
*/
|
|
47
93
|
static getCallSession(callId: string): Promise<CallSession | null> {
|
|
48
94
|
return JuggleIMCallModule.getCallSession(callId)
|
|
49
95
|
.then((session: any) => session ? new CallSession(session) : null);
|
|
50
96
|
}
|
|
51
97
|
|
|
98
|
+
/**
|
|
99
|
+
* 添加收到通话请求的监听器
|
|
100
|
+
* 在全局或者应用首页添加,用于处理收到的通话请求
|
|
101
|
+
* @param listener 监听器回调
|
|
102
|
+
* @returns 取消监听的函数
|
|
103
|
+
*/
|
|
52
104
|
static addReceiveListener(listener: CallReceiveListener): () => void {
|
|
53
105
|
const key = `CallManager_Receive_${Date.now()}`;
|
|
54
106
|
JuggleIMCallModule.addReceiveListener(key);
|
|
@@ -63,6 +115,11 @@ export default class JuggleIMCall {
|
|
|
63
115
|
};
|
|
64
116
|
}
|
|
65
117
|
|
|
118
|
+
/**
|
|
119
|
+
* 添加会话通话信息监听器
|
|
120
|
+
* @param listener 监听器回调
|
|
121
|
+
* @returns 取消监听的函数
|
|
122
|
+
*/
|
|
66
123
|
static addConversationCallListener(listener: ConversationCallListener): () => void {
|
|
67
124
|
const key = `CallManager_Conversation_${Date.now()}`;
|
|
68
125
|
JuggleIMCallModule.addConversationCallListener(key);
|
package/src/index.d.ts
CHANGED
|
@@ -270,6 +270,13 @@ export default class JuggleIM {
|
|
|
270
270
|
options: ConversationTagOptions
|
|
271
271
|
): Promise<Boolean>;
|
|
272
272
|
|
|
273
|
+
/**
|
|
274
|
+
* 上传图片
|
|
275
|
+
* @param localPath 图片本地路径
|
|
276
|
+
* @returns {Promise<string>} 图片URL
|
|
277
|
+
*/
|
|
278
|
+
static uploadImage(localPath: string): Promise<string>;
|
|
279
|
+
|
|
273
280
|
/**
|
|
274
281
|
* 发送消息
|
|
275
282
|
* @param {SendMessageObject} message 发送消息对象
|
package/src/index.js
CHANGED
|
@@ -583,6 +583,15 @@ class JuggleIM {
|
|
|
583
583
|
return JMI.removeConversationsFromTag(conversations, tagId);
|
|
584
584
|
}
|
|
585
585
|
|
|
586
|
+
/**
|
|
587
|
+
* 上传图片
|
|
588
|
+
* @param {string} localPath - 图片本地路径
|
|
589
|
+
* @returns {Promise<string>} 图片URL
|
|
590
|
+
*/
|
|
591
|
+
static uploadImage(localPath) {
|
|
592
|
+
return JMI.uploadImage(localPath);
|
|
593
|
+
}
|
|
594
|
+
|
|
586
595
|
//message
|
|
587
596
|
|
|
588
597
|
/**
|
|
@@ -972,18 +981,6 @@ class JuggleIM {
|
|
|
972
981
|
}
|
|
973
982
|
}
|
|
974
983
|
|
|
975
|
-
|
|
976
|
-
* 自定义消息内容基类
|
|
977
|
-
* 用于创建自定义消息类型
|
|
978
|
-
*/
|
|
979
|
-
export class CustomMessageContent {
|
|
980
|
-
/**
|
|
981
|
-
* @param {string} contentType - 消息内容类型
|
|
982
|
-
*/
|
|
983
|
-
constructor(contentType) {
|
|
984
|
-
this.contentType = contentType;
|
|
985
|
-
}
|
|
986
|
-
}
|
|
987
|
-
|
|
984
|
+
export * from './types';
|
|
988
985
|
export * from './call';
|
|
989
986
|
export default JuggleIM;
|