Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Callkit v3.0.0 #56

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
0ad4aa8
iOS 呼叫组件 IM V10 版本
Nov 12, 2024
aefc66f
Merge pull request #43 from allday2010/im_v10
liuqijun Nov 12, 2024
fca1339
Merge branch 'netease-kit:callkit_v3.0.0' into callkit_v3.0.0
wuleihenbang Nov 13, 2024
4b2ce3b
Merge pull request #44 from wuleihenbang/master
liuqijun Nov 13, 2024
0afb1c6
Merge branch 'netease-kit:callkit_v3.0.0' into callkit_v3.0.0
wuleihenbang Dec 4, 2024
639bc04
feat: 1、通知频道优化;2、移除影响Google play审核的setFullScreenIntent;3、权限提醒窗ui优化
wuleihenbang Dec 4, 2024
047e34e
Merge pull request #47 from wuleihenbang/callkit_v3.0.0
chandarlee Dec 4, 2024
7c8ec37
feat: 权限提醒窗ui优化
wuleihenbang Dec 4, 2024
dd1dd90
Merge pull request #48 from wuleihenbang/callkit_v3.0.0
chandarlee Dec 4, 2024
727ccf0
feat: 升级呼叫组件到3.2.0
wulei05 Dec 31, 2024
f02fc54
Merge pull request #49 from wuleihenbang/callkit_v3.0.0
chandarlee Dec 31, 2024
228ad5e
feat: 更新到呼叫组件3.2.0
wulei05 Jan 2, 2025
e607d18
Merge pull request #50 from wuleihenbang/callkit_v3.0.0
chandarlee Jan 2, 2025
562a626
feat: iOS:rtcInfo 新增 `cid` 参数,表示音视频会话的 cid ;支持 XCFramework 框架格式;Andro…
wulei05 Jan 23, 2025
d93c2e3
feat: iOS:rtcInfo 新增 `cid` 参数,表示音视频会话的 cid ;支持 XCFramework 框架格式;Andro…
wulei05 Jan 23, 2025
ccdb73c
Merge pull request #54 from wuleihenbang/callkit_v3.0.0
allday2010 Jan 23, 2025
cc3d3f6
Merge branch 'main' of github.com:netease-kit/NEVideoCall-1to1 into c…
wulei05 Mar 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NLiteAVDemo-Android-Java/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

<!-- 蓝牙-->
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,44 +1,114 @@
// Copyright (c) 2022 NetEase, Inc. All rights reserved.
// Use of this source code is governed by a MIT license that can be
// found in the LICENSE file.

package com.netease.yunxin.app.videocall;

import android.app.Application;
import android.text.TextUtils;

import android.content.Intent;
import com.netease.nimlib.sdk.NIMClient;
import com.netease.nimlib.sdk.SDKOptions;
import com.netease.nimlib.sdk.auth.LoginInfo;
import com.netease.nimlib.sdk.util.NIMUtil;
import com.netease.yunxin.app.videocall.login.model.ProfileManager;
import com.netease.yunxin.app.videocall.login.model.UserModel;
import com.netease.yunxin.app.videocall.nertc.ui.CallModeType;
import com.netease.yunxin.app.videocall.nertc.ui.NERTCSelectCallUserActivity;
import com.netease.yunxin.app.videocall.nertc.ui.SettingActivity;
import com.netease.yunxin.nertc.nertcvideocall.utils.NetworkUtils;
import com.netease.yunxin.nertc.ui.CallKitUI;
import com.netease.yunxin.nertc.ui.CallKitUIOptions;
import com.netease.yunxin.nertc.ui.NECallUILanguage;
import com.netease.yunxin.nertc.ui.base.TransHelper;

import java.util.ArrayList;

public class DemoApplication extends Application {
public static DemoApplication app;
private static final int CODE_REQUEST_INVITE_USERS = 9101;
public static DemoApplication app;

@Override
public void onCreate() {
super.onCreate();
if (NIMUtil.isMainProcess(this)) {
NetworkUtils.init(this);
app = this;
}
NIMClient.init(this, loginInfo(), options());
@Override
public void onCreate() {
super.onCreate();
if (NIMUtil.isMainProcess(this)) {
app = this;
}

// 如果返回值为 null,则全部使用默认参数。
private SDKOptions options() {
SDKOptions options = new SDKOptions();
//此处仅设置appkey,其他设置请自行参看信令文档设置 :https://dev.yunxin.163.com/docs/product/信令/SDK开发集成/Android开发集成/初始化
options.appKey = BuildConfig.APP_KEY;
return options;
NIMClient.initV2(this, options());
if (NIMUtil.isMainProcess(this)) {
NetworkUtils.init(this);
// 预收到离线消息时需在 IM 初始化后立即注册群组
CallKitUI.preGroupConfig();
initCallKit();
}
}

// 如果已经存在用户登录信息,返回LoginInfo,否则返回null即可
private LoginInfo loginInfo() {
UserModel userModel = ProfileManager.getInstance().getUserModel();
if (userModel != null && !TextUtils.isEmpty(userModel.imToken) && !TextUtils.isEmpty(userModel.imAccid)) {
return new LoginInfo(String.valueOf(userModel.imAccid), userModel.imToken);
}
return null;
}
// 如果返回值为 null,则全部使用默认参数。
private SDKOptions options() {
SDKOptions options = new SDKOptions();
//此处仅设置appkey,其他设置请自行参看信令文档设置 :https://dev.yunxin.163.com/docs/product/信令/SDK开发集成/Android开发集成/初始化
options.appKey = BuildConfig.APP_KEY;
return options;
}

private void initCallKit() {
// 预收到离线消息时需在 IM 初始化后立即注册群组
CallKitUI.preGroupConfig();
CallKitUIOptions options =
new CallKitUIOptions.Builder()
// 音视频通话 sdk appKey,用于通话中使用
.rtcAppKey(BuildConfig.APP_KEY)
.currentUserRtcUId(SettingActivity.RTC_CHANNEL_UID)
// 通话接听成功的超时时间单位 毫秒,默认30s
.timeOutMillisecond(30 * 1000L)
// 当系统版本为 Android Q及以上时,若应用在后台系统限制不直接展示页面
// 而是展示 notification,通过点击 notification 跳转呼叫页面
// 此处为 notification 相关配置,如图标,提示语等。
.notificationConfigFetcher(new DemoSelfNotificationConfigFetcher<>())
.notificationConfigFetcherForGroup(new DemoSelfNotificationConfigFetcher<>())
// 收到被叫时若 app 在后台,在恢复到前台时是否自动唤起被叫页面,默认为 true
.resumeBGInvitation(true)
.enableGroup(true)
.enableAutoJoinWhenCalled(SettingActivity.ENABLE_AUTO_JOIN)
// 设置用户信息
.userInfoHelper(new SelfUserInfoHelper())
// rtc 初始化模式
.initRtcMode(SettingActivity.RTC_INIT_MODE)
// 注册自定义通话页面
.p2pVideoActivity(TestActivity.class)
.p2pAudioActivity(TestActivity.class)
// 主叫加入 rtc 的时机
.joinRtcWhenCall(SettingActivity.ENABLE_JOIN_RTC_WHEN_CALL)
.contactSelector(
(context, groupId, strings, listNEResultObserver) -> {
if (listNEResultObserver == null) {
return null;
}
TransHelper.launchTask(
context,
CODE_REQUEST_INVITE_USERS,
(innerContext, code) -> {
NERTCSelectCallUserActivity.startSelectUser(
innerContext,
CODE_REQUEST_INVITE_USERS,
CallModeType.RTC_GROUP_INVITE,
strings);
return null;
},
intentResultInfo -> {
if (intentResultInfo == null || intentResultInfo.getValue() == null) {
return null;
}
Intent data = intentResultInfo.getValue();
if (intentResultInfo.getSuccess()) {
ArrayList<String> selectorList =
data.getStringArrayListExtra(
NERTCSelectCallUserActivity.KEY_CALL_USER_LIST);
listNEResultObserver.onResult(selectorList);
}
return null;
});
return null;
})
.language(NECallUILanguage.AUTO)
.build();
// 初始化
CallKitUI.init(getApplicationContext(), options);
}
}
Loading