默认
发表评论 1
想开发IM:买成品怕坑?租第3方怕贵?找开源自已撸?尽量别走弯路了... 找站长给点建议
[已回复] RainbowChat发送图片功能频繁出现无法进入预览和发送的问题
阅读(3058) | 评论(1 收藏 淘帖
手机环境:华为mate9 pro  Harmony os 2.0.0
问题描述:在聊天界面无论是拍照还是从相册选择照片完成之后,无法进入图片预览界面进行发送,并且直接返回到聊天窗口界面。

个人感觉是parentActivity.startActivity没有正常启动图片预览的Activity,这个请问要怎么解决?

源码位置:
                                                if(copyOK)
                                                {
                                                        Log.d(TAG, "【SendPic】CHOOSE_BIG_PICTURE2: data = " + data+",originalPhotoForChoose="+originalPhotoForChoose);

                                                        // 复制完成,进入预览和发送处理(之所以要复制一份,就是因为发送前还要进行压缩和处理等)todo
                                                        parentActivity.startActivity(IntentFactory.createPreviewAndSendActivityIntent(parentActivity
                                                                                , ImageViewActivity.ImageDataType.FILE_PATH, originalPhotoForChooseCopyDest.getAbsolutePath(), friendUID, usedFor));
                                                }
                                                else
                                                        WidgetUtils.showToast(parentActivity, parentActivity.getString(R.string.chat_sendpic_image_sdcar_error)+"[copy faild!]", ToastType.WARN);

控制台输出:
2024-08-11 14:37:37.251 31037-31037 System.out              com.x52im.rbchat_pro_tcp             I  @通过反射调用方法android.provider.DocumentsContract.isDocumentUri([class android.content.Context, class android.net.Uri])成功.
2024-08-11 14:37:37.252 31037-31037 System.out              com.x52im.rbchat_pro_tcp             I  @通过反射调用方法android.provider.DocumentsContract.getDocumentId([class android.net.Uri])成功.
2024-08-11 14:37:37.282 31037-31037 System.out              com.x52im.rbchat_pro_tcp             I  ++++++++++++++++++++++++++++++++++++++++ffffffffff=/storage/emulated/0/Pictures/WeiXin/wx_camera_1723200688147.jpg
2024-08-11 14:37:37.322 31037-31037 SendImageWrapper        com.x52im.rbchat_pro_tcp             D  【SendPic】CHOOSE_BIG_PICTURE2: data = Intent { dat=content://com.android.providers.media.documents/document/image:808278 flg=0x1 },originalPhotoForChoose=content://com.android.providers.media.documents/document/image%3A808278
2024-08-11 14:37:37.334  1479-2464  ActivityManager         system_server                        E  START {hwFlg=0x10 cmp=com.x52im.rbchat_pro_tcp/com.x52im.rbchat.logic.chat_root.sendimg.PreviewAndSendActivity (has extras)} result: 100
2024-08-11 14:37:37.339 31037-31037 CrashReport             com.x52im.rbchat_pro_tcp             D  >>> com.x52im.rbchat.logic.chat_friend.FriendChattingActivity onStart <<<
2024-08-11 14:37:37.339 31037-31037 CrashReport             com.x52im.rbchat_pro_tcp             D  setActivityForeState, hash:148123190 isFore:true
2024-08-11 14:37:37.339 31037-31037 CrashReport-Native      com.x52im.rbchat_pro_tcp             I  jni_setNativeInfo: key is 14
2024-08-11 14:37:37.339 31037-31037 CrashReport-Native      com.x52im.rbchat_pro_tcp             I  Set native info: isAppForeground(true)
2024-08-11 14:37:37.339 31037-31037 ActivityLifeCallback    com.x52im.rbchat_pro_tcp             D  【检测APP前后台状态】onActivityStarted【注意】(mActivityCount=1)
2024-08-11 14:37:37.348 31037-31037 HwCustConn...anagerImpl com.x52im.rbchat_pro_tcp             D  isBlockNetworkRequestByNonAis, INVALID_SUBSCRIPTION_ID
2024-08-11 14:37:37.348 31037-31037 ConnectivityManager     com.x52im.rbchat_pro_tcp             D  requestNetwork and the calling app is: com.x52im.rbchat_pro_tcp
2024-08-11 14:37:37.352 31037-31037 ZrHung.AppEyeUiProbe    com.x52im.rbchat_pro_tcp             D  notify runnable to start.
2024-08-11 14:37:37.352 31037-31086 ZrHung.AppEyeUiProbe    com.x52im.rbchat_pro_tcp             D  restart watching
2024-08-11 14:37:37.352 31037-31037 CrashReport             com.x52im.rbchat_pro_tcp             D  >>> com.x52im.rbchat.logic.chat_friend.FriendChattingActivity onResumed <<<
2024-08-11 14:37:37.354 31037-31037 ActivityLifeCallback    com.x52im.rbchat_pro_tcp             D  【检测APP前后台状态】onActivityResumed (mActivityCount=1)
2024-08-11 14:37:37.398  2102-5090  DollieAdapterService    com.huawei.systemserver              E  notifyActivityState pkg:com.x52im.rbchat_pro_tcp/com.x52im.rbchat.logic.chat_friend.FriendChattingActivity state:2 fg:true mUid:10282
2024-08-11 14:37:37.398  1479-1891  HiDATA_HiNetwork        system_server                        E  monitor handleActivityChange curPkgName is com.x52im.rbchat_pro_tcp curUid is 10282 lastPkgName is :com.android.documentsui
2024-08-11 14:37:37.405  1479-1891  HiDATA_HiNetwork        system_server                        E  onAppStart packageName is com.x52im.rbchat_pro_tcp
2024-08-11 14:37:37.405 31037-31037 System.out              com.x52im.rbchat_pro_tcp             I  键盘高度:0
2024-08-11 14:37:37.406  1479-1891  HiDATA_HiNetwork        system_server                        E  contain db file packageName: com.x52im.rbchat_pro_tcp iscanacce:-1
2024-08-11 14:37:37.420 31037-31090 mali_winsys             com.x52im.rbchat_pro_tcp             D  EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
2024-08-11 14:37:37.435 31037-31037 InputMethodManager      com.x52im.rbchat_pro_tcp             W  startInputReason = 1

即时通讯网 - 即时通讯开发者社区! 来源: - 即时通讯开发者社区!

上一篇:移动端IM产品RainbowChat[专业版] v11.6版已发布!下一篇:移动端IM产品RainbowChat[专业版] v11.7版已发布!
推荐方案
评论 1
具体是什么的效果?能拍个完整的操作视频给我看看吗,我帮你分析分析
打赏楼主 ×
使用微信打赏! 使用支付宝打赏!

返回顶部