Share via


ContactVideoCallActivatedEventArgs 클래스

정의

앱이 대화 상대에게 화상 통화를 활성화할 때 데이터를 제공합니다.

자바 스크립트 이 형식은 WebUIContactVideoCallActivatedEventArgs로 표시됩니다.

public ref class ContactVideoCallActivatedEventArgs sealed : IActivatedEventArgs, IContactVideoCallActivatedEventArgs
/// [Windows.Foundation.Metadata.ContractVersion(Windows.ApplicationModel.Activation.ContactActivatedEventsContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class ContactVideoCallActivatedEventArgs final : IActivatedEventArgs, IContactVideoCallActivatedEventArgs
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.ApplicationModel.Activation.ContactActivatedEventsContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class ContactVideoCallActivatedEventArgs : IActivatedEventArgs, IContactVideoCallActivatedEventArgs
Public NotInheritable Class ContactVideoCallActivatedEventArgs
Implements IActivatedEventArgs, IContactVideoCallActivatedEventArgs
상속
Object Platform::Object IInspectable ContactVideoCallActivatedEventArgs
특성
구현

Windows 요구 사항

디바이스 패밀리
Windows Desktop Extension SDK (10.0.10240.0에서 도입되었습니다.)
API contract
Windows.ApplicationModel.Activation.ContactActivatedEventsContract (v1.0에서 도입되었습니다.)

예제

다음은 Skype ID에 대한 연락처 영상 통화 활성화를 처리하는 데 필요한 코드의 예입니다.

protected override void OnActivated(IActivatedEventArgs args)
{
    if (args.Kind == ActivationKind.Contact)
    {
        var contactArgs = args as IContactActivatedEventArgs;
        if (contactArgs.Verb == Windows.ApplicationModel.Contacts.ContactLaunchActionVerbs.VideoCall)
        {
            IContactVideoCallActivatedEventArgs videoCallArgs = contactArgs as IContactVideoCallActivatedEventArgs;

            //get contact display info
            var contactName = videoCallArgs.Contact.DisplayName;
            var contactThumbnail = videoCallArgs.Contact.Thumbnail;

            if (videoCallArgs.ServiceId == "skype.com")
            {
                var userId = videoCallArgs.ServiceUserId;
                //add video calling logic for Skype Ids
            }
        }
    }
}
void App::OnActivated(Windows::ApplicationModel::Activation::IActivatedEventArgs const& args)
{
    if (args.Kind() == Windows::ApplicationModel::Activation::ActivationKind::Contact)
    {
        auto contactArgs{ args.as<Windows::ApplicationModel::Activation::IContactActivatedEventArgs>() };
        if (contactArgs.Verb() == Windows::ApplicationModel::Contacts::ContactLaunchActionVerbs::VideoCall())
        {
            auto videoCallArgs{ contactArgs.as<Windows::ApplicationModel::Activation::ContactVideoCallActivatedEventArgs>() };

            // Get contact display info.
            auto contactName{ videoCallArgs.Contact().DisplayName() };
            auto contactThumbnail{ videoCallArgs.Contact().Thumbnail() };

            if (videoCallArgs.ServiceId() == L"skype.com")
            {
                auto userId = videoCallArgs.ServiceUserId();
                //add messaging logic for Skype Ids
            }
        }
    }
}
void App::OnActivated(IActivatedEventArgs^ args)
{
    if (args->Kind == ActivationKind::Contact)
    {
        auto contactArgs = dynamic_cast<IContactActivatedEventArgs^>(args);
        if (contactArgs->Verb == Windows::ApplicationModel::Contacts::ContactLaunchActionVerbs::VideoCall)
        {
            auto videoCallArgs = dynamic_cast<ContactVideoCallActivatedEventArgs^>(contactArgs);

            //get contact display info
            auto contactName = videoCallArgs->Contact->DisplayName;
            auto contactThumbnail = videoCallArgs->Contact->Thumbnail;

            if (videoCallArgs->ServiceId == "skype.com")
            {
                auto userId = videoCallArgs->ServiceUserId;
                //add video calling logic for Skype Ids
            }
        }
    }
}

설명

Windows 8.1 통해 사용자는 연락처 카드 또는 Windows Search 환경에서 대화 상대에게 영상 통화를 할 수 있습니다. 대화 상대 영상 통화 활성화 계약을 구현하여 Windows에서 앱을 시작하여 사용자를 위해 화상 통화를 할 수 있습니다.

화상 통화 활성화를 받으려면 앱이 매니페스트의 "windows.contact" 확장 범주에 등록해야 합니다. 이 확장에서 "videoCall"과 같은 "동사" 특성이 있는 "LaunchAction" 요소를 포함해야 합니다. 그런 다음 "ServiceId" 요소를 지정하여 앱이 영상 통화를 할 수 있는 서비스의 도메인 이름(예: "skype.com")을 지정할 수 있습니다.

여러 앱이 이 계약에 등록되어 있는 경우 사용자는 비디오 통화를 처리하기 위한 기본값으로 앱 중 하나를 선택할 수 있습니다.

매니페스트 등록의 예는 다음과 같습니다.

<m2:Extension Category="windows.contact" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest">
  <m2:Contact>
    <m2:ContactLaunchActions>
      <m2:LaunchAction Verb="videoCall" DesiredView="useHalf">
        <m2:ServiceId>skype.com</m2:ServiceId>
      </m2:LaunchAction>
    </m2:ContactLaunchActions>
  </m2:Contact>
</m2:Extension>

매니페스트에 등록한 후 연락처 비디오 통화 계약에 대해 앱을 활성화할 수 있습니다. 앱이 활성화되면 이벤트 정보를 사용하여 화상 통화 활성화를 식별하고 사용자에 대한 비디오 통화를 완료하는 데 도움이 되는 매개 변수를 추출할 수 있습니다.

속성

Contact

화상 통화에 대한 연락처를 가져옵니다.

Kind

활성화 유형을 가져옵니다.

PreviousExecutionState

활성화되기 전에 앱의 실행 상태를 가져옵니다.

ServiceId

화상 통화에 사용되는 서비스의 식별자를 가져옵니다.

ServiceUserId

화상 통화에 사용되는 서비스의 사용자 식별자를 가져옵니다.

SplashScreen

시작 화면에서 활성화된 앱으로의 전환에 대한 정보를 제공하는 시작 화면 개체를 가져옵니다.

Verb

수행할 작업을 가져옵니다.

적용 대상

추가 정보