├── README.md ├── build.gradle ├── proguard-rules.pro └── src ├── main ├── AndroidManifest.xml ├── java │ └── io │ │ └── rong │ │ └── callkit │ │ ├── AudioPlugin.java │ │ ├── BaseCallActivity.java │ │ ├── BaseNoActionBarActivity.java │ │ ├── CallEndMessageItemProvider.java │ │ ├── CallFloatBoxView.java │ │ ├── CallForegroundService.java │ │ ├── CallOptionMenu.java │ │ ├── CallPromptDialog.java │ │ ├── CallSelectMemberActivity.java │ │ ├── CallUserGridView.java │ │ ├── ContainerLayout.java │ │ ├── DragFrameLayout.java │ │ ├── GlideCallKitImageEngine.java │ │ ├── MultiAudioCallActivity.java │ │ ├── MultiCallEndMessageProvider.java │ │ ├── MultiVideoCallActivity.java │ │ ├── PickupDetector.java │ │ ├── RongASRItemView.java │ │ ├── RongASRSettingsDialog.java │ │ ├── RongASRView.java │ │ ├── RongCallAction.java │ │ ├── RongCallCustomerHandlerListener.java │ │ ├── RongCallKit.java │ │ ├── RongCallModule.java │ │ ├── RongCallProxy.java │ │ ├── RongIncomingCallService.java │ │ ├── RongVoIPIntent.java │ │ ├── SingleCallActivity.java │ │ ├── TranslationDisplayDialog.java │ │ ├── VideoPlugin.java │ │ ├── VoIPBroadcastReceiver.java │ │ └── util │ │ ├── ActivityStartCheckUtils.java │ │ ├── BluetoothUtil.java │ │ ├── BlurBitmapUtil.java │ │ ├── CallKitSearchBarListener.java │ │ ├── CallKitSearchBarView.java │ │ ├── CallKitUtils.java │ │ ├── CallRingingUtil.java │ │ ├── CallSelectMemberSerializable.java │ │ ├── CallVerticalScrollView.java │ │ ├── DefaultPushConfig.java │ │ ├── GlideBlurformation.java │ │ ├── GlideRoundTransform.java │ │ ├── GlideUtils.java │ │ ├── HeadsetInfo.java │ │ ├── ICallScrollView.java │ │ ├── IncomingCallExtraHandleUtil.java │ │ ├── RTCPhoneStateReceiver.java │ │ ├── RingingMode.java │ │ ├── RongCallPermissionUtil.java │ │ ├── SPUtils.java │ │ ├── UserProfileOrderManager.java │ │ └── permission │ │ ├── DeviceAdapter.java │ │ ├── OSUtils.java │ │ ├── PermissionShowDetail.java │ │ └── PermissionType.java └── res │ ├── anim │ ├── rc_voip_dialog_slide_in_bottom.xml │ ├── rc_voip_dialog_slide_out_bottom.xml │ ├── rc_voip_slide_in_right.xml │ └── rc_voip_slide_out_right.xml │ ├── drawable-ldrtl-xhdpi │ └── callkit_ic_nav_back_x.png │ ├── drawable-xhdpi │ ├── callkit_ic_nav_back_x.png │ ├── callkit_ic_search.png │ ├── callkit_ic_search_delete_x.png │ ├── callkit_ic_search_focused_x.png │ ├── callkit_ic_search_x.png │ ├── callkit_mult_video_user_clo_camera.png │ ├── callkit_mult_video_user_mute.png │ ├── callkit_mult_video_user_status.png │ ├── callkit_mute_unavailable.png │ ├── callkit_select_ic_nav_back_x.png │ ├── rc_ic_phone_normal.png │ ├── rc_ic_phone_pressed.png │ ├── rc_voip_add.png │ ├── rc_voip_audio_answer.png │ ├── rc_voip_audio_answer_hover.png │ ├── rc_voip_audio_left_cancel.png │ ├── rc_voip_audio_left_connected.png │ ├── rc_voip_audio_right_cancel.png │ ├── rc_voip_audio_right_connected.png │ ├── rc_voip_camera.png │ ├── rc_voip_camera_hover.png │ ├── rc_voip_disable_camera.png │ ├── rc_voip_disable_camera_hover.png │ ├── rc_voip_float_audio.png │ ├── rc_voip_float_video.png │ ├── rc_voip_handfree.png │ ├── rc_voip_handfree_hover.png │ ├── rc_voip_handup.png │ ├── rc_voip_hang_up.png │ ├── rc_voip_hang_up_hover.png │ ├── rc_voip_icon_add.png │ ├── rc_voip_icon_camera.png │ ├── rc_voip_icon_checkbox_checked.png │ ├── rc_voip_icon_checkbox_hover.png │ ├── rc_voip_icon_checkbox_normal.png │ ├── rc_voip_icon_input_video.png │ ├── rc_voip_icon_input_video_pressed.png │ ├── rc_voip_iphone.png │ ├── rc_voip_iphone_hover.png │ ├── rc_voip_menu_bg.9.png │ ├── rc_voip_minimize.png │ ├── rc_voip_more.png │ ├── rc_voip_mute.png │ ├── rc_voip_mute_hover.png │ ├── rc_voip_notification_answer.png │ ├── rc_voip_notification_hangup.png │ ├── rc_voip_phone.png │ ├── rc_voip_signal_1.png │ ├── rc_voip_signal_2.png │ ├── rc_voip_signal_3.png │ ├── rc_voip_signal_4.png │ ├── rc_voip_signal_5.png │ ├── rc_voip_signal_6.png │ ├── rc_voip_single_audio_answer.png │ ├── rc_voip_single_audio_answer_hover.png │ ├── rc_voip_switch_camera.png │ ├── rc_voip_video_answer.png │ ├── rc_voip_video_answer_hover.png │ ├── rc_voip_video_answer_hover_new.png │ ├── rc_voip_video_answer_new.png │ ├── rc_voip_video_left.png │ ├── rc_voip_video_right.png │ └── rc_voip_whiteboard.png │ ├── drawable │ ├── bg_search.xml │ ├── callkit_multiaudiouesrinfocontners.xml │ ├── callkit_selector_icon_search.xml │ ├── callkit_voip_iphone.xml │ ├── rc_ic_phone_selector.xml │ ├── rc_ic_video_selector.xml │ ├── rc_voip_asr_setting_bg.xml │ ├── rc_voip_audio_answer_selector.xml │ ├── rc_voip_audio_answer_selector_new.xml │ ├── rc_voip_back.xml │ ├── rc_voip_camera_selector.xml │ ├── rc_voip_check_icon.xml │ ├── rc_voip_checkbox.xml │ ├── rc_voip_close_black.xml │ ├── rc_voip_dialog_bg.xml │ ├── rc_voip_dialog_cancel_btn_bg.xml │ ├── rc_voip_disable_camera_selector.xml │ ├── rc_voip_float_bg.xml │ ├── rc_voip_hangup_selector.xml │ ├── rc_voip_item_selector.xml │ ├── rc_voip_mute_selector.xml │ ├── rc_voip_right_arrows.xml │ ├── rc_voip_speaker_selector.xml │ ├── rc_voip_subtitle_selector.xml │ ├── rc_voip_subtitle_start.xml │ ├── rc_voip_subtitle_stop.xml │ ├── rc_voip_switch_thumb.xml │ ├── rc_voip_switch_track.xml │ ├── rc_voip_vedio_answer_selector.xml │ ├── rc_voip_vedio_answer_selector_new.xml │ └── rc_voip_white_bg.xml │ ├── layout │ ├── activity_call_select_member2.xml │ ├── callkit_actionbar_option_text_layout.xml │ ├── callkit_conference_search_top_layout.xml │ ├── callkit_multivideo_gaussianblur.xml │ ├── callkit_rc_voip_activity_select_member.xml │ ├── callkit_rc_voip_activity_select_member_layout.xml │ ├── callkit_view_search_bar_layout.xml │ ├── dialog_translation_display.xml │ ├── rc_voip_ac_muti_audio.xml │ ├── rc_voip_activity_select_member.xml │ ├── rc_voip_activity_single_call.xml │ ├── rc_voip_asr_setting.xml │ ├── rc_voip_asr_view.xml │ ├── rc_voip_audio_call_user_info.xml │ ├── rc_voip_audio_call_user_info_incoming.xml │ ├── rc_voip_call_bottom_connected_button_layout.xml │ ├── rc_voip_call_bottom_incoming_button_layout.xml │ ├── rc_voip_call_user_info_incoming.xml │ ├── rc_voip_contact_container.xml │ ├── rc_voip_dialog_popup_prompt.xml │ ├── rc_voip_float_box.xml │ ├── rc_voip_item_asr.xml │ ├── rc_voip_item_incoming_maudio.xml │ ├── rc_voip_item_outgoing_maudio.xml │ ├── rc_voip_item_translation_language.xml │ ├── rc_voip_listitem_select_member.xml │ ├── rc_voip_msg_multi_call_end.xml │ ├── rc_voip_multi_video_call.xml │ ├── rc_voip_multi_video_calling_bottom_view.xml │ ├── rc_voip_multi_video_calling_bottom_view_rtl.xml │ ├── rc_voip_multi_video_top_view.xml │ ├── rc_voip_observer_hint.xml │ ├── rc_voip_pop_menu.xml │ ├── rc_voip_subtitle_view.xml │ ├── rc_voip_user_info.xml │ ├── rc_voip_user_info_mutlaudio.xml │ ├── rc_voip_user_portrait.xml │ ├── rc_voip_video_call_user_info.xml │ └── rc_voip_viewlet_remote_user.xml │ ├── raw │ ├── voip_incoming_ring.mp3 │ ├── voip_network_error_sound.wav │ └── voip_outgoing_ring.mp3 │ ├── values-ar-rIL │ └── strings.xml │ ├── values-en │ ├── colors.xml │ ├── dimens.xml │ └── rc_voipkit_string.xml │ └── values │ ├── callkit_callUserGridViewStyle.xml │ ├── colors.xml │ ├── dimens.xml │ ├── rc_voipkit_color.xml │ ├── rc_voipkit_ids.xml │ ├── rc_voipkit_string.xml │ ├── rc_voipkit_style.xml │ ├── strings.xml │ └── styles.xml └── test └── java └── io └── rong └── callkit └── ExampleUnitTest.java /README.md: -------------------------------------------------------------------------------- 1 | ## callkit-android 2 | 3 | Open-source code of RongCloud VoIP Audio/Video UI. 融云音视频通话功能 UI 界面 SDK 开源代码。 4 | 5 | ## 适用场景 6 | 7 | 融云提供 CallKit 源码,是为方便开发者根据 App 风格对呼叫 UI 做个性化的修改,比如色调搭配,按钮位置等,都可以自由定制。 8 | 9 | ## 集成步骤 10 | 11 | 1. 先按照 Maven 导入或本地手动导入的方式,集成 CallLib、IMKit、IMLib 三个 CallKit 依赖库,并确保都是当时官网的最新版本,如下: 12 | 13 | ```groovy 14 | dependencies { 15 | implementation 'cn.rongcloud.sdk:call_lib:x.y.z' 16 | implementation 'cn.rongcloud.sdk:im_kit:x.y.z' 17 | implementation 'cn.rongcloud.sdk:im_lib:x.y.z' 18 | } 19 | ``` 20 | 21 | > CallKit 源码因为是开源的,融云不提供老版本的下载。用户配合 CallKit 所使用的 CallLib、IMKit、IMLib 版本应该也是官网此时的最新版本。 22 | 23 | 2. 进入工程目录,克隆 CallKit 源码: 24 | 25 | ```shell 26 | cd 27 | git clone https://github.com/rongcloud/callkit-android.git 28 | ``` 29 | 30 | 3. 在 `settings.gradle` 文件中,添加引用: 31 | 32 | ```groovy 33 | include ':callkit-android' 34 | ``` 35 | 36 | 4. 在应用的 `build.gradle` 中,添加依赖: 37 | 38 | ```groovy 39 | dependencies { 40 | ... 41 | implementation project(':callkit-android') 42 | } 43 | ``` -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | namespace 'io.rong.callkit' 5 | compileSdk 35 6 | 7 | defaultConfig { 8 | minSdkVersion 21 9 | targetSdkVersion 35 10 | versionName "5.28.0_OpenSourceCode" 11 | } 12 | 13 | sourceSets { 14 | main { 15 | manifest.srcFile 'src/main/AndroidManifest.xml' 16 | jniLibs.srcDirs = ['libs'] 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | api fileTree(dir: 'libs', include: ['*.jar']) 23 | api project(':imkit') 24 | api project(':calllib') 25 | 26 | implementation 'androidx.media:media:1.2.1' 27 | implementation 'com.github.bumptech.glide:glide:4.9.0' 28 | } 29 | -------------------------------------------------------------------------------- /proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/jiangecho/apps/adt-bundle-mac-x86_64-20140702/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 10 | 11 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 35 | 36 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 94 | 95 | 98 | 99 | 100 | 101 | 102 | 105 | 106 | -------------------------------------------------------------------------------- /src/main/java/io/rong/callkit/BaseNoActionBarActivity.java: -------------------------------------------------------------------------------- 1 | package io.rong.callkit; 2 | 3 | import android.content.Context; 4 | import androidx.fragment.app.FragmentActivity; 5 | import io.rong.imkit.utils.language.RongConfigurationManager; 6 | 7 | public class BaseNoActionBarActivity extends FragmentActivity { 8 | @Override 9 | protected void attachBaseContext(Context newBase) { 10 | Context newContext = 11 | RongConfigurationManager.getInstance().getConfigurationContext(newBase); 12 | super.attachBaseContext(newContext); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/io/rong/callkit/CallOptionMenu.java: -------------------------------------------------------------------------------- 1 | package io.rong.callkit; 2 | 3 | import android.content.Context; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.view.ViewGroup.LayoutParams; 7 | import android.widget.LinearLayout; 8 | import android.widget.PopupWindow; 9 | import android.widget.TextView; 10 | 11 | /** Created by mamingyang on 2018/3/19. */ 12 | public class CallOptionMenu extends PopupWindow { 13 | private View.OnClickListener onItemClickListener; 14 | private TextView tv_right_text; 15 | private LinearLayout layoutAdd; 16 | private LinearLayout layoutWhiteBoard; 17 | private LinearLayout layoutHandUp; 18 | 19 | public CallOptionMenu(Context context) { 20 | super(context); 21 | LayoutInflater inflater = 22 | (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); 23 | View content = inflater.inflate(R.layout.rc_voip_pop_menu, null); 24 | setContentView(content); 25 | setWidth(LayoutParams.WRAP_CONTENT); 26 | setHeight(LayoutParams.WRAP_CONTENT); 27 | layoutAdd = (LinearLayout) content.findViewById(R.id.voipItemAdd); 28 | layoutAdd.setOnClickListener( 29 | new View.OnClickListener() { 30 | @Override 31 | public void onClick(View v) { 32 | if (onItemClickListener != null) onItemClickListener.onClick(v); 33 | } 34 | }); 35 | tv_right_text = content.findViewById(R.id.tv_right_text); 36 | tv_right_text.setText(context.getString(R.string.rc_voip_add_member)); 37 | layoutWhiteBoard = (LinearLayout) content.findViewById(R.id.voipItemWhiteboard); 38 | layoutWhiteBoard.setOnClickListener( 39 | new View.OnClickListener() { 40 | @Override 41 | public void onClick(View v) { 42 | if (onItemClickListener != null) onItemClickListener.onClick(v); 43 | } 44 | }); 45 | 46 | layoutHandUp = (LinearLayout) content.findViewById(R.id.voipItemHandup); 47 | layoutHandUp.setOnClickListener( 48 | new View.OnClickListener() { 49 | @Override 50 | public void onClick(View v) { 51 | if (onItemClickListener != null) onItemClickListener.onClick(v); 52 | } 53 | }); 54 | 55 | setBackgroundDrawable(context.getResources().getDrawable(R.drawable.rc_voip_menu_bg)); 56 | setOutsideTouchable(true); 57 | setFocusable(true); 58 | } 59 | 60 | public void setOnItemClickListener(View.OnClickListener onItemClickListener) { 61 | this.onItemClickListener = onItemClickListener; 62 | } 63 | 64 | public void setHandUpvisibility(boolean isSeen) { 65 | if (layoutHandUp != null) { 66 | if (!isSeen) layoutHandUp.setVisibility(View.GONE); 67 | else { 68 | layoutHandUp.setVisibility(View.VISIBLE); 69 | } 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/main/java/io/rong/callkit/ContainerLayout.java: -------------------------------------------------------------------------------- 1 | package io.rong.callkit; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | import android.view.SurfaceView; 6 | import android.view.ViewGroup; 7 | import android.view.WindowManager; 8 | import android.widget.RelativeLayout; 9 | import androidx.annotation.NonNull; 10 | import cn.rongcloud.rtc.api.stream.RCRTCVideoView; 11 | import cn.rongcloud.rtc.utils.FinLog; 12 | 13 | /** Created by Administrator on 2017/3/30. */ 14 | public class ContainerLayout extends RelativeLayout { 15 | private final String TAG = ContainerLayout.class.getSimpleName(); 16 | private Context context; 17 | private static boolean isNeedFillScrren = true; 18 | SurfaceView currentView; 19 | 20 | public ContainerLayout(Context context, AttributeSet attrs) { 21 | super(context, attrs); 22 | this.context = context; 23 | } 24 | 25 | public void addView(final SurfaceView videoView) { 26 | WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE); 27 | this.screenWidth = wm.getDefaultDisplay().getWidth(); 28 | this.screenHeight = wm.getDefaultDisplay().getHeight(); 29 | FinLog.d( 30 | TAG, 31 | "---xx-- add view " 32 | + videoView.toString() 33 | + " Height: " 34 | + ((RCRTCVideoView) videoView).rotatedFrameHeight 35 | + " Width: " 36 | + ((RCRTCVideoView) videoView).rotatedFrameWidth); 37 | super.addView(videoView, getBigContainerParams((RCRTCVideoView) videoView)); 38 | currentView = videoView; 39 | ((RCRTCVideoView) videoView) 40 | .setOnSizeChangedListener( 41 | new RCRTCVideoView.OnSizeChangedListener() { 42 | @Override 43 | public void onChanged(RCRTCVideoView.Size size) { 44 | try { 45 | ContainerLayout.this.removeAllViews(); 46 | FinLog.d( 47 | TAG, 48 | "---xx-- change view " 49 | + videoView.toString() 50 | + " Height: " 51 | + ((RCRTCVideoView) videoView) 52 | .rotatedFrameHeight 53 | + " Width: " 54 | + ((RCRTCVideoView) videoView) 55 | .rotatedFrameWidth); 56 | ContainerLayout.this.addView( 57 | videoView, 58 | getBigContainerParams((RCRTCVideoView) videoView)); 59 | } catch (Exception e) { 60 | e.printStackTrace(); 61 | } 62 | } 63 | }); 64 | } 65 | 66 | @NonNull 67 | private LayoutParams getBigContainerParams(RCRTCVideoView videoView) { 68 | LayoutParams layoutParams = null; 69 | if (!isNeedFillScrren) { 70 | if (screenHeight > screenWidth) { // V 71 | int layoutParamsHeight = 72 | (videoView.rotatedFrameHeight == 0 || videoView.rotatedFrameWidth == 0) 73 | ? ViewGroup.LayoutParams.WRAP_CONTENT 74 | : screenWidth 75 | * videoView.rotatedFrameHeight 76 | / videoView.rotatedFrameWidth; 77 | layoutParams = new LayoutParams(screenWidth, layoutParamsHeight); 78 | } else { 79 | int layoutParamsWidth = 80 | (videoView.rotatedFrameWidth == 0 || videoView.rotatedFrameHeight == 0) 81 | ? ViewGroup.LayoutParams.WRAP_CONTENT 82 | : (screenWidth 83 | * videoView.rotatedFrameWidth 84 | / videoView.rotatedFrameHeight 85 | > screenWidth 86 | ? screenWidth 87 | : screenHeight 88 | * videoView.rotatedFrameWidth 89 | / videoView.rotatedFrameHeight); 90 | layoutParams = new LayoutParams(layoutParamsWidth, screenHeight); 91 | } 92 | } else { 93 | layoutParams = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); 94 | } 95 | layoutParams.addRule(RelativeLayout.CENTER_IN_PARENT); 96 | return layoutParams; 97 | } 98 | 99 | public void setIsNeedFillScrren(boolean isNeed) { 100 | isNeedFillScrren = isNeed; 101 | } 102 | 103 | @Override 104 | public void removeAllViews() { 105 | if (currentView != null) ((RCRTCVideoView) currentView).setOnSizeChangedListener(null); 106 | super.removeAllViews(); 107 | } 108 | 109 | private int screenWidth; 110 | private int screenHeight; 111 | } 112 | -------------------------------------------------------------------------------- /src/main/java/io/rong/callkit/DragFrameLayout.java: -------------------------------------------------------------------------------- 1 | package io.rong.callkit; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | import android.view.MotionEvent; 6 | import android.view.View; 7 | import android.widget.FrameLayout; 8 | import androidx.annotation.NonNull; 9 | import androidx.annotation.Nullable; 10 | import androidx.customview.widget.ViewDragHelper; 11 | 12 | /** Created by RongCloud on 2025/8/12. */ 13 | public class DragFrameLayout extends FrameLayout { 14 | 15 | private static final String TAG = "DragFrameLayout"; 16 | 17 | // ViewDragHelper相关 18 | private ViewDragHelper mDragHelper; 19 | private View mDragView; 20 | 21 | public DragFrameLayout(@NonNull Context context) { 22 | super(context); 23 | } 24 | 25 | public DragFrameLayout(@NonNull Context context, @Nullable AttributeSet attrs) { 26 | super(context, attrs); 27 | } 28 | 29 | public DragFrameLayout( 30 | @NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) { 31 | super(context, attrs, defStyleAttr); 32 | } 33 | 34 | public DragFrameLayout( 35 | @NonNull Context context, 36 | @Nullable AttributeSet attrs, 37 | int defStyleAttr, 38 | int defStyleRes) { 39 | super(context, attrs, defStyleAttr, defStyleRes); 40 | } 41 | 42 | public void setDragView(View view) { 43 | mDragView = view; 44 | } 45 | 46 | @Override 47 | protected void onLayout(boolean changed, int left, int top, int right, int bottom) { 48 | // Log.d(TAG, "onLayout: changed="+changed+" , left="+left+" , top="+top 49 | // + " , right="+right+" , bottom="+bottom); 50 | super.onLayout(changed, left, top, right, bottom); 51 | } 52 | 53 | @Override 54 | protected void onAttachedToWindow() { 55 | super.onAttachedToWindow(); 56 | // 初始化ViewDragHelper 57 | mDragHelper = 58 | ViewDragHelper.create( 59 | this, 60 | 1.0f, 61 | new ViewDragHelper.Callback() { 62 | @Override 63 | public boolean tryCaptureView(@NonNull View child, int pointerId) { 64 | if (mDragView == null || child == null) { 65 | return false; 66 | } 67 | return child == mDragView; 68 | } 69 | 70 | @Override 71 | public void onViewPositionChanged( 72 | @NonNull View child, int left, int top, int dx, int dy) { 73 | LayoutParams lp = (LayoutParams) child.getLayoutParams(); 74 | lp.topMargin = top - getPaddingTop(); 75 | child.setLayoutParams(lp); 76 | } 77 | 78 | @Override 79 | public int clampViewPositionVertical(View child, int top, int dy) { 80 | return Math.max( 81 | getPaddingTop(), 82 | Math.min( 83 | top, 84 | getHeight() 85 | - getPaddingTop() 86 | - getPaddingBottom() 87 | - mDragView.getMinimumHeight())); 88 | } 89 | 90 | @Override 91 | public int clampViewPositionHorizontal( 92 | @NonNull View child, int left, int dx) { 93 | return (int) child.getX(); 94 | } 95 | 96 | @Override 97 | public int getViewHorizontalDragRange(@NonNull View child) { 98 | return getMeasuredWidth() - child.getMeasuredWidth(); 99 | } 100 | 101 | @Override 102 | public int getViewVerticalDragRange(@NonNull View child) { 103 | return getMeasuredHeight() - child.getMeasuredHeight(); 104 | } 105 | }); 106 | } 107 | 108 | @Override 109 | public boolean onInterceptTouchEvent(MotionEvent ev) { 110 | if (mDragView == null) { 111 | return false; 112 | } 113 | return mDragHelper.shouldInterceptTouchEvent(ev); 114 | } 115 | 116 | @Override 117 | public boolean onTouchEvent(MotionEvent event) { 118 | if (mDragView == null) { 119 | return false; 120 | } 121 | // 将触摸事件传递给ViewDragHelper 122 | mDragHelper.processTouchEvent(event); 123 | return true; 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /src/main/java/io/rong/callkit/GlideCallKitImageEngine.java: -------------------------------------------------------------------------------- 1 | package io.rong.callkit; 2 | 3 | import android.content.Context; 4 | import android.net.Uri; 5 | import android.widget.ImageView; 6 | import androidx.annotation.DrawableRes; 7 | import com.bumptech.glide.Glide; 8 | import com.bumptech.glide.request.RequestOptions; 9 | 10 | public class GlideCallKitImageEngine { 11 | /** 12 | * 设置头像加载样式 13 | * 14 | * @param context 15 | * @param url 16 | * @param replaceRes 17 | * @param imageView 18 | */ 19 | public void loadPortrait( 20 | Context context, Uri url, @DrawableRes int replaceRes, ImageView imageView) { 21 | Glide.with(context) 22 | .load(url) 23 | .error(replaceRes) 24 | .placeholder(replaceRes) 25 | .apply(RequestOptions.circleCropTransform()) 26 | .into(imageView); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/io/rong/callkit/MultiCallEndMessageProvider.java: -------------------------------------------------------------------------------- 1 | package io.rong.callkit; 2 | 3 | import android.content.Context; 4 | import android.text.Spannable; 5 | import android.text.SpannableString; 6 | import android.view.LayoutInflater; 7 | import android.view.View; 8 | import android.view.ViewGroup; 9 | import android.widget.TextView; 10 | import io.rong.calllib.RongCallCommon; 11 | import io.rong.calllib.message.MultiCallEndMessage; 12 | import io.rong.imkit.conversation.messgelist.provider.BaseNotificationMessageItemProvider; 13 | import io.rong.imkit.model.UiMessage; 14 | import io.rong.imkit.widget.adapter.IViewProviderListener; 15 | import io.rong.imkit.widget.adapter.ViewHolder; 16 | import io.rong.imlib.IRongCoreEnum; 17 | import io.rong.imlib.model.MessageContent; 18 | import java.util.List; 19 | 20 | public class MultiCallEndMessageProvider 21 | extends BaseNotificationMessageItemProvider { 22 | 23 | @Override 24 | protected ViewHolder onCreateMessageContentViewHolder(ViewGroup parent, int viewType) { 25 | View v = 26 | LayoutInflater.from(parent.getContext()) 27 | .inflate(R.layout.rc_voip_msg_multi_call_end, parent, false); 28 | return new ViewHolder(parent.getContext(), v); 29 | } 30 | 31 | @Override 32 | protected void bindMessageContentViewHolder( 33 | ViewHolder holder, 34 | ViewHolder parentHolder, 35 | MultiCallEndMessage multiCallEndMessage, 36 | UiMessage uiMessage, 37 | int position, 38 | List list, 39 | IViewProviderListener listener) { 40 | Context context = holder.getContext(); 41 | String msg = ""; 42 | RongCallCommon.CallDisconnectedReason reason = multiCallEndMessage.getReason(); 43 | IRongCoreEnum.MediaType mediaType = multiCallEndMessage.getMediaType(); 44 | if (reason == RongCallCommon.CallDisconnectedReason.OTHER_DEVICE_HAD_ACCEPTED) { 45 | msg = context.getResources().getString(R.string.rc_voip_call_other); 46 | } else if (reason == RongCallCommon.CallDisconnectedReason.REMOTE_HANGUP 47 | || reason == RongCallCommon.CallDisconnectedReason.HANGUP) { 48 | if (mediaType == IRongCoreEnum.MediaType.AUDIO) { 49 | msg = context.getResources().getString(R.string.rc_voip_audio_ended); 50 | } else if (mediaType == IRongCoreEnum.MediaType.VIDEO) { 51 | msg = context.getResources().getString(R.string.rc_voip_video_ended); 52 | } 53 | } else if (reason == RongCallCommon.CallDisconnectedReason.REMOTE_REJECT 54 | || reason == RongCallCommon.CallDisconnectedReason.REJECT) { 55 | if (mediaType == IRongCoreEnum.MediaType.AUDIO) { 56 | msg = context.getResources().getString(R.string.rc_voip_audio_refuse); 57 | } else if (mediaType == IRongCoreEnum.MediaType.VIDEO) { 58 | msg = context.getResources().getString(R.string.rc_voip_video_refuse); 59 | } 60 | } else if (reason == RongCallCommon.CallDisconnectedReason.SERVICE_NOT_OPENED 61 | || reason == RongCallCommon.CallDisconnectedReason.REMOTE_ENGINE_UNSUPPORTED) { 62 | msg = context.getResources().getString(R.string.rc_voip_engine_notfound); 63 | } else if (reason == RongCallCommon.CallDisconnectedReason.CANCEL) { 64 | if (mediaType == IRongCoreEnum.MediaType.AUDIO) { 65 | msg = context.getResources().getString(R.string.rc_voip_audio_cancel); 66 | } else if (mediaType == IRongCoreEnum.MediaType.VIDEO) { 67 | msg = context.getResources().getString(R.string.rc_voip_video_cancel); 68 | } 69 | } else { 70 | if (mediaType == IRongCoreEnum.MediaType.AUDIO) { 71 | msg = context.getResources().getString(R.string.rc_voip_audio_no_response); 72 | } else if (mediaType == IRongCoreEnum.MediaType.VIDEO) { 73 | msg = context.getResources().getString(R.string.rc_voip_video_no_response); 74 | } 75 | } 76 | TextView tv = holder.getView(io.rong.imkit.R.id.rc_msg); 77 | tv.setText(msg); 78 | } 79 | 80 | @Override 81 | protected boolean isMessageViewType(MessageContent messageContent) { 82 | return messageContent instanceof MultiCallEndMessage; 83 | } 84 | 85 | @Override 86 | public Spannable getSummarySpannable(Context context, MultiCallEndMessage multiCallEndMessage) { 87 | String msg = ""; 88 | if (multiCallEndMessage.getReason() == RongCallCommon.CallDisconnectedReason.NO_RESPONSE) { 89 | if (multiCallEndMessage.getMediaType() == IRongCoreEnum.MediaType.AUDIO) { 90 | msg = context.getResources().getString(R.string.rc_voip_audio_no_response); 91 | } else if (multiCallEndMessage.getMediaType() == IRongCoreEnum.MediaType.VIDEO) { 92 | msg = context.getResources().getString(R.string.rc_voip_video_no_response); 93 | } 94 | } else { 95 | if (multiCallEndMessage.getMediaType() == IRongCoreEnum.MediaType.AUDIO) { 96 | msg = context.getResources().getString(R.string.rc_voip_message_audio); 97 | } else if (multiCallEndMessage.getMediaType() == IRongCoreEnum.MediaType.VIDEO) { 98 | msg = context.getResources().getString(R.string.rc_voip_message_video); 99 | } 100 | } 101 | return new SpannableString(msg); 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /src/main/java/io/rong/callkit/PickupDetector.java: -------------------------------------------------------------------------------- 1 | package io.rong.callkit; 2 | 3 | import android.content.Context; 4 | import android.hardware.Sensor; 5 | import android.hardware.SensorEvent; 6 | import android.hardware.SensorEventListener; 7 | import android.hardware.SensorManager; 8 | 9 | public class PickupDetector { 10 | 11 | private SensorManager manager; 12 | private Sensor mProximitysensor; 13 | 14 | private boolean isPickUp; 15 | private PickupDetectListener listener; 16 | 17 | public PickupDetector(Context context) { 18 | 19 | manager = (SensorManager) context.getSystemService(Context.SENSOR_SERVICE); 20 | if (manager != null) { 21 | mProximitysensor = manager.getDefaultSensor(Sensor.TYPE_PROXIMITY); 22 | } 23 | } 24 | 25 | SensorEventListener sensorEventListener = 26 | new SensorEventListener() { 27 | @Override 28 | public void onSensorChanged(SensorEvent sensorEvent) { 29 | 30 | if (mProximitysensor == null) return; 31 | 32 | float value = sensorEvent.values[0]; 33 | isPickUp = value < sensorEvent.sensor.getMaximumRange(); 34 | // 打开或者关闭屏幕 35 | if (listener != null) { 36 | listener.onPickupDetected(isPickUp); 37 | } 38 | } 39 | 40 | @Override 41 | public void onAccuracyChanged(Sensor sensor, int i) {} 42 | }; 43 | 44 | public void register(PickupDetectListener listener) { 45 | this.listener = listener; 46 | if (manager != null) { 47 | manager.registerListener( 48 | sensorEventListener, mProximitysensor, SensorManager.SENSOR_DELAY_FASTEST); 49 | } 50 | } 51 | 52 | public void unRegister() { 53 | if (manager != null) { 54 | manager.unregisterListener(sensorEventListener); 55 | } 56 | listener = null; // 释放引用。 57 | } 58 | 59 | public interface PickupDetectListener { 60 | void onPickupDetected(boolean isPickingUp); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/io/rong/callkit/RongCallAction.java: -------------------------------------------------------------------------------- 1 | package io.rong.callkit; 2 | 3 | import android.text.TextUtils; 4 | import io.rong.calllib.ReportUtil; 5 | 6 | /** Created by weiqinxiao on 16/3/15. */ 7 | public enum RongCallAction { 8 | NONE(-1, ""), 9 | ACTION_OUTGOING_CALL(1, "ACTION_OUTGOING_CALL"), 10 | ACTION_INCOMING_CALL(2, "ACTION_INCOMING_CALL"), 11 | ACTION_ADD_MEMBER(3, "ACTION_ADD_MEMBER"), 12 | ACTION_RESUME_CALL(4, "ACTION_RESUME_CALL"); 13 | 14 | int value; 15 | String msg; 16 | 17 | RongCallAction(int v, String msg) { 18 | this.value = v; 19 | this.msg = msg; 20 | } 21 | 22 | public int getValue() { 23 | return value; 24 | } 25 | 26 | public String getName() { 27 | return msg; 28 | } 29 | 30 | public static RongCallAction getAction(String msg) { 31 | if (TextUtils.isEmpty(msg)) { 32 | ReportUtil.appError(ReportUtil.TAG.INTERNAL_ERROR, "desc", "getAction().msg is empty"); 33 | return NONE; 34 | } 35 | 36 | for (RongCallAction action : RongCallAction.values()) { 37 | if (TextUtils.equals(action.getName(), msg)) { 38 | return action; 39 | } 40 | } 41 | return NONE; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/io/rong/callkit/RongCallCustomerHandlerListener.java: -------------------------------------------------------------------------------- 1 | package io.rong.callkit; 2 | 3 | import android.content.Context; 4 | import android.content.Intent; 5 | import android.view.SurfaceView; 6 | import io.rong.calllib.RongCallCommon; 7 | import io.rong.calllib.RongCallSession; 8 | import java.util.ArrayList; 9 | import java.util.List; 10 | 11 | public interface RongCallCustomerHandlerListener { 12 | 13 | List handleActivityResult(int requestCode, int resultCode, Intent data); 14 | 15 | void addMember(Context context, ArrayList currentMemberIds); 16 | 17 | void onRemoteUserInvited(String userId, RongCallCommon.CallMediaType mediaType); 18 | 19 | void onCallConnected(RongCallSession callSession, SurfaceView localVideo); 20 | 21 | void onCallDisconnected( 22 | RongCallSession callSession, RongCallCommon.CallDisconnectedReason reason); 23 | 24 | void onCallMissed(RongCallSession callSession, RongCallCommon.CallDisconnectedReason reason); 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/io/rong/callkit/RongVoIPIntent.java: -------------------------------------------------------------------------------- 1 | package io.rong.callkit; 2 | 3 | /** Created by weiqinxiao on 16/3/18. */ 4 | public class RongVoIPIntent { 5 | public static final String RONG_INTENT_VOIP_CATEGORY = "io.rong.intent.category.voip"; 6 | 7 | public static final String RONG_INTENT_ACTION_VOIP_MULTIAUDIO = 8 | "io.rong.intent.action.voip.MULTIAUDIO"; 9 | public static final String RONG_INTENT_ACTION_VOIP_MULTIVIDEO = 10 | "io.rong.intent.action.voip.MULTIVIDEO"; 11 | public static final String RONG_INTENT_ACTION_VOIP_SINGLEAUDIO = 12 | "io.rong.intent.action.voip.SINGLEAUDIO"; 13 | public static final String RONG_INTENT_ACTION_VOIP_SINGLEVIDEO = 14 | "io.rong.intent.action.voip.SINGLEVIDEO"; 15 | public static final String RONG_INTENT_ACTION_VOIP_INIT = "io.rong.intent.action.SDK_INIT"; 16 | public static final String RONG_INTENT_ACTION_VOIP_UI_READY = "io.rong.intent.action.UI_READY"; 17 | public static final String RONG_INTENT_ACTION_VOIP_CONNECTED = 18 | "io.rong.intent.action.SDK_CONNECTED"; 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/io/rong/callkit/TranslationDisplayDialog.java: -------------------------------------------------------------------------------- 1 | package io.rong.callkit; 2 | 3 | import static android.view.View.GONE; 4 | import static android.view.View.VISIBLE; 5 | 6 | import android.app.Dialog; 7 | import android.content.Context; 8 | import android.os.Bundle; 9 | import android.view.Gravity; 10 | import android.view.ViewGroup; 11 | import android.view.Window; 12 | import androidx.annotation.NonNull; 13 | import io.rong.callkit.databinding.DialogTranslationDisplayBinding; 14 | import io.rong.callkit.databinding.RcVoipItemTranslationLanguageBinding; 15 | import java.util.Map; 16 | 17 | public class TranslationDisplayDialog extends Dialog { 18 | 19 | private OnLanguageSelectedListener listener; 20 | private String currentLanguage; 21 | private DialogTranslationDisplayBinding binding; 22 | 23 | public interface OnLanguageSelectedListener { 24 | void onLanguageSelected(String language); 25 | } 26 | 27 | public TranslationDisplayDialog(@NonNull Context context, String currentLanguage) { 28 | super(context, R.style.RC_VOIP_TranslationDisplayDialogStyle); 29 | this.currentLanguage = currentLanguage; 30 | } 31 | 32 | @Override 33 | protected void onCreate(Bundle savedInstanceState) { 34 | super.onCreate(savedInstanceState); 35 | binding = DialogTranslationDisplayBinding.inflate(getLayoutInflater()); 36 | setContentView(binding.getRoot()); 37 | 38 | // 设置弹窗从底部弹出 39 | Window window = getWindow(); 40 | if (window != null) { 41 | window.setGravity(Gravity.BOTTOM); 42 | window.setLayout( 43 | ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); 44 | window.setWindowAnimations(R.style.RC_VOIP_TranslationDisplayDialogAnimation); 45 | } 46 | 47 | initView(); 48 | } 49 | 50 | private void initView() { 51 | RcVoipItemTranslationLanguageBinding lastItem = null; 52 | for (Map.Entry entry : RongASRSettingsDialog.LANGUAGE_MAP.entrySet()) { 53 | RcVoipItemTranslationLanguageBinding item = 54 | RcVoipItemTranslationLanguageBinding.inflate(getLayoutInflater()); 55 | item.ivCheck.setVisibility(currentLanguage.equals(entry.getKey()) ? VISIBLE : GONE); 56 | item.tvLanguage.setText(entry.getValue()); 57 | item.getRoot().setOnClickListener(v -> selectLanguage(entry.getKey())); 58 | binding.llOptions.addView(item.getRoot()); 59 | lastItem = item; 60 | } 61 | lastItem.line.setVisibility(GONE); 62 | 63 | // 取消按钮 64 | binding.btnCancel.setOnClickListener(v -> dismiss()); 65 | } 66 | 67 | private void selectLanguage(String language) { 68 | if (listener != null) { 69 | listener.onLanguageSelected(language); 70 | } 71 | dismiss(); 72 | } 73 | 74 | public void setOnLanguageSelectedListener(OnLanguageSelectedListener listener) { 75 | this.listener = listener; 76 | } 77 | 78 | @Override 79 | public void dismiss() { 80 | super.dismiss(); 81 | if (binding != null) { 82 | binding = null; 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /src/main/java/io/rong/callkit/util/BlurBitmapUtil.java: -------------------------------------------------------------------------------- 1 | package io.rong.callkit.util; 2 | 3 | import android.annotation.TargetApi; 4 | import android.content.Context; 5 | import android.graphics.Bitmap; 6 | import android.os.Build; 7 | import android.renderscript.Allocation; 8 | import android.renderscript.Element; 9 | import android.renderscript.RenderScript; 10 | import android.renderscript.ScriptIntrinsicBlur; 11 | 12 | /** Created by dengxudong on 2018/5/18. */ 13 | public class BlurBitmapUtil { 14 | 15 | private static class SingletonHolder { 16 | 17 | static BlurBitmapUtil sInstance = new BlurBitmapUtil(); 18 | } 19 | 20 | private BlurBitmapUtil() {} 21 | 22 | public static BlurBitmapUtil instance() { 23 | return SingletonHolder.sInstance; 24 | } 25 | 26 | /** 27 | * @param context 上下文对象 28 | * @param image 需要模糊的图片 29 | * @param outWidth 输入出的宽度 30 | * @param outHeight 输出的高度 31 | * @return 模糊处理后的Bitmap 32 | */ 33 | @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1) 34 | public Bitmap blurBitmap( 35 | Context context, Bitmap image, float blurRadius, int outWidth, int outHeight) { 36 | // 将缩小后的图片做为预渲染的图片 37 | Bitmap inputBitmap = Bitmap.createScaledBitmap(image, outWidth, outHeight, false); 38 | // 创建一张渲染后的输出图片 39 | Bitmap outputBitmap = Bitmap.createBitmap(inputBitmap); 40 | // 创建RenderScript内核对象 41 | RenderScript rs = RenderScript.create(context); 42 | // 创建一个模糊效果的RenderScript的工具对象 43 | ScriptIntrinsicBlur blurScript = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs)); 44 | // 由于RenderScript并没有使用VM来分配内存,所以需要使用Allocation类来创建和分配内存空间 45 | // 创建Allocation对象的时候其实内存是空的,需要使用copyTo()将数据填充进去 46 | Allocation tmpIn = Allocation.createFromBitmap(rs, inputBitmap); 47 | Allocation tmpOut = Allocation.createFromBitmap(rs, outputBitmap); 48 | // 设置渲染的模糊程度, 25f是最大模糊度 49 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { 50 | blurScript.setRadius(blurRadius); 51 | } 52 | // 设置blurScript对象的输入内存 53 | blurScript.setInput(tmpIn); 54 | // 将输出数据保存到输出内存中 55 | blurScript.forEach(tmpOut); 56 | // 将数据填充到Allocation中 57 | tmpOut.copyTo(outputBitmap); 58 | return outputBitmap; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/io/rong/callkit/util/CallKitSearchBarListener.java: -------------------------------------------------------------------------------- 1 | package io.rong.callkit.util; 2 | 3 | public interface CallKitSearchBarListener { 4 | /** 5 | * 开始搜索 EditText 中输入内容后,会触发此回调 6 | * 7 | * @param keyword 搜索关键字 8 | */ 9 | void onSearchStart(String keyword); 10 | 11 | /** 软键盘中"搜索"被点击后,触发此回调 此回调被触发后,仅收起软键盘 */ 12 | void onSoftSearchKeyClick(); 13 | 14 | /** 搜索控件中,点击"清除"后,触发此回调 */ 15 | void onClearButtonClick(); 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/io/rong/callkit/util/CallSelectMemberSerializable.java: -------------------------------------------------------------------------------- 1 | package io.rong.callkit.util; 2 | 3 | import java.io.Serializable; 4 | import java.util.HashMap; 5 | 6 | public class CallSelectMemberSerializable implements Serializable { 7 | private HashMap hashMap = new HashMap<>(); 8 | 9 | public CallSelectMemberSerializable(HashMap hashMap) { 10 | this.hashMap = hashMap; 11 | } 12 | 13 | public HashMap getHashMap() { 14 | return hashMap; 15 | } 16 | 17 | public void setHashMap(HashMap hashMap) { 18 | this.hashMap = hashMap; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/io/rong/callkit/util/GlideBlurformation.java: -------------------------------------------------------------------------------- 1 | package io.rong.callkit.util; 2 | 3 | import android.content.Context; 4 | import android.graphics.Bitmap; 5 | import androidx.annotation.NonNull; 6 | import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool; 7 | import com.bumptech.glide.load.resource.bitmap.BitmapTransformation; 8 | import java.security.MessageDigest; 9 | 10 | /** Created by dengxudong on 2018/5/18. */ 11 | public class GlideBlurformation extends BitmapTransformation { 12 | private Context context; 13 | 14 | public GlideBlurformation(Context context) { 15 | this.context = context; 16 | } 17 | 18 | @Override 19 | protected Bitmap transform( 20 | @NonNull BitmapPool pool, @NonNull Bitmap toTransform, int outWidth, int outHeight) { 21 | return BlurBitmapUtil.instance().blurBitmap(context, toTransform, 20, outWidth, outHeight); 22 | } 23 | 24 | @Override 25 | public void updateDiskCacheKey(MessageDigest messageDigest) {} 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/io/rong/callkit/util/GlideRoundTransform.java: -------------------------------------------------------------------------------- 1 | package io.rong.callkit.util; 2 | 3 | import android.content.res.Resources; 4 | import android.graphics.Bitmap; 5 | import android.graphics.BitmapShader; 6 | import android.graphics.Canvas; 7 | import android.graphics.Paint; 8 | import android.graphics.RectF; 9 | import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool; 10 | import com.bumptech.glide.load.resource.bitmap.BitmapTransformation; 11 | import java.security.MessageDigest; 12 | 13 | /** Created by Ethan on 2018/6/1. */ 14 | public class GlideRoundTransform extends BitmapTransformation { 15 | 16 | private static float radius = 8f; 17 | 18 | public GlideRoundTransform() { 19 | this(8); 20 | } 21 | 22 | public GlideRoundTransform(int dp) { 23 | super(); 24 | this.radius = Resources.getSystem().getDisplayMetrics().density * dp; 25 | } 26 | 27 | @Override 28 | protected Bitmap transform(BitmapPool pool, Bitmap toTransform, int outWidth, int outHeight) { 29 | return roundCrop(pool, toTransform); 30 | } 31 | 32 | private static Bitmap roundCrop(BitmapPool pool, Bitmap source) { 33 | if (source == null) return null; 34 | 35 | Bitmap result = pool.get(source.getWidth(), source.getHeight(), Bitmap.Config.ARGB_8888); 36 | if (result == null) { 37 | result = 38 | Bitmap.createBitmap( 39 | source.getWidth(), source.getHeight(), Bitmap.Config.ARGB_8888); 40 | } 41 | 42 | Canvas canvas = new Canvas(result); 43 | Paint paint = new Paint(); 44 | paint.setShader( 45 | new BitmapShader(source, BitmapShader.TileMode.CLAMP, BitmapShader.TileMode.CLAMP)); 46 | paint.setAntiAlias(true); 47 | RectF rectF = new RectF(0f, 0f, source.getWidth(), source.getHeight()); 48 | canvas.drawRoundRect(rectF, radius, radius, paint); 49 | return result; 50 | } 51 | 52 | @Override 53 | public void updateDiskCacheKey(MessageDigest messageDigest) {} 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/io/rong/callkit/util/GlideUtils.java: -------------------------------------------------------------------------------- 1 | package io.rong.callkit.util; 2 | 3 | import android.content.Context; 4 | import android.net.Uri; 5 | import android.util.Log; 6 | import android.widget.ImageView; 7 | import cn.rongcloud.rtc.utils.FinLog; 8 | import com.bumptech.glide.Glide; 9 | import com.bumptech.glide.Priority; 10 | import com.bumptech.glide.request.RequestOptions; 11 | 12 | /** Created by dengxudong on 2018/5/18. */ 13 | public class GlideUtils { 14 | 15 | private static final String TAG = GlideUtils.class.getSimpleName(); 16 | 17 | public static void showBlurTransformation(Context context, ImageView imageView, Uri val) { 18 | if (val == null) { 19 | return; 20 | } 21 | try { 22 | Glide.with(context) 23 | .load(val) 24 | .apply(RequestOptions.bitmapTransform(new GlideBlurformation(context))) 25 | .apply(new RequestOptions().centerCrop()) 26 | .into(imageView); 27 | } catch (Exception e) { 28 | e.printStackTrace(); 29 | FinLog.e(TAG, "Glide Utils Error=" + e.getMessage()); 30 | } catch (NoSuchMethodError noSuchMethodError) { 31 | noSuchMethodError.printStackTrace(); 32 | FinLog.e(TAG, "Glide NoSuchMethodError = " + noSuchMethodError.getMessage()); 33 | } 34 | } 35 | 36 | public static void showPortrait(Context context, ImageView imageView, Uri val) { 37 | RequestOptions requestOptions = new RequestOptions(); 38 | requestOptions 39 | .transform(new GlideBlurformation(context)) 40 | .priority(Priority.HIGH) 41 | .placeholder(io.rong.imkit.R.drawable.rc_default_portrait) 42 | .apply(new RequestOptions().centerCrop()); 43 | if (val == null) { 44 | Log.d(TAG, "showPortrait: val is Null"); 45 | Glide.with(context) 46 | .load(io.rong.imkit.R.drawable.rc_default_portrait) 47 | .apply(requestOptions) 48 | .into(imageView); 49 | } else { 50 | Glide.with(context).load(val).apply(requestOptions).into(imageView); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/io/rong/callkit/util/HeadsetInfo.java: -------------------------------------------------------------------------------- 1 | package io.rong.callkit.util; 2 | 3 | /** Created by Dengxudong on 2018/8/23. */ 4 | public class HeadsetInfo { 5 | private boolean isInsert; 6 | private HeadsetType type; 7 | 8 | public HeadsetInfo(boolean isInsert, HeadsetType type) { 9 | this.isInsert = isInsert; 10 | this.type = type; 11 | } 12 | 13 | public boolean isInsert() { 14 | return isInsert; 15 | } 16 | 17 | public void setInsert(boolean insert) { 18 | isInsert = insert; 19 | } 20 | 21 | public HeadsetType getType() { 22 | return type; 23 | } 24 | 25 | public void setType(HeadsetType type) { 26 | this.type = type; 27 | } 28 | 29 | public enum HeadsetType { 30 | /** 有线耳机 */ 31 | WiredHeadset(0), 32 | /** 蓝牙耳机 */ 33 | BluetoothA2dp(1); 34 | 35 | int value; 36 | 37 | HeadsetType(int value) { 38 | this.value = value; 39 | } 40 | 41 | public int getValue() { 42 | return this.value; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/io/rong/callkit/util/ICallScrollView.java: -------------------------------------------------------------------------------- 1 | package io.rong.callkit.util; 2 | 3 | import android.view.View; 4 | import io.rong.imlib.model.UserInfo; 5 | 6 | /** Created by dengxudong on 2018/5/18. */ 7 | public interface ICallScrollView { 8 | void setScrollViewOverScrollMode(int mode); 9 | 10 | void removeAllChild(); 11 | 12 | void removeChild(String childId); 13 | 14 | View findChildById(String childId); 15 | 16 | void updateChildState(String childId, boolean visible); 17 | 18 | void updateChildState(String childId, String state); 19 | 20 | void setChildPortraitSize(int size); 21 | 22 | void enableShowState(boolean enable); 23 | 24 | void addChild(String childId, UserInfo userInfo); 25 | 26 | void addChild(String childId, UserInfo userInfo, String state); 27 | 28 | void updateChildInfo(String childId, UserInfo userInfo); 29 | 30 | int dip2pix(int dipValue); 31 | 32 | View getChildAtIndex(int index); 33 | 34 | int getChildrenSpace(); 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/io/rong/callkit/util/IncomingCallExtraHandleUtil.java: -------------------------------------------------------------------------------- 1 | package io.rong.callkit.util; 2 | 3 | import android.app.NotificationManager; 4 | import android.content.Context; 5 | import io.rong.callkit.CallFloatBoxView; 6 | import io.rong.callkit.VoIPBroadcastReceiver; 7 | import io.rong.calllib.RongCallSession; 8 | import io.rong.push.notification.RongNotificationInterface; 9 | 10 | /** 适配 Android 10 以上不允许后台启动 Activity 的工具类 */ 11 | public class IncomingCallExtraHandleUtil { 12 | public static int VOIP_NOTIFICATION_ID = 3000; // VoIP类型的通知消息。 13 | public static final int VOIP_REQUEST_CODE = 30001; 14 | 15 | private static RongCallSession cachedCallSession = null; 16 | private static boolean checkPermissions = false; 17 | 18 | public static void removeNotification(Context context) { 19 | RongNotificationInterface.removeNotification(context, VOIP_NOTIFICATION_ID); 20 | removeAllPushServiceNotification(context); 21 | VoIPBroadcastReceiver.clearNotificationCache(); 22 | } 23 | 24 | public static void removeAllPushServiceNotification(Context context) { 25 | NotificationManager nm = 26 | (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); 27 | for (int i = VOIP_NOTIFICATION_ID; i >= 3000; i--) { 28 | nm.cancel(i); 29 | } 30 | VOIP_NOTIFICATION_ID = 3000; 31 | } 32 | 33 | public static RongCallSession getCallSession() { 34 | return cachedCallSession; 35 | } 36 | 37 | public static void cacheCallSession(RongCallSession callSession, boolean permissions) { 38 | cachedCallSession = callSession; 39 | checkPermissions = permissions; 40 | } 41 | 42 | public static boolean isCheckPermissions() { 43 | return checkPermissions; 44 | } 45 | 46 | public static void clear() { 47 | cachedCallSession = null; 48 | checkPermissions = false; 49 | } 50 | 51 | public static boolean needNotify() { 52 | return cachedCallSession != null && !CallFloatBoxView.isCallFloatBoxShown(); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/io/rong/callkit/util/RTCPhoneStateReceiver.java: -------------------------------------------------------------------------------- 1 | package io.rong.callkit.util; 2 | 3 | import android.content.BroadcastReceiver; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | import android.telephony.TelephonyManager; 7 | import android.text.TextUtils; 8 | import android.util.Log; 9 | import io.rong.calllib.RongCallClient; 10 | import io.rong.calllib.RongCallSession; 11 | 12 | public class RTCPhoneStateReceiver extends BroadcastReceiver { 13 | 14 | private static final String TAG = "RTCPhoneStateReceiver"; 15 | // 21以上会回调两次(状态值一样) 16 | private static String twice = ""; 17 | private TelephonyManager mTelephonyManager; 18 | 19 | public int getCallState(Context context) { 20 | if (context == null) { 21 | return -1; 22 | } 23 | 24 | if (mTelephonyManager == null) { 25 | mTelephonyManager = 26 | (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); 27 | } 28 | return mTelephonyManager.getCallState(); 29 | } 30 | 31 | @Override 32 | public void onReceive(Context context, Intent intent) { 33 | String action = intent.getAction(); 34 | if (!("android.intent.action.PHONE_STATE").equals(action)) { 35 | Log.i(TAG, "action :" + action); 36 | return; 37 | } 38 | 39 | String state = intent.getStringExtra(TelephonyManager.EXTRA_STATE); 40 | 41 | if (TextUtils.isEmpty(state) && TextUtils.isEmpty(twice)) { 42 | int callState = getCallState(context); 43 | if (TelephonyManager.CALL_STATE_OFFHOOK == callState) { 44 | state = TelephonyManager.EXTRA_STATE_OFFHOOK; 45 | } else if (TelephonyManager.CALL_STATE_RINGING == callState) { 46 | state = TelephonyManager.EXTRA_STATE_RINGING; 47 | } else if (TelephonyManager.CALL_STATE_IDLE == callState) { 48 | state = TelephonyManager.EXTRA_STATE_IDLE; 49 | } 50 | } 51 | 52 | Log.i(TAG, "state : " + state + " , twice : " + twice); 53 | 54 | if (!TextUtils.isEmpty(state) && !twice.equals(state)) { 55 | twice = state; 56 | 57 | if (RongCallClient.getInstance() == null) { 58 | Log.e(TAG, "RongCallClient is empty"); 59 | return; 60 | } 61 | 62 | RongCallSession callSession = RongCallClient.getInstance().getCallSession(); 63 | if (callSession == null) { 64 | Log.e(TAG, "callSession is empty"); 65 | return; 66 | } 67 | 68 | if (twice.equals(TelephonyManager.EXTRA_STATE_OFFHOOK)) { 69 | // ON_PHONE; 70 | RongCallClient.getInstance().hangUpCall(); 71 | } else if (twice.equals(TelephonyManager.EXTRA_STATE_IDLE)) { 72 | // ON_PHONE_ENDED; 73 | } 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/main/java/io/rong/callkit/util/RingingMode.java: -------------------------------------------------------------------------------- 1 | package io.rong.callkit.util; 2 | 3 | public enum RingingMode { 4 | Incoming(0), 5 | Outgoing(1), 6 | Incoming_Custom(2); 7 | 8 | private int val; 9 | 10 | RingingMode(int val) { 11 | this.val = val; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/io/rong/callkit/util/SPUtils.java: -------------------------------------------------------------------------------- 1 | package io.rong.callkit.util; 2 | 3 | import android.content.Context; 4 | import android.content.SharedPreferences; 5 | import java.lang.reflect.InvocationTargetException; 6 | import java.lang.reflect.Method; 7 | import java.util.Date; 8 | import java.util.Map; 9 | 10 | /** 11 | * @author dengxudong 12 | * @version $Rev$ 13 | */ 14 | public class SPUtils { 15 | public SPUtils() { 16 | /* cannot be instantiated */ 17 | throw new UnsupportedOperationException("cannot be instantiated"); 18 | } 19 | 20 | /** 保存在手机里面的文件名 */ 21 | public static final String FILE_NAME = "doudou"; 22 | 23 | /** 保存当前时间 */ 24 | public static void putDataAndTime(Context context, String key) { 25 | SharedPreferences sp = context.getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE); 26 | SharedPreferences.Editor editor = sp.edit(); 27 | Date nowdate = new Date(); 28 | long timeData = nowdate.getTime(); 29 | editor.putLong(key, timeData); 30 | SharedPreferencesCompat.apply(editor); 31 | } 32 | 33 | /** 34 | * 保存数据的方法,我们需要拿到保存数据的具体类型,然后根据类型调用不同的保存方法 35 | * 36 | * @param context 37 | * @param key 38 | * @param object 39 | */ 40 | public static void put(Context context, String key, Object object) { 41 | SharedPreferences sp = context.getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE); 42 | SharedPreferences.Editor editor = sp.edit(); 43 | 44 | if (object instanceof String) { 45 | editor.putString(key, (String) object); 46 | } else if (object instanceof Integer) { 47 | editor.putInt(key, (Integer) object); 48 | } else if (object instanceof Boolean) { 49 | editor.putBoolean(key, (Boolean) object); 50 | } else if (object instanceof Float) { 51 | editor.putFloat(key, (Float) object); 52 | } else if (object instanceof Long) { 53 | editor.putLong(key, (Long) object); 54 | } else { 55 | editor.putString(key, object.toString()); 56 | } 57 | SharedPreferencesCompat.apply(editor); 58 | } 59 | 60 | /** 61 | * 得到保存数据的方法,我们根据默认值得到保存的数据的具体类型,然后调用相对于的方法获取值 62 | * 63 | * @param context 64 | * @param key 65 | * @param defaultObject 66 | * @return 67 | */ 68 | public static Object get(Context context, String key, Object defaultObject) { 69 | SharedPreferences sp = context.getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE); 70 | 71 | if (defaultObject instanceof String) { 72 | return sp.getString(key, (String) defaultObject); 73 | } else if (defaultObject instanceof Integer) { 74 | return sp.getInt(key, (Integer) defaultObject); 75 | } else if (defaultObject instanceof Boolean) { 76 | return sp.getBoolean(key, (Boolean) defaultObject); 77 | } else if (defaultObject instanceof Float) { 78 | return sp.getFloat(key, (Float) defaultObject); 79 | } else if (defaultObject instanceof Long) { 80 | return sp.getLong(key, (Long) defaultObject); 81 | } 82 | 83 | return null; 84 | } 85 | 86 | /** 87 | * 移除某个key值已经对应的值 88 | * 89 | * @param context 90 | * @param key 91 | */ 92 | public static void remove(Context context, String key) { 93 | SharedPreferences sp = context.getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE); 94 | SharedPreferences.Editor editor = sp.edit(); 95 | editor.remove(key); 96 | SharedPreferencesCompat.apply(editor); 97 | } 98 | 99 | /** 100 | * 清除所有数据 101 | * 102 | * @param context 103 | */ 104 | public static void clear(Context context) { 105 | SharedPreferences sp = context.getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE); 106 | SharedPreferences.Editor editor = sp.edit(); 107 | editor.clear(); 108 | SharedPreferencesCompat.apply(editor); 109 | } 110 | 111 | /** 112 | * 查询某个key是否已经存在 113 | * 114 | * @param context 115 | * @param key 116 | * @return 117 | */ 118 | public static boolean contains(Context context, String key) { 119 | SharedPreferences sp = context.getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE); 120 | return sp.contains(key); 121 | } 122 | 123 | /** 124 | * 返回所有的键值对 125 | * 126 | * @param context 127 | * @return 128 | */ 129 | public static Map getAll(Context context) { 130 | SharedPreferences sp = context.getSharedPreferences(FILE_NAME, Context.MODE_PRIVATE); 131 | return sp.getAll(); 132 | } 133 | 134 | /** 135 | * 创建一个解决SharedPreferencesCompat.apply方法的一个兼容类 136 | * 137 | * @author zhy 138 | */ 139 | private static class SharedPreferencesCompat { 140 | private static final Method sApplyMethod = findApplyMethod(); 141 | 142 | /** 143 | * 反射查找apply的方法 144 | * 145 | * @return 146 | */ 147 | @SuppressWarnings({"unchecked", "rawtypes"}) 148 | private static Method findApplyMethod() { 149 | try { 150 | Class clz = SharedPreferences.Editor.class; 151 | return clz.getMethod("apply"); 152 | } catch (NoSuchMethodException e) { 153 | } 154 | return null; 155 | } 156 | 157 | /** 158 | * 如果找到则使用apply执行,否则使用commit 159 | * 160 | * @param editor 161 | */ 162 | public static void apply(SharedPreferences.Editor editor) { 163 | try { 164 | if (sApplyMethod != null) { 165 | sApplyMethod.invoke(editor); 166 | return; 167 | } 168 | } catch (IllegalArgumentException e) { 169 | } catch (IllegalAccessException e) { 170 | } catch (InvocationTargetException e) { 171 | } 172 | editor.commit(); 173 | } 174 | } 175 | } 176 | -------------------------------------------------------------------------------- /src/main/java/io/rong/callkit/util/UserProfileOrderManager.java: -------------------------------------------------------------------------------- 1 | package io.rong.callkit.util; 2 | 3 | import android.text.TextUtils; 4 | import android.util.Log; 5 | import io.rong.calllib.CallUserProfile; 6 | import io.rong.calllib.RongCallClient; 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | 10 | public final class UserProfileOrderManager { 11 | 12 | private static final String TAG = "UserProfileOrderManager"; 13 | private final ArrayList userIds; 14 | 15 | public UserProfileOrderManager() { 16 | this.userIds = new ArrayList<>(); 17 | } 18 | 19 | public UserProfileOrderManager(ArrayList value) { 20 | this.userIds = new ArrayList<>(); 21 | if (value != null && !value.isEmpty()) { 22 | this.userIds.addAll(value); 23 | } 24 | ArrayList userIdsTmp = new ArrayList<>(); 25 | if (RongCallClient.getInstance() != null 26 | && RongCallClient.getInstance().getCallSession() != null) { 27 | if (RongCallClient.getInstance().getCallSession().getParticipantProfileList() != null) { 28 | for (CallUserProfile userProfile : 29 | RongCallClient.getInstance().getCallSession().getParticipantProfileList()) { 30 | if (!this.userIds.contains(userProfile.getUserId())) { 31 | Log.e(TAG, "userIdsTmp.add : " + userProfile.getUserId()); 32 | userIdsTmp.add(userProfile.getUserId()); 33 | } 34 | } 35 | } 36 | } 37 | if (!userIdsTmp.isEmpty()) { 38 | this.userIds.addAll(userIdsTmp); 39 | } 40 | } 41 | 42 | public List getSortedProfileList( 43 | List participantProfileList) { 44 | if (this.userIds.isEmpty()) { 45 | // Log.e(TAG, "-------getSortedProfileList--->isEmpty"); 46 | for (CallUserProfile userProfile : participantProfileList) { 47 | this.userIds.add(userProfile.getUserId()); 48 | } 49 | return participantProfileList; 50 | } else { 51 | List callUserProfileList = new ArrayList<>(this.userIds.size()); 52 | for (String userId : this.userIds) { 53 | // Log.e(TAG, 54 | // "-------getSortedProfileList--->userId : "+userId); 55 | for (CallUserProfile callUserProfile : participantProfileList) { 56 | if (TextUtils.equals(userId, callUserProfile.getUserId())) { 57 | callUserProfileList.add(callUserProfile); 58 | } 59 | } 60 | } 61 | return callUserProfileList; 62 | } 63 | } 64 | 65 | public ArrayList getUserIds() { 66 | // Log.d(TAG, "------getUserIds.start"); 67 | // if (userIds != null && userIds.size() >= 0) { 68 | // for (String userId : userIds) { 69 | // Log.d(TAG, "getUserIds.id: " + userId); 70 | // } 71 | // } 72 | return userIds; 73 | } 74 | 75 | public void exchange(String fromUserId, String toUserId) { 76 | int fromUserIdIndex = -1, toUserIdIndex = -1; 77 | for (int i = 0; i < this.userIds.size(); i++) { 78 | if (TextUtils.equals(userIds.get(i), fromUserId)) { 79 | fromUserIdIndex = i; 80 | } 81 | 82 | if (TextUtils.equals(userIds.get(i), toUserId)) { 83 | toUserIdIndex = i; 84 | } 85 | } 86 | 87 | if (fromUserIdIndex != -1) { 88 | try { 89 | userIds.set(fromUserIdIndex, toUserId); 90 | } catch (Exception e) { 91 | e.printStackTrace(); 92 | } 93 | } 94 | 95 | if (toUserIdIndex != -1) { 96 | try { 97 | userIds.set(toUserIdIndex, fromUserId); 98 | } catch (Exception e) { 99 | e.printStackTrace(); 100 | } 101 | } 102 | 103 | // Log.e(TAG, "-----exchange----fromUserId : "+fromUserId + ", fromUserIdIndex : 104 | // "+fromUserIdIndex + " , toUserId : "+toUserId +" ,toUserIdIndex : " +toUserIdIndex); 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /src/main/java/io/rong/callkit/util/permission/OSUtils.java: -------------------------------------------------------------------------------- 1 | package io.rong.callkit.util.permission; 2 | 3 | import android.os.Build; 4 | import android.text.TextUtils; 5 | import java.io.BufferedReader; 6 | import java.io.IOException; 7 | import java.io.InputStreamReader; 8 | 9 | /** Created by Android Studio. User: lvhongzhen Date: 2019-08-15 Time: 01:49 */ 10 | public class OSUtils { 11 | 12 | public static final String ROM_MIUI = "MIUI"; 13 | public static final String ROM_EMUI = "EMUI"; 14 | public static final String ROM_FLYME = "FLYME"; 15 | public static final String ROM_OPPO = "OPPO"; 16 | public static final String ROM_SMARTISAN = "SMARTISAN"; 17 | public static final String ROM_VIVO = "VIVO"; 18 | public static final String ROM_QIKU = "QIKU"; 19 | 20 | private static final String KEY_VERSION_MIUI = "ro.miui.ui.version.name"; 21 | private static final String KEY_VERSION_EMUI = "ro.build.version.emui"; 22 | private static final String KEY_VERSION_OPPO = "ro.build.version.opporom"; 23 | private static final String KEY_VERSION_SMARTISAN = "ro.smartisan.version"; 24 | private static final String KEY_VERSION_VIVO = "ro.vivo.os.version"; 25 | 26 | private static String sName; 27 | private static String sVersion; 28 | 29 | public static boolean isEmui() { 30 | return check(ROM_EMUI); 31 | } 32 | 33 | public static boolean isMiui() { 34 | return check(ROM_MIUI); 35 | } 36 | 37 | public static boolean isVivo() { 38 | return check(ROM_VIVO); 39 | } 40 | 41 | public static boolean isOppo() { 42 | return check(ROM_OPPO); 43 | } 44 | 45 | public static boolean isFlyme() { 46 | return check(ROM_FLYME); 47 | } 48 | 49 | public static boolean is360() { 50 | return check(ROM_QIKU) || check("360"); 51 | } 52 | 53 | public static boolean isSmartisan() { 54 | return check(ROM_SMARTISAN); 55 | } 56 | 57 | public static String getName() { 58 | if (sName == null) { 59 | check(""); 60 | } 61 | return sName; 62 | } 63 | 64 | public static String getVersion() { 65 | if (sVersion == null) { 66 | check(""); 67 | } 68 | return sVersion; 69 | } 70 | 71 | public static boolean check(String rom) { 72 | if (sName != null) { 73 | return sName.equals(rom); 74 | } 75 | 76 | if (!TextUtils.isEmpty(sVersion = getProp(KEY_VERSION_MIUI))) { 77 | sName = ROM_MIUI; 78 | } else if (!TextUtils.isEmpty(sVersion = getProp(KEY_VERSION_EMUI))) { 79 | sName = ROM_EMUI; 80 | } else if (!TextUtils.isEmpty(sVersion = getProp(KEY_VERSION_OPPO))) { 81 | sName = ROM_OPPO; 82 | } else if (!TextUtils.isEmpty(sVersion = getProp(KEY_VERSION_VIVO))) { 83 | sName = ROM_VIVO; 84 | } else if (!TextUtils.isEmpty(sVersion = getProp(KEY_VERSION_SMARTISAN))) { 85 | sName = ROM_SMARTISAN; 86 | } else { 87 | sVersion = Build.DISPLAY; 88 | if (sVersion.toUpperCase().contains(ROM_FLYME)) { 89 | sName = ROM_FLYME; 90 | } else { 91 | sVersion = Build.UNKNOWN; 92 | sName = Build.MANUFACTURER.toUpperCase(); 93 | } 94 | } 95 | return sName.equals(rom); 96 | } 97 | 98 | public static String getProp(String name) { 99 | String line = null; 100 | BufferedReader input = null; 101 | try { 102 | Process p = Runtime.getRuntime().exec("getprop " + name); 103 | input = new BufferedReader(new InputStreamReader(p.getInputStream()), 1024); 104 | line = input.readLine(); 105 | input.close(); 106 | } catch (IOException ex) { 107 | return null; 108 | } finally { 109 | if (input != null) { 110 | try { 111 | input.close(); 112 | } catch (IOException e) { 113 | e.printStackTrace(); 114 | } 115 | } 116 | } 117 | return line; 118 | } 119 | } 120 | -------------------------------------------------------------------------------- /src/main/java/io/rong/callkit/util/permission/PermissionShowDetail.java: -------------------------------------------------------------------------------- 1 | package io.rong.callkit.util.permission; 2 | 3 | import android.content.Context; 4 | import android.content.Intent; 5 | import android.net.Uri; 6 | import android.os.Build; 7 | import android.provider.Settings; 8 | 9 | public class PermissionShowDetail { 10 | private static final String VIVO = "vivo"; 11 | 12 | public static void showPermissionDetail(Context context) { 13 | String manufacturer = Build.MANUFACTURER.toLowerCase(); 14 | switch (manufacturer) { 15 | case VIVO: 16 | openVIVODetail(context); 17 | break; 18 | default: 19 | defaultToDetail(context); 20 | break; 21 | } 22 | } 23 | 24 | private static void defaultToDetail(Context context) { 25 | try { 26 | Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); 27 | intent.setPackage(context.getPackageName()); 28 | Uri uri = Uri.fromParts("package", context.getPackageName(), null); 29 | intent.setData(uri); 30 | context.startActivity(intent); 31 | } catch (Exception e) { 32 | Intent intent = new Intent(Settings.ACTION_SETTINGS); 33 | context.startActivity(intent); 34 | } 35 | } 36 | 37 | private static void openVIVODetail(Context context) { 38 | Intent localIntent; 39 | if (((Build.MODEL.contains("Y85")) && (!Build.MODEL.contains("Y85A"))) 40 | || (Build.MODEL.contains("vivo Y53L"))) { 41 | localIntent = new Intent(); 42 | localIntent.setClassName( 43 | "com.vivo.permissionmanager", 44 | "com.vivo.permissionmanager.activity.PurviewTabActivity"); 45 | localIntent.putExtra("packagename", context.getPackageName()); 46 | localIntent.putExtra("tabId", "1"); 47 | context.startActivity(localIntent); 48 | } else { 49 | localIntent = new Intent(); 50 | localIntent.setClassName( 51 | "com.vivo.permissionmanager", 52 | "com.vivo.permissionmanager.activity.SoftPermissionDetailActivity"); 53 | localIntent.setAction("secure.intent.action.softPermissionDetail"); 54 | localIntent.putExtra("packagename", context.getPackageName()); 55 | context.startActivity(localIntent); 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/res/anim/rc_voip_dialog_slide_in_bottom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/main/res/anim/rc_voip_dialog_slide_out_bottom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/main/res/anim/rc_voip_slide_in_right.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/main/res/anim/rc_voip_slide_out_right.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /src/main/res/drawable-ldrtl-xhdpi/callkit_ic_nav_back_x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-ldrtl-xhdpi/callkit_ic_nav_back_x.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/callkit_ic_nav_back_x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/callkit_ic_nav_back_x.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/callkit_ic_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/callkit_ic_search.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/callkit_ic_search_delete_x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/callkit_ic_search_delete_x.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/callkit_ic_search_focused_x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/callkit_ic_search_focused_x.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/callkit_ic_search_x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/callkit_ic_search_x.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/callkit_mult_video_user_clo_camera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/callkit_mult_video_user_clo_camera.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/callkit_mult_video_user_mute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/callkit_mult_video_user_mute.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/callkit_mult_video_user_status.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/callkit_mult_video_user_status.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/callkit_mute_unavailable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/callkit_mute_unavailable.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/callkit_select_ic_nav_back_x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/callkit_select_ic_nav_back_x.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_ic_phone_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_ic_phone_normal.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_ic_phone_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_ic_phone_pressed.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_add.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_audio_answer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_audio_answer.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_audio_answer_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_audio_answer_hover.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_audio_left_cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_audio_left_cancel.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_audio_left_connected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_audio_left_connected.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_audio_right_cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_audio_right_cancel.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_audio_right_connected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_audio_right_connected.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_camera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_camera.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_camera_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_camera_hover.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_disable_camera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_disable_camera.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_disable_camera_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_disable_camera_hover.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_float_audio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_float_audio.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_float_video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_float_video.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_handfree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_handfree.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_handfree_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_handfree_hover.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_handup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_handup.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_hang_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_hang_up.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_hang_up_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_hang_up_hover.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_icon_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_icon_add.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_icon_camera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_icon_camera.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_icon_checkbox_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_icon_checkbox_checked.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_icon_checkbox_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_icon_checkbox_hover.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_icon_checkbox_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_icon_checkbox_normal.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_icon_input_video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_icon_input_video.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_icon_input_video_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_icon_input_video_pressed.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_iphone.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_iphone_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_iphone_hover.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_menu_bg.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_menu_bg.9.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_minimize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_minimize.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_more.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_mute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_mute.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_mute_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_mute_hover.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_notification_answer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_notification_answer.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_notification_hangup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_notification_hangup.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_phone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_phone.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_signal_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_signal_1.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_signal_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_signal_2.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_signal_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_signal_3.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_signal_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_signal_4.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_signal_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_signal_5.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_signal_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_signal_6.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_single_audio_answer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_single_audio_answer.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_single_audio_answer_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_single_audio_answer_hover.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_switch_camera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_switch_camera.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_video_answer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_video_answer.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_video_answer_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_video_answer_hover.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_video_answer_hover_new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_video_answer_hover_new.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_video_answer_new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_video_answer_new.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_video_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_video_left.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_video_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_video_right.png -------------------------------------------------------------------------------- /src/main/res/drawable-xhdpi/rc_voip_whiteboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rongcloud/callkit-android/52386a25ba70984c275a315c2388fce0c5f0feed/src/main/res/drawable-xhdpi/rc_voip_whiteboard.png -------------------------------------------------------------------------------- /src/main/res/drawable/bg_search.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/res/drawable/callkit_multiaudiouesrinfocontners.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/res/drawable/callkit_selector_icon_search.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/main/res/drawable/callkit_voip_iphone.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/main/res/drawable/rc_ic_phone_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/main/res/drawable/rc_ic_video_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/main/res/drawable/rc_voip_asr_setting_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/main/res/drawable/rc_voip_audio_answer_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/rc_voip_audio_answer_selector_new.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/rc_voip_back.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/main/res/drawable/rc_voip_camera_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/main/res/drawable/rc_voip_check_icon.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/rc_voip_checkbox.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/main/res/drawable/rc_voip_close_black.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/rc_voip_dialog_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/main/res/drawable/rc_voip_dialog_cancel_btn_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/main/res/drawable/rc_voip_disable_camera_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/main/res/drawable/rc_voip_float_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/main/res/drawable/rc_voip_hangup_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/rc_voip_item_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/main/res/drawable/rc_voip_mute_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/main/res/drawable/rc_voip_right_arrows.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/main/res/drawable/rc_voip_speaker_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/main/res/drawable/rc_voip_subtitle_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/res/drawable/rc_voip_subtitle_start.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/main/res/drawable/rc_voip_subtitle_stop.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/rc_voip_switch_thumb.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/main/res/drawable/rc_voip_switch_track.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/res/drawable/rc_voip_vedio_answer_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/rc_voip_vedio_answer_selector_new.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/res/drawable/rc_voip_white_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/main/res/layout/activity_call_select_member2.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 18 | 26 | 27 | 31 | 32 | 36 | 37 | 45 | 46 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/main/res/layout/callkit_actionbar_option_text_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 22 | 23 | 31 | 32 | 40 | 41 | 49 | 50 | 51 | 64 | 65 | 79 | -------------------------------------------------------------------------------- /src/main/res/layout/callkit_conference_search_top_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 | 22 | 23 | 31 | 32 | -------------------------------------------------------------------------------- /src/main/res/layout/callkit_multivideo_gaussianblur.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/main/res/layout/callkit_rc_voip_activity_select_member.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 13 | 14 | 25 | 26 | 27 | 38 | 39 | 48 | 49 | 50 | 51 | 54 | 55 | 59 | 60 | 73 | 74 | 75 | 76 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /src/main/res/layout/callkit_rc_voip_activity_select_member_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 25 | 26 | 27 | 39 | 40 | 49 | 50 | 51 | 52 | 57 | 58 | 62 | 63 | 76 | 77 | 78 | 79 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /src/main/res/layout/callkit_view_search_bar_layout.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 18 | 19 | 28 | 29 | 46 | 47 | 53 | -------------------------------------------------------------------------------- /src/main/res/layout/dialog_translation_display.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 16 | 17 | 25 | 26 | 27 | 34 | 35 | 36 | 37 | 38 |