在 android 中,我可以创建一个模拟器android create avd以及我想要的所有属性。有没有办法通过命令在 MacOs/Xcode 中做到这一点,或者我只能解决 xcode 提供的内置模拟器?如果没有,有没有办法在 MACOs 中多次启动模拟器?
背景是自动化测试和按需构建环境。更明确地说:需要一组设备(模拟器/模拟器)来并行运行测试。所以我需要知道是否有办法让多个模拟器运行我需要的任何实例。因此,当我想测试“iPhone 6”时,我需要有 10 个实例来并行运行我的测试,以便在敏捷持续交付背景下获得快速反馈。
我没有在互联网上找到任何东西,所以我想答案是否定的。
编辑:至少在投反对票时发表评论会很好
我想通过 connectionservice 使用系统应用程序实现视频聊天。 https://developer.android.com/reference/android/telecom/ConnectionService.html。不幸的是,我找不到任何示例或教程如何做到这一点。这是我所做的:
注册服务:
TelecomManager manager = (TelecomManager) getSystemService(TELECOM_SERVICE);
PhoneAccountHandle phoneAccountHandle = new PhoneAccountHandle(new ComponentName(getBaseContext().getPackageName(), PhoneConnectionService.class.getName()), "myConnectionServiceId");
PhoneAccount.Builder builder = PhoneAccount.builder(phoneAccountHandle, Localization.localize(R.string.IDS_APP_NAME_SHORT));
builder.setCapabilities(PhoneAccount.CAPABILITY_CALL_PROVIDER | PhoneAccount.CAPABILITY_CONNECTION_MANAGER| PhoneAccount.CAPABILITY_VIDEO_CALLING );
PhoneAccount phoneAccount = builder.build();
manager.registerPhoneAccount(phoneAccount);
Run Code Online (Sandbox Code Playgroud)
拨打电话:
TelecomManager manager = (TelecomManager) context.getSystemService(TELECOM_SERVICE);
PhoneAccountHandle phoneAccountHandle = new PhoneAccountHandle(new ComponentName(context.getPackageName(), PhoneConnectionService.class.getName()), "estosConnectionServiceId");
Bundle test = new Bundle();
test.putParcelable(TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE,phoneAccountHandle);
test.putInt(TelecomManager.EXTRA_START_CALL_WITH_VIDEO_STATE, VideoProfile.STATE_BIDIRECTIONAL);
test.putParcelable(TelecomManager.EXTRA_OUTGOING_CALL_EXTRAS,extras);
manager.placeCall(Uri.parse("tel:" + number),test);
Run Code Online (Sandbox Code Playgroud)
我的 ConnectionService 被调用并
@Override
public Connection onCreateOutgoingConnection(PhoneAccountHandle connectionManagerPhoneAccount, ConnectionRequest request) {
Connection conn = new MyAndroidCallConnection();
conn.setAddress(request.getAddress(),PRESENTATION_ALLOWED);
conn.setInitializing();
conn.setVideoProvider(new MyVideoProvider()); …Run Code Online (Sandbox Code Playgroud)