From c2bbf61fa1aaa2740a605b841008c9700a58fe8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AE=E5=B0=98?= <761516186@qq.com> Date: Wed, 17 Oct 2018 23:11:30 +0800 Subject: [PATCH 01/17] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=89=93=E5=8C=85?= =?UTF-8?q?=E5=90=8E=20emoji=20=E7=A9=BA=E7=99=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/jiguang/imui/chatinput/utils/SimpleCommonUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/utils/SimpleCommonUtils.java b/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/utils/SimpleCommonUtils.java index 9539b937..ee031e0b 100644 --- a/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/utils/SimpleCommonUtils.java +++ b/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/utils/SimpleCommonUtils.java @@ -160,7 +160,7 @@ public View instantiateItem(ViewGroup container, int position, EmoticonPageEntit pageView.setNumColumns(pageEntity.getRow()); pageEntity.setRootView(pageView); try { - EmoticonsAdapter adapter = (EmoticonsAdapter) newInstance(_class, container.getContext(), pageEntity, onEmoticonClickListener); + EmoticonsAdapter adapter = new EmoticonsAdapter(container.getContext(), pageEntity, onEmoticonClickListener); if (emoticonDisplayListener != null) { adapter.setOnDisPlayListener(emoticonDisplayListener); } From e85cc96943d61815924d4452467497654c530c15 Mon Sep 17 00:00:00 2001 From: cheersgao Date: Sat, 3 Nov 2018 04:33:00 +0800 Subject: [PATCH 02/17] =?UTF-8?q?=E4=BF=AE=E6=94=B9ChatInputView=E5=8F=91?= =?UTF-8?q?=E9=80=81=E6=8C=89=E9=92=AE=E5=8A=A8=E7=94=BB=E5=90=8E=E4=B8=BA?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E7=9A=84Icon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/cn/jiguang/imui/chatinput/ChatInputView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/ChatInputView.java b/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/ChatInputView.java index 42aaf964..53ecb32e 100644 --- a/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/ChatInputView.java +++ b/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/ChatInputView.java @@ -1191,7 +1191,7 @@ public void onAnimationEnd(Animator animator) { if (hasContent) { mSendBtn.setImageDrawable(ContextCompat.getDrawable(getContext(), mStyle.getSendBtnPressedIcon())); } else { - mSendBtn.setImageDrawable(ContextCompat.getDrawable(getContext(), R.drawable.aurora_menuitem_send)); + mSendBtn.setImageDrawable(ContextCompat.getDrawable(getContext(), mStyle.getSendBtnIcon())); } restoreAnimatorSet.start(); } From eb0b163e9955188e620d66622eedd455ff9bbd2b Mon Sep 17 00:00:00 2001 From: JoshLi <542938192@qq.com> Date: Wed, 9 Jan 2019 17:49:52 +0800 Subject: [PATCH 03/17] Add style attribute cameraQuality for Android --- .../cn/jiguang/imui/chatinput/ChatInputStyle.java | 6 ++++++ .../cn/jiguang/imui/chatinput/ChatInputView.java | 12 ++++++------ .../cn/jiguang/imui/chatinput/camera/CameraOld.java | 4 ++-- .../jiguang/imui/chatinput/camera/CameraSupport.java | 2 +- Android/chatinput/src/main/res/values/attrs.xml | 1 + 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/ChatInputStyle.java b/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/ChatInputStyle.java index b330cc9e..f2f1606f 100644 --- a/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/ChatInputStyle.java +++ b/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/ChatInputStyle.java @@ -48,6 +48,7 @@ public class ChatInputStyle extends Style { private int sendBtnPressedIcon; private Drawable sendCountBg; private boolean showSelectAlbumBtn; + private float cameraQuality; public static ChatInputStyle parse(Context context, AttributeSet attrs) { ChatInputStyle style = new ChatInputStyle(context, attrs); @@ -94,6 +95,7 @@ public static ChatInputStyle parse(Context context, AttributeSet attrs) { style.getDimension(R.dimen.aurora_padding_input_right)); style.inputPaddingBottom = typedArray.getDimensionPixelSize(R.styleable.ChatInputView_inputPaddingBottom, style.getDimension(R.dimen.aurora_padding_input_bottom)); + style.cameraQuality = typedArray.getFloat(R.styleable.ChatInputView_cameraQuality,0.5f); typedArray.recycle(); return style; } @@ -216,4 +218,8 @@ public int getInputPaddingBottom() { public boolean getShowSelectAlbum() { return this.showSelectAlbumBtn; } + + public float getCameraQuality() { + return this.cameraQuality; + } } diff --git a/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/ChatInputView.java b/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/ChatInputView.java index 42aaf964..19244fe4 100644 --- a/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/ChatInputView.java +++ b/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/ChatInputView.java @@ -695,7 +695,7 @@ public void run() { mCaptureBtn.setBackgroundResource(R.drawable.aurora_preview_record_video_start); mMediaPlayer.stop(); mMediaPlayer.release(); - mCameraSupport.open(mCameraId, mWidth, mHeight, mIsBackCamera); + mCameraSupport.open(mCameraId, mWidth, mHeight, mIsBackCamera, mStyle.getCameraQuality()); } else { for (int i = 0; i < Camera.getNumberOfCameras(); i++) { Camera.CameraInfo info = new Camera.CameraInfo(); @@ -706,7 +706,7 @@ public void run() { mIsBackCamera = false; mCameraSupport.release(); mCameraSupport.open(mCameraId, mTextureView.getWidth(), mTextureView.getHeight(), - mIsBackCamera); + mIsBackCamera, mStyle.getCameraQuality()); break; } } else { @@ -715,7 +715,7 @@ public void run() { mIsBackCamera = true; mCameraSupport.release(); mCameraSupport.open(mCameraId, mTextureView.getWidth(), mTextureView.getHeight(), - mIsBackCamera); + mIsBackCamera, mStyle.getCameraQuality()); break; } } @@ -839,7 +839,7 @@ public void initCamera() { } } if (mTextureView.isAvailable()) { - mCameraSupport.open(mCameraId, mWidth, sMenuHeight, mIsBackCamera); + mCameraSupport.open(mCameraId, mWidth, sMenuHeight, mIsBackCamera, mStyle.getCameraQuality()); } else { mTextureView.setSurfaceTextureListener(new TextureView.SurfaceTextureListener() { @Override @@ -848,7 +848,7 @@ public void onSurfaceTextureAvailable(SurfaceTexture surfaceTexture, int width, if (mCameraSupport == null) { initCamera(); } else { - mCameraSupport.open(mCameraId, width, height, mIsBackCamera); + mCameraSupport.open(mCameraId, width, height, mIsBackCamera, mStyle.getCameraQuality()); } } @@ -857,7 +857,7 @@ public void onSurfaceTextureAvailable(SurfaceTexture surfaceTexture, int width, public void onSurfaceTextureSizeChanged(SurfaceTexture surfaceTexture, int width, int height) { Log.d("ChatInputView", "Texture size changed, Opening camera"); if (mTextureView.getVisibility() == VISIBLE && mCameraSupport != null) { - mCameraSupport.open(mCameraId, width, height, mIsBackCamera); + mCameraSupport.open(mCameraId, width, height, mIsBackCamera, mStyle.getCameraQuality()); } } diff --git a/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/camera/CameraOld.java b/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/camera/CameraOld.java index 2297c5c4..30d9f651 100644 --- a/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/camera/CameraOld.java +++ b/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/camera/CameraOld.java @@ -67,7 +67,7 @@ public CameraOld(Context context, TextureView textureView) { } @Override - public CameraSupport open(int cameraId, int width, int height, boolean isFacingBack) { + public CameraSupport open(int cameraId, int width, int height, boolean isFacingBack, float cameraQuality) { try { this.mCameraId = cameraId; this.mCamera = Camera.open(cameraId); @@ -96,7 +96,7 @@ public CameraSupport open(int cameraId, int width, int height, boolean isFacingB ViewGroup.LayoutParams layoutParams = new FrameLayout.LayoutParams((int) (height * (w / h)), height); mTextureView.setLayoutParams(layoutParams); - params.setJpegQuality(100); // 设置照片质量 + params.setJpegQuality((int)(100*cameraQuality)); // 设置照片质量 if (params.getSupportedFocusModes().contains(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE)) { params.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE); } diff --git a/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/camera/CameraSupport.java b/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/camera/CameraSupport.java index da00da60..cdf6fadc 100644 --- a/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/camera/CameraSupport.java +++ b/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/camera/CameraSupport.java @@ -6,7 +6,7 @@ public interface CameraSupport { - CameraSupport open(int cameraId, int width, int height, boolean isFacingBack); + CameraSupport open(int cameraId, int width, int height, boolean isFacingBack,float cameraQuality); void release(); void takePicture(); void setCameraCallbackListener(OnCameraCallbackListener listener); diff --git a/Android/chatinput/src/main/res/values/attrs.xml b/Android/chatinput/src/main/res/values/attrs.xml index 00ec976e..7bf8beaa 100644 --- a/Android/chatinput/src/main/res/values/attrs.xml +++ b/Android/chatinput/src/main/res/values/attrs.xml @@ -31,6 +31,7 @@ + From 7ae4c94df320efaab878348b5e9158e9eddf8c2f Mon Sep 17 00:00:00 2001 From: JoshLi <542938192@qq.com> Date: Wed, 9 Jan 2019 17:52:55 +0800 Subject: [PATCH 04/17] Fix Preview Distortion --- .../imui/chatinput/camera/CameraNew.java | 118 +++++++++++------- 1 file changed, 72 insertions(+), 46 deletions(-) diff --git a/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/camera/CameraNew.java b/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/camera/CameraNew.java index 04d37216..d386ba83 100644 --- a/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/camera/CameraNew.java +++ b/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/camera/CameraNew.java @@ -39,8 +39,11 @@ import android.util.Log; import android.util.Size; import android.util.SparseIntArray; +import android.view.Gravity; import android.view.Surface; import android.view.TextureView; +import android.view.ViewGroup; +import android.widget.FrameLayout; import android.widget.Toast; import java.io.File; @@ -154,9 +157,9 @@ public class CameraNew implements CameraSupport { private Handler mBackgroundHandler; private int mWidth; private int mHeight; + private float mCameraQuality; private static SparseIntArray ORIENTATIONS = new SparseIntArray(); private static SparseIntArray INVERSE_ORIENTATIONS = new SparseIntArray(); - private CameraCharacteristics mCameraCharacteristic; private static boolean mIsTakingPicture = false; /** * An {@link ImageReader} that handles still image capture. @@ -298,7 +301,7 @@ public void setCameraEventListener(CameraEventListener listener) { } @Override - public CameraSupport open(final int cameraId, int width, int height, boolean isFacingBack) { + public CameraSupport open(final int cameraId, int width, int height, boolean isFacingBack,float cameraQuality) { if (ActivityCompat.checkSelfPermission(mContext, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(mContext, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) { @@ -310,6 +313,7 @@ public CameraSupport open(final int cameraId, int width, int height, boolean isF mHeight = height; mIsFacingBack = isFacingBack; mCameraId = cameraId + ""; + mCameraQuality = cameraQuality; startBackgroundThread(); setUpCameraOutputs(width, height); configureTransform(width, height); @@ -424,37 +428,63 @@ private Size chooseVideoSize(Size[] choices) { * * @param sizes The list of sizes that the camera supports for the intended output * class - * @param width The width of the texture view relative to sensor coordinate - * @param height The height of the texture view relative to sensor coordinate + * @param w The width of the texture view relative to sensor coordinate + * @param h The height of the texture view relative to sensor coordinate * @return The optimal {@code Size}, or an arbitrary one if none were big enough */ - private static Size chooseOptimalSize(Size[] sizes, int width, - int height) { + private static Size chooseOptimalSize(Size[] sizes, int w, + int h) { - List collectorSizes = new ArrayList<>(); - for (Size option : sizes) { - if (option.getWidth() == width && option.getHeight() == height) { - return option; - } - if (width > height) { - if (option.getWidth() > width && option.getHeight() > height) { - collectorSizes.add(option); - } - } else { - if (option.getHeight() > width && option.getWidth() > height) { - collectorSizes.add(option); - } +// List collectorSizes = new ArrayList<>(); +// for (Size option : sizes) { +// if (option.getWidth() == width && option.getHeight() == height) { +// return option; +// } +// if (width > height) { +// if (option.getWidth() > width && option.getHeight() > height) { +// collectorSizes.add(option); +// } +// } else { +// if (option.getHeight() > width && option.getWidth() > height) { +// collectorSizes.add(option); +// } +// } +// } +// if (collectorSizes.size() > 0) { +// return Collections.min(collectorSizes, new Comparator() { +// @Override +// public int compare(Size s1, Size s2) { +// return Long.signum(s1.getWidth() * s1.getHeight() - s2.getWidth() * s2.getHeight()); +// } +// }); +// } +// return sizes[0]; + final double ASPECT_TOLERANCE = 0.1; + double targetRatio = (double) w / h; + if (sizes == null) return null; + Size optimalSize = null; + double minDiff = Double.MAX_VALUE; + int targetHeight = h; + // Try to find an size match aspect ratio and size + for (Size size : sizes) { + double ratio = (double) size.getWidth() / size.getHeight(); + if (Math.abs(ratio - targetRatio) > ASPECT_TOLERANCE) continue; + if (Math.abs(size.getHeight() - targetHeight) < minDiff) { + optimalSize = size; + minDiff = Math.abs(size.getHeight() - targetHeight); } } - if (collectorSizes.size() > 0) { - return Collections.min(collectorSizes, new Comparator() { - @Override - public int compare(Size s1, Size s2) { - return Long.signum(s1.getWidth() * s1.getHeight() - s2.getWidth() * s2.getHeight()); + // Cannot find the one match the aspect ratio, ignore the requirement + if (optimalSize == null) { + minDiff = Double.MAX_VALUE; + for (Size size : sizes) { + if (Math.abs(size.getHeight() - targetHeight) < minDiff) { + optimalSize = size; + minDiff = Math.abs(size.getHeight() - targetHeight); } - }); + } } - return sizes[0]; + return optimalSize; } @@ -540,7 +570,7 @@ private void setUpCameraOutputs(int width, int height) { if (ids.length == 0) { // No camera throw new RuntimeException("No camera available."); } - mCameraCharacteristic = mManager.getCameraCharacteristics(mCameraId); + CameraCharacteristics mCameraCharacteristic = mManager.getCameraCharacteristics(mCameraId); StreamConfigurationMap map = mCameraCharacteristic.get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP); assert map != null; mVideoSize = chooseVideoSize(map.getOutputSizes(MediaRecorder.class)); @@ -548,8 +578,8 @@ private void setUpCameraOutputs(int width, int height) { Size largest = Collections.max( Arrays.asList(map.getOutputSizes(ImageFormat.JPEG)), new CompareSizesByArea()); - mImageReader = ImageReader.newInstance(largest.getWidth(), largest.getHeight(), - ImageFormat.JPEG, /*maxImages*/2); + mImageReader = ImageReader.newInstance((int)(largest.getWidth()*mCameraQuality), (int)(largest.getHeight()*mCameraQuality), + ImageFormat.JPEG, /*maxImages*/1); mImageReader.setOnImageAvailableListener( mOnImageAvailableListener, mBackgroundHandler); @@ -580,22 +610,10 @@ private void setUpCameraOutputs(int width, int height) { activity.getWindowManager().getDefaultDisplay().getSize(displaySize); int rotatedPreviewWidth = width; int rotatedPreviewHeight = height; - int maxPreviewWidth = displaySize.x; - int maxPreviewHeight = displaySize.y; if (swappedDimensions) { rotatedPreviewWidth = height; rotatedPreviewHeight = width; - maxPreviewWidth = displaySize.y; - maxPreviewHeight = displaySize.x; - } - - if (maxPreviewWidth > MAX_PREVIEW_WIDTH) { - maxPreviewWidth = MAX_PREVIEW_WIDTH; - } - - if (maxPreviewHeight > MAX_PREVIEW_HEIGHT) { - maxPreviewHeight = MAX_PREVIEW_HEIGHT; } // Danger, W.R.! Attempting to use too large a preview size could exceed the camera @@ -604,15 +622,23 @@ private void setUpCameraOutputs(int width, int height) { mPreviewSize = chooseOptimalSize(map.getOutputSizes(SurfaceTexture.class), rotatedPreviewWidth, rotatedPreviewHeight); + + // TODO // We fit the aspect ratio of TextureView to the size of preview we picked. - int orientation = activity.getResources().getConfiguration().orientation; +// float w; +// float h; +// int orientation = activity.getResources().getConfiguration().orientation; // if (orientation == Configuration.ORIENTATION_LANDSCAPE) { -// mTextureView.setAspectRatio( -// mPreviewSize.getWidth(), mPreviewSize.getHeight()); +// w = mPreviewSize.getWidth(); +// h = mPreviewSize.getHeight(); // } else { -// mTextureView.setAspectRatio( -// mPreviewSize.getHeight(), mPreviewSize.getWidth()); +// w = mPreviewSize.getHeight(); +// h = mPreviewSize.getWidth(); // } +// +// FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams((int) (height * (w / h)), height); +// layoutParams.gravity = Gravity.CENTER; +// mTextureView.setLayoutParams(layoutParams); // Check if the flash is supported. Boolean available = mCameraCharacteristic.get(CameraCharacteristics.FLASH_INFO_AVAILABLE); From 7c194b692cc285f7f0facf1ed3ed403a833229a7 Mon Sep 17 00:00:00 2001 From: JoshLi <542938192@qq.com> Date: Wed, 9 Jan 2019 18:01:23 +0800 Subject: [PATCH 05/17] Set android.hardware.camera2 unrequired --- Android/chatinput/src/main/AndroidManifest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Android/chatinput/src/main/AndroidManifest.xml b/Android/chatinput/src/main/AndroidManifest.xml index 431869ab..3d829736 100644 --- a/Android/chatinput/src/main/AndroidManifest.xml +++ b/Android/chatinput/src/main/AndroidManifest.xml @@ -7,7 +7,7 @@ - + Date: Wed, 9 Jan 2019 18:02:25 +0800 Subject: [PATCH 06/17] Update bubble margin --- .../messagelist/src/main/res/layout/item_receive_voice.xml | 1 - Android/messagelist/src/main/res/layout/item_send_text.xml | 4 +--- Android/messagelist/src/main/res/layout/item_send_voice.xml | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/Android/messagelist/src/main/res/layout/item_receive_voice.xml b/Android/messagelist/src/main/res/layout/item_receive_voice.xml index 2e5a7d79..8456adf3 100644 --- a/Android/messagelist/src/main/res/layout/item_receive_voice.xml +++ b/Android/messagelist/src/main/res/layout/item_receive_voice.xml @@ -36,7 +36,6 @@ android:id="@+id/aurora_tv_msgitem_message" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginLeft="2dp" android:background="@drawable/aurora_receivetxt_bubble" android:maxWidth="220dp" /> diff --git a/Android/messagelist/src/main/res/layout/item_send_text.xml b/Android/messagelist/src/main/res/layout/item_send_text.xml index 6d6ce7c3..0334a97b 100644 --- a/Android/messagelist/src/main/res/layout/item_send_text.xml +++ b/Android/messagelist/src/main/res/layout/item_send_text.xml @@ -55,10 +55,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:lineSpacingExtra="5dp" - android:layout_marginRight="3dp" android:background="@drawable/aurora_sendtxt_bubble" - android:paddingRight="20dp" - android:text="asdf"/> + android:paddingRight="20dp" /> From 723d7ccf9d1a118c17b62ac20bbeb689379ebd33 Mon Sep 17 00:00:00 2001 From: JoshLi <542938192@qq.com> Date: Wed, 9 Jan 2019 18:02:57 +0800 Subject: [PATCH 07/17] Update gradle --- Android/chatinput/build.gradle | 10 +++++----- Android/messagelist/build.gradle | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Android/chatinput/build.gradle b/Android/chatinput/build.gradle index 5d6ee8b2..73d37164 100644 --- a/Android/chatinput/build.gradle +++ b/Android/chatinput/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'com.android.library' ext { PUBLISH_GROUP_ID = 'cn.jiguang.imui' PUBLISH_ARTIFACT_ID = 'chatinput' - PUBLISH_VERSION = '0.9.1' + PUBLISH_VERSION = '0.10.0' } android { @@ -30,16 +30,16 @@ android { } dependencies { - compile fileTree(include: ['*.jar'], dir: 'libs') - androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { + implementation fileTree(include: ['*.jar'], dir: 'libs') + androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) implementation 'com.android.support:appcompat-v7:27.1.0' implementation 'com.android.support:design:27.1.0' - compile 'com.google.android:flexbox:0.2.5' + implementation 'com.google.android:flexbox:0.2.5' implementation 'com.github.bumptech.glide:glide:4.6.1' implementation 'com.android.support:support-v4:27.1.0' - testCompile 'junit:junit:4.12' + testImplementation 'junit:junit:4.12' } apply from: 'android-release-aar.gradle' \ No newline at end of file diff --git a/Android/messagelist/build.gradle b/Android/messagelist/build.gradle index 827ce01f..8cc9fa9d 100644 --- a/Android/messagelist/build.gradle +++ b/Android/messagelist/build.gradle @@ -3,7 +3,7 @@ apply plugin: 'com.android.library' ext { PUBLISH_GROUP_ID = 'cn.jiguang.imui' PUBLISH_ARTIFACT_ID = 'messagelist' - PUBLISH_VERSION = '0.7.4' + PUBLISH_VERSION = '0.8.0' } android { @@ -23,14 +23,14 @@ android { } dependencies { - compile fileTree(include: ['*.jar'], dir: 'libs') - androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { + implementation fileTree(include: ['*.jar'], dir: 'libs') + androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) implementation 'com.android.support:appcompat-v7:27.1.0' implementation 'com.android.support:design:27.1.0' implementation 'com.android.support:support-v4:27.1.0' - testCompile 'junit:junit:4.12' + testImplementation 'junit:junit:4.12' } apply from: 'android-release-aar.gradle' \ No newline at end of file From aa9f28f8ce1d056ea91b4cedba91241222224450 Mon Sep 17 00:00:00 2001 From: JoshLi <542938192@qq.com> Date: Wed, 9 Jan 2019 18:03:22 +0800 Subject: [PATCH 08/17] Update sample --- .../jiguang/cn/imuisample/messages/MessageListActivity.java | 2 ++ Android/sample/exampleui/src/main/res/layout/activity_chat.xml | 1 + 2 files changed, 3 insertions(+) diff --git a/Android/sample/exampleui/src/main/java/imui/jiguang/cn/imuisample/messages/MessageListActivity.java b/Android/sample/exampleui/src/main/java/imui/jiguang/cn/imuisample/messages/MessageListActivity.java index fc9c1357..c1b9b651 100644 --- a/Android/sample/exampleui/src/main/java/imui/jiguang/cn/imuisample/messages/MessageListActivity.java +++ b/Android/sample/exampleui/src/main/java/imui/jiguang/cn/imuisample/messages/MessageListActivity.java @@ -614,12 +614,14 @@ public void onStatusViewClick(MyMessage message) { voiceMessage.setUserInfo(new DefaultUser("0", "Deadpool", "R.drawable.deadpool")); voiceMessage.setMediaFilePath(Environment.getExternalStorageDirectory().getAbsolutePath() + "/voice/2018-02-28-105103.m4a"); voiceMessage.setDuration(4); + mAdapter.addToStart(voiceMessage, true); MyMessage sendVoiceMsg = new MyMessage("", IMessage.MessageType.SEND_VOICE.ordinal()); sendVoiceMsg.setUserInfo(new DefaultUser("1", "Ironman", "R.drawable.ironman")); sendVoiceMsg.setMediaFilePath(Environment.getExternalStorageDirectory().getAbsolutePath() + "/voice/2018-02-28-105103.m4a"); sendVoiceMsg.setDuration(4); + sendVoiceMsg.setMessageStatus(IMessage.MessageStatus.SEND_SUCCEED); mAdapter.addToStart(sendVoiceMsg, true); MyMessage eventMsg = new MyMessage("haha", IMessage.MessageType.EVENT.ordinal()); mAdapter.addToStart(eventMsg, true); diff --git a/Android/sample/exampleui/src/main/res/layout/activity_chat.xml b/Android/sample/exampleui/src/main/res/layout/activity_chat.xml index bd1654af..67caafd1 100644 --- a/Android/sample/exampleui/src/main/res/layout/activity_chat.xml +++ b/Android/sample/exampleui/src/main/res/layout/activity_chat.xml @@ -66,6 +66,7 @@ android:layout_alignParentBottom="true" app:inputMarginLeft="3dp" app:inputMarginRight="3dp" + app:cameraQuality="1.0" app:showSelectAlbum="true"/> From 90c3c928f2afc23328be556465119fca6166e28b Mon Sep 17 00:00:00 2001 From: JoshLi <542938192@qq.com> Date: Wed, 9 Jan 2019 20:33:30 +0800 Subject: [PATCH 09/17] Update Android CameraNew --- .../imui/chatinput/ChatInputStyle.java | 6 ++++- .../jiguang/imui/chatinput/ChatInputView.java | 5 +++++ .../imui/chatinput/camera/CameraNew.java | 22 ++++++++++++++----- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/ChatInputStyle.java b/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/ChatInputStyle.java index f2f1606f..7979ebe0 100644 --- a/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/ChatInputStyle.java +++ b/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/ChatInputStyle.java @@ -220,6 +220,10 @@ public boolean getShowSelectAlbum() { } public float getCameraQuality() { - return this.cameraQuality; + return this.cameraQuality <= 0.01f ? 0.01f : this.cameraQuality; + } + + public void setCameraQuality(float cameraQuality) { + this.cameraQuality = cameraQuality; } } diff --git a/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/ChatInputView.java b/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/ChatInputView.java index 39149b60..b2bd1588 100644 --- a/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/ChatInputView.java +++ b/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/ChatInputView.java @@ -1530,4 +1530,9 @@ public FrameLayout getMenuContainer(){ return this.mMenuContainer; } + public void setCameraQuality(float cameraQuality){ + mStyle.setCameraQuality(cameraQuality); + } + + } diff --git a/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/camera/CameraNew.java b/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/camera/CameraNew.java index d386ba83..921316f4 100644 --- a/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/camera/CameraNew.java +++ b/Android/chatinput/src/main/java/cn/jiguang/imui/chatinput/camera/CameraNew.java @@ -784,12 +784,22 @@ private void unlockFocus() { mPreviewRequestBuilder.set(CaptureRequest.CONTROL_AF_TRIGGER, CameraMetadata.CONTROL_AF_TRIGGER_CANCEL); setAutoFlash(mPreviewRequestBuilder); - mCaptureSession.capture(mPreviewRequestBuilder.build(), mCaptureCallback, - mBackgroundHandler); - // After this, the camera will go back to the normal state of preview. - mState = STATE_PREVIEW; - mCaptureSession.setRepeatingRequest(mPreviewRequest, mCaptureCallback, - mBackgroundHandler); + if(mCaptureSession != null ){ + boolean reprocessable = true; + if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.M) { + reprocessable = mCaptureSession.isReprocessable(); + } + if(!reprocessable){ + return; + } + mCaptureSession.capture(mPreviewRequestBuilder.build(), mCaptureCallback, + mBackgroundHandler); + // After this, the camera will go back to the normal state of preview. + mState = STATE_PREVIEW; + mCaptureSession.setRepeatingRequest(mPreviewRequest, mCaptureCallback, + mBackgroundHandler); + } + } catch (CameraAccessException e) { e.printStackTrace(); } From 92c30a3f6dd2dcbd111a4094fce6b342719a0adf Mon Sep 17 00:00:00 2001 From: JoshLi <542938192@qq.com> Date: Wed, 9 Jan 2019 20:34:04 +0800 Subject: [PATCH 10/17] Update Android sample --- Android/sample/exampleui/src/main/res/layout/activity_chat.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Android/sample/exampleui/src/main/res/layout/activity_chat.xml b/Android/sample/exampleui/src/main/res/layout/activity_chat.xml index 67caafd1..cd5464eb 100644 --- a/Android/sample/exampleui/src/main/res/layout/activity_chat.xml +++ b/Android/sample/exampleui/src/main/res/layout/activity_chat.xml @@ -66,7 +66,7 @@ android:layout_alignParentBottom="true" app:inputMarginLeft="3dp" app:inputMarginRight="3dp" - app:cameraQuality="1.0" + app:cameraQuality="0.6" app:showSelectAlbum="true"/> From 8b5f24bda9f91a173ab7846eb8e5a83bb40460bf Mon Sep 17 00:00:00 2001 From: JoshLi <542938192@qq.com> Date: Wed, 9 Jan 2019 20:35:50 +0800 Subject: [PATCH 11/17] Update RN Android gradle --- ReactNative/android/build.gradle | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/ReactNative/android/build.gradle b/ReactNative/android/build.gradle index ee680ce0..3fdeacb8 100644 --- a/ReactNative/android/build.gradle +++ b/ReactNative/android/build.gradle @@ -1,13 +1,16 @@ apply plugin: 'com.android.library' +def safeExtGet(prop, fallback) { + rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +} android { - compileSdkVersion 27 - buildToolsVersion "27.0.3" + compileSdkVersion safeExtGet('compileSdkVersion', 27) + buildToolsVersion safeExtGet('buildToolsVersion', '27.0.3') flavorDimensions "prod" defaultConfig { - minSdkVersion 16 - targetSdkVersion 27 + minSdkVersion safeExtGet('minSdkVersion', 16) + targetSdkVersion safeExtGet('targetSdkVersion', 27) versionCode 1 versionName "1.0" @@ -23,19 +26,20 @@ android { } dependencies { - compile fileTree(include: ['*.jar'], dir: 'libs') - androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { + implementation fileTree(include: ['*.jar'], dir: 'libs') + androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) - compile 'cn.jiguang.imui:messagelist:0.7.4' - compile 'cn.jiguang.imui:chatinput:0.9.1' - compile 'pub.devrel:easypermissions:1.0.1' - compile 'org.greenrobot:eventbus:3.0.0' + implementation 'cn.jiguang.imui:messagelist:0.7.4' + implementation project(':chatinput') +// compile 'cn.jiguang.imui:chatinput:0.9.1' + implementation 'pub.devrel:easypermissions:1.0.1' + implementation 'org.greenrobot:eventbus:3.0.0' implementation 'com.android.support:appcompat-v7:27.1.0' implementation 'com.android.support:design:27.1.0' implementation 'com.facebook.react:react-native:+' - compile 'com.google.code.gson:gson:2.8.0' - compile 'com.github.bumptech.glide:glide:4.6.1' - testCompile 'junit:junit:4.12' + implementation 'com.google.code.gson:gson:2.8.0' + implementation 'com.github.bumptech.glide:glide:4.6.1' + testImplementation 'junit:junit:4.12' } From 8ed9e172bd761bd52e6eba2a8caf18c4df2ae08b Mon Sep 17 00:00:00 2001 From: JoshLi <542938192@qq.com> Date: Wed, 9 Jan 2019 20:36:58 +0800 Subject: [PATCH 12/17] Add API cameraQuality for RN Android --- .../viewmanager/ReactChatInputManager.java | 5 +++++ ReactNative/chatinput.android.js | 2 +- ReactNative/docs/APIs.md | 18 ++++++++++++++---- ReactNative/docs/APIs_zh.md | 19 ++++++++++++++----- 4 files changed, 34 insertions(+), 10 deletions(-) diff --git a/ReactNative/android/src/main/java/cn/jiguang/imui/messagelist/viewmanager/ReactChatInputManager.java b/ReactNative/android/src/main/java/cn/jiguang/imui/messagelist/viewmanager/ReactChatInputManager.java index 2c299227..451b61ac 100644 --- a/ReactNative/android/src/main/java/cn/jiguang/imui/messagelist/viewmanager/ReactChatInputManager.java +++ b/ReactNative/android/src/main/java/cn/jiguang/imui/messagelist/viewmanager/ReactChatInputManager.java @@ -787,6 +787,11 @@ public void setCustomItems(ChatInputView chatInputView, ReadableMap map) { } + @ReactProp(name = "cameraQuality") + public void cameraQuality(ChatInputView chatInputView, float cameraQuality) { + chatInputView.setCameraQuality(cameraQuality); + } + @Override public Map getExportedCustomDirectEventTypeConstants() { return MapBuilder.builder() diff --git a/ReactNative/chatinput.android.js b/ReactNative/chatinput.android.js index 0958eef5..f460a625 100644 --- a/ReactNative/chatinput.android.js +++ b/ReactNative/chatinput.android.js @@ -267,7 +267,7 @@ ChatInput.propTypes = { hideVoiceButton: PropTypes.bool, hideEmojiButton: PropTypes.bool, hidePhotoButton: PropTypes.bool, - customLayoutItems: PropTypes.object, + cameraQuality: PropTypes.number, ...ViewPropTypes }; diff --git a/ReactNative/docs/APIs.md b/ReactNative/docs/APIs.md index ae23d949..161c6c38 100644 --- a/ReactNative/docs/APIs.md +++ b/ReactNative/docs/APIs.md @@ -86,6 +86,7 @@ Refer to iOS,Android example - [inputTextColor](#inputTextColor) - [inputTextSize](#inputTextSize) - [inputTextLineHeight](#inputTextLineHeight) + - [cameraQuality](#cameraQualityandroid-only) - [Props Event]() - [onSendText](#onsendtext) - [onSendGalleryFile](#onsendgalleryfile) @@ -625,7 +626,7 @@ Set the visibility of the record video button. Example: ```showRecordVideoBtn={true}``` ------ -### inputPadding +#### inputPadding **PropTypes.object:** {left: number, top: number, right: number, bottom: number} @@ -635,7 +636,7 @@ Example: `inputPadding={left:5, top:0, right:5, bottom:0}` *** -### inputTextColor +#### inputTextColor **PropTypes.string:** {"#xxxxxx"} @@ -645,7 +646,7 @@ Example: `inputTextColor={"#808080"}` *** -### inputTextSize +#### inputTextSize **PropTypes.numbser:** {numbser} @@ -655,7 +656,7 @@ Example: `inputTextSize={14}` *** -### inputTextLineHeight +#### inputTextLineHeight **PropTypes.number:**{numbser} @@ -665,6 +666,15 @@ Example: `inputTextLineHeight={2}` ------ +#### cameraQuality(Android Only) +**PropTypes.number:** + +Set quality for camera capture,the range of value are 0.01 ~ 1(Original graph),default value is 0.5。 + +Example: ```cameraQuality={0.6}``` + +------ + ### ChatInput Event Callback ------ diff --git a/ReactNative/docs/APIs_zh.md b/ReactNative/docs/APIs_zh.md index 140b441d..2541fcc9 100644 --- a/ReactNative/docs/APIs_zh.md +++ b/ReactNative/docs/APIs_zh.md @@ -77,7 +77,7 @@ const AuroraIMUIController = IMUI.AuroraIMUIController; // the IMUI controller, - [isAllowPullToRefresh](#isallowpulltorefresh) - [ChatInput](#chatinput) - [Props customizable style]() - - [customLayoutItems](#customlayoutitemsios-only) + - [customLayoutItems](#customlayoutitems) - [chatInputBackgroundColor](#chatInputBackgroundColor) - [showSelectAlbumBtn](#showselectalbumbtnandroid-only) - [showRecordVideoBtn](#showRecordVideoBtnandroid-only) @@ -85,6 +85,7 @@ const AuroraIMUIController = IMUI.AuroraIMUIController; // the IMUI controller, - [inputTextColor](#inputTextColor) - [inputTextSize](#inputTextSize) - [inputTextLineHeight](#inputTextLineHeight) + - [cameraQuality](#cameraQualityandroid-only) - [Props 事件]() - [onSendText](#onsendtext) - [onSendGalleryFile](#onsendgalleryfile) @@ -624,7 +625,7 @@ Example: ```showSelectAlbumBtn={true}``` Example: ```showRecordVideoBtn={true}``` ------ -### inputPadding +#### inputPadding **PropTypes.object:** {left: number, top: number, right: number, bottom: number} @@ -634,7 +635,7 @@ Example: `inputPadding={left:5, top:0, right:5, bottom:0}` ------ -### inputTextColor +#### inputTextColor **PropTypes.string:** {"#xxxxxx"} @@ -644,7 +645,7 @@ Example: `inputTextColor={"#808080"}` ------ -### inputTextSize +#### inputTextSize **PropTypes.numbser:** {numbser} @@ -654,7 +655,7 @@ Example: `inputTextSize={14}` ------ -### inputTextLineHeight +#### inputTextLineHeight **PropTypes.number:**{numbser} @@ -664,6 +665,14 @@ Example: `inputTextLineHeight={2}` ------ +#### cameraQuality(Android Only) +**PropTypes.number:** + +设置拍摄的照片质量,取值 0.01 ~ 1(原图),默认 0.5。 + +Example: ```cameraQuality={0.6}``` + + #### ChatInput 事件回调 *** From 38de2302c76b86a44ed11965e43c183dd83d22e8 Mon Sep 17 00:00:00 2001 From: JoshLi <542938192@qq.com> Date: Wed, 9 Jan 2019 20:38:30 +0800 Subject: [PATCH 13/17] Update RN Android sample --- ReactNative/sample/App.js | 5 +++-- ReactNative/sample/android/app/build.gradle | 24 ++++++++++----------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/ReactNative/sample/App.js b/ReactNative/sample/App.js index f13f6484..6daa2ee6 100644 --- a/ReactNative/sample/App.js +++ b/ReactNative/sample/App.js @@ -553,10 +553,11 @@ export default class TestRNIMUI extends Component { inputPadding={{ left: 30, top: 10, right: 10, bottom: 10 }} galleryScale={0.6}//default = 0.5 compressionQuality={0.6} + cameraQuality={1}//default = 0.5 customLayoutItems={{ left: [], - right: ['send','emoji'] - // bottom: ['voice','gallery','emoji','camera'] + right: ['send'], + bottom: ['voice','gallery','emoji','camera'] }} /> diff --git a/ReactNative/sample/android/app/build.gradle b/ReactNative/sample/android/app/build.gradle index 48e23b1b..8f434f5a 100644 --- a/ReactNative/sample/android/app/build.gradle +++ b/ReactNative/sample/android/app/build.gradle @@ -87,13 +87,13 @@ def enableSeparateBuildPerCPUArchitecture = false def enableProguardInReleaseBuilds = false android { - compileSdkVersion 25 + compileSdkVersion 27 buildToolsVersion "27.0.3" defaultConfig { applicationId "com.testrnimuiexample" minSdkVersion 16 - targetSdkVersion 25 + targetSdkVersion 27 versionCode 1 versionName "1.0" ndk { @@ -154,21 +154,21 @@ android { } dependencies { - compile fileTree(include: ['*.jar'], dir: 'libs') - androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { + implementation fileTree(include: ['*.jar'], dir: 'libs') + androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) - compile (project(':aurora-imui-react-native')) { + implementation (project(':aurora-imui-react-native')) { exclude group: 'com.android.support' } - compile project(':react-native-fs') - compile ('com.facebook.react:react-native:+') { + implementation project(':react-native-fs') + implementation ('com.facebook.react:react-native:+') { exclude group: 'com.android.support' } - implementation 'com.android.support:appcompat-v7:25.4.0' - implementation 'com.android.support:design:25.4.0' - implementation 'com.android.support:support-v4:25.4.0' - implementation 'com.android.support:recyclerview-v7:25.4.0' - testCompile 'junit:junit:4.12' + implementation 'com.android.support:appcompat-v7:27.1.1' + implementation 'com.android.support:design:27.1.1' + implementation 'com.android.support:support-v4:27.1.1' + implementation 'com.android.support:recyclerview-v7:27.1.1' + testImplementation 'junit:junit:4.12' } From 8df65bca50cb5abb97ffff8b0f1d50bcff50535d Mon Sep 17 00:00:00 2001 From: JoshLi <542938192@qq.com> Date: Thu, 10 Jan 2019 10:24:21 +0800 Subject: [PATCH 14/17] Implementation latest chatinput and messagelist version --- ReactNative/android/build.gradle | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ReactNative/android/build.gradle b/ReactNative/android/build.gradle index 3fdeacb8..181b448a 100644 --- a/ReactNative/android/build.gradle +++ b/ReactNative/android/build.gradle @@ -30,9 +30,8 @@ dependencies { androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) - implementation 'cn.jiguang.imui:messagelist:0.7.4' - implementation project(':chatinput') -// compile 'cn.jiguang.imui:chatinput:0.9.1' + implementation 'cn.jiguang.imui:messagelist:+' + implementation 'cn.jiguang.imui:chatinput:+' implementation 'pub.devrel:easypermissions:1.0.1' implementation 'org.greenrobot:eventbus:3.0.0' implementation 'com.android.support:appcompat-v7:27.1.0' From f9566b4114a15d221d9597fca56d6f271eb6777a Mon Sep 17 00:00:00 2001 From: JoshLi <542938192@qq.com> Date: Thu, 10 Jan 2019 10:24:51 +0800 Subject: [PATCH 15/17] Update RN sample --- ReactNative/sample/App.js | 2 +- ReactNative/sample/package-lock.json | 25 +++++++++++++------------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/ReactNative/sample/App.js b/ReactNative/sample/App.js index 6daa2ee6..59a78e1f 100644 --- a/ReactNative/sample/App.js +++ b/ReactNative/sample/App.js @@ -553,7 +553,7 @@ export default class TestRNIMUI extends Component { inputPadding={{ left: 30, top: 10, right: 10, bottom: 10 }} galleryScale={0.6}//default = 0.5 compressionQuality={0.6} - cameraQuality={1}//default = 0.5 + cameraQuality={0.7}//default = 0.5 customLayoutItems={{ left: [], right: ['send'], diff --git a/ReactNative/sample/package-lock.json b/ReactNative/sample/package-lock.json index cbfe0174..5570e0d6 100644 --- a/ReactNative/sample/package-lock.json +++ b/ReactNative/sample/package-lock.json @@ -589,9 +589,9 @@ "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=" }, "aurora-imui-react-native": { - "version": "0.10.9", - "resolved": "https://registry.npmjs.org/aurora-imui-react-native/-/aurora-imui-react-native-0.10.9.tgz", - "integrity": "sha512-X/Vtz/sphD0Cky7tgDuBX7yNfTh+G10IsdplmPmC7YQsMhKjAOU2ncdb4/mtRhpKhSeMR13pRQDPxjX7ytJglQ==" + "version": "0.11.1", + "resolved": "http://registry.npm.taobao.org/aurora-imui-react-native/download/aurora-imui-react-native-0.11.1.tgz", + "integrity": "sha1-gD92/7zeeYgYTqyQ/ISSMrUHm/c=" }, "aws-sign2": { "version": "0.7.0", @@ -5874,13 +5874,6 @@ "hoist-non-react-statics": "^2.3.1" } }, - "react-native-tab-view": { - "version": "github:react-navigation/react-native-tab-view#36ebd834d78b841fc19778c966465d02fd1213bb", - "from": "github:react-navigation/react-native-tab-view", - "requires": { - "prop-types": "^15.6.0" - } - }, "react-navigation": { "version": "1.5.12", "resolved": "https://registry.npmjs.org/react-navigation/-/react-navigation-1.5.12.tgz", @@ -5892,8 +5885,16 @@ "prop-types": "^15.5.10", "react-lifecycles-compat": "^3.0.2", "react-native-drawer-layout-polyfill": "^1.3.2", - "react-native-safe-area-view": "^0.7.0", - "react-native-tab-view": "github:react-navigation/react-native-tab-view#36ebd834d78b841fc19778c966465d02fd1213bb" + "react-native-safe-area-view": "^0.7.0" + }, + "dependencies": { + "react-native-tab-view": { + "version": "github:react-navigation/react-native-tab-view#36ebd834d78b841fc19778c966465d02fd1213bb", + "from": "github:react-navigation/react-native-tab-view#36ebd834d78b841fc19778c966465d02fd1213bb", + "requires": { + "prop-types": "^15.6.0" + } + } } }, "react-proxy": { From 749ddc96348ce21e67a2752a3a3174c4de07a291 Mon Sep 17 00:00:00 2001 From: JoshLi <542938192@qq.com> Date: Thu, 10 Jan 2019 10:32:27 +0800 Subject: [PATCH 16/17] Update DOC --- Android/chatinput/README.md | 6 +++--- Android/chatinput/README_EN.md | 6 +++--- docs/Android/message_list_usage.md | 4 ++-- docs/Android/message_list_usage_zh.md | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Android/chatinput/README.md b/Android/chatinput/README.md index b60c0578..46884953 100644 --- a/Android/chatinput/README.md +++ b/Android/chatinput/README.md @@ -12,7 +12,7 @@ - Gradle ```groovy -compile 'cn.jiguang.imui:chatinput:0.9.1' +compile 'cn.jiguang.imui:chatinput:0.10.0' ``` - Maven @@ -20,7 +20,7 @@ compile 'cn.jiguang.imui:chatinput:0.9.1' cn.jiguang.imui chatinput - 0.9.1 + 0.10.0 pom ``` @@ -42,7 +42,7 @@ compile 'cn.jiguang.imui:chatinput:0.9.1' ```groovy dependencies { - compile 'com.github.jpush:imui:0.9.1' + compile 'com.github.jpush:imui:0.7.7' } ``` diff --git a/Android/chatinput/README_EN.md b/Android/chatinput/README_EN.md index f55eaeb1..cb7e2142 100644 --- a/Android/chatinput/README_EN.md +++ b/Android/chatinput/README_EN.md @@ -12,7 +12,7 @@ Provides several ways to add dependency, you can choose one of them: - Via Gradle ```groovy -compile 'cn.jiguang.imui:chatinput:0.9.1' +compile 'cn.jiguang.imui:chatinput:0.10.0' ``` @@ -22,7 +22,7 @@ compile 'cn.jiguang.imui:chatinput:0.9.1' cn.jiguang.imui chatinput - 0.9.1 + 0.10.0 pom ``` @@ -43,7 +43,7 @@ allprojects { ```groovy dependencies { - compile 'com.github.jpush:imui:0.9.1' + compile 'com.github.jpush:imui:0.7.7' } ``` diff --git a/docs/Android/message_list_usage.md b/docs/Android/message_list_usage.md index c3e9f146..c4d5733e 100644 --- a/docs/Android/message_list_usage.md +++ b/docs/Android/message_list_usage.md @@ -10,7 +10,7 @@ We have support several ways to add dependency. You can choose one of them. - Gradle: ```groovy -compile 'cn.jiguang.imui:messagelist:0.7.4' +compile 'cn.jiguang.imui:messagelist:0.8.0' ``` - Maven: @@ -18,7 +18,7 @@ compile 'cn.jiguang.imui:messagelist:0.7.4' cn.jiguang.imui messagelist - 0.7.4 + 0.8.0 pom ``` diff --git a/docs/Android/message_list_usage_zh.md b/docs/Android/message_list_usage_zh.md index 01ecc213..981d7bbe 100644 --- a/docs/Android/message_list_usage_zh.md +++ b/docs/Android/message_list_usage_zh.md @@ -9,7 +9,7 @@ - Gradle ```groovy -compile 'cn.jiguang.imui:messagelist:0.7.4' +compile 'cn.jiguang.imui:messagelist:0.8.0' ``` - Maven @@ -17,7 +17,7 @@ compile 'cn.jiguang.imui:messagelist:0.7.4' cn.jiguang.imui messagelist - 0.7.4 + 0.8.0 pom ``` From ddf7093ddac2ce28dcde3724c8498515ad36c445 Mon Sep 17 00:00:00 2001 From: JoshLi <542938192@qq.com> Date: Thu, 10 Jan 2019 10:33:52 +0800 Subject: [PATCH 17/17] Release v0.13.0 for RN --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c0639d0b..df406747 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurora-imui-react-native", - "version": "0.12.7", + "version": "0.13.0", "description": "aurora imui plugin for react native application", "main": "index.js",