複数の PDP コンテキストを使用したアプリの開発

パケット データ プロトコル (PDP) コンテキストは、デバイスとモバイル ネットワークが IP パケットを交換できるパケット データ接続を提供します。 3GPP 標準に従って、デバイスは一度に複数の PDP コンテキストをアクティブにすることができます。 Windows 8.1 と Windows 10 では、複数の PDP コンテキストがサポートされ、アプリは、Windows 8 でサポートされていたインターネット PDP コンテキストと共に、特別な PDP コンテキストを介してモバイル ネットワークと通信できます。 この機能を使用すると、Windows で差別化されたエクスペリエンスと革新的なサービスを作成できます。 また、アプリ開発者と提携して、顧客向けの優れた品質の VOIP およびビデオ ストリーミング エクスペリエンスを開発することもできます。

次の図に、Windows 8.1 と Windows 10 で複数の PDP コンテキストがどのように動作するかを示します。

Diagram showing how multiple PDP contexts work in Windows 8.1 and Windows 10.

複数の PDP コンテキストの詳細については、このトピックの以下のセクションを参照してください。

主要なシナリオ

複数の PDP コンテキストを使用して、プレミアム サービスを有効にできます。

  • 差別化された課金 – 複数の PDP コンテキストを使用して、データや課金の制限を変更できます。 たとえば、Contoso は、顧客向けのデータ バックアップ アプリを開発したモバイル通信事業者です。 モバイル通信事業者として Contoso は、複数の PDP コンテキストを作成してプレミアム サブスクライバーが無料でアプリを使用できるようにしようと思えばできます。 他のすべてのサブスクライバーは、それを使用するために別途課金されます。

  • リッチ コミュニケーション サービス – 強化された電話帳、強化されたメッセージング、強化された通話など、豊富なコミュニケーション サービスを提供するために GSM Association によって作成されたグローバル イニシアチブ。 リッチ コミュニケーション サービスは、モバイル通信事業者間の相互運用性を実現し、既存の資産と機能を使用して高品質で革新的な通信サービスを利用できる新しい方法を提供します。

  • スポンサー接続 – これにより、ユーザーは毎月のデータ使用量に影響を及ぼすことなく、特定の種類のコンテンツにアクセスできます。 コンテンツ プロバイダーは、モバイル通信事業者への直接支払い、収益分配契約、またはその他業務上の取り決めにより、通信事業者に払い戻しを行う段取りを決めます。

  • 個人用ホットスポット - 一部のモバイル通信事業者は、接続が個人用ホットスポットとして使用されている場合、別料金を請求します。 複数の PDP コンテキストを使用して、この 2 つを区別できます。

モバイル ブロードバンド アプリ

UWP モバイル ブロードバンド アプリでは、複数の PDP コンテキストを利用して、特殊な PDP コンテキストをアクティブ化し、データ トラフィックをルーティングする規則を指定できます。 これらのアプリでは、特定のルーティング先またはすべてのデータ トラフィックに対してルールを作成できます。

モバイル ブロードバンド アプリは、ネットワークとデータを交換する必要がある場合、使用可能なネットワークおよび接続されているネットワークを確認します。 モバイル ブロードバンド アプリにこれらのネットワークに対する特別ルールが設けられている場合は、接続マネージャー API を使用して特殊 PDP コンテキストを開きます。 この接続が正常に確立されると、PDP コンテキストは、この接続のルーティング規則を提供し、ネットワーク API を使用してデータを転送します。 モバイル ブロードバンド アプリでは、NetworkStatusChanged イベントを受信して、いずれかの接続が変更されたかどうか、および新しい接続用に PDP コンテキストを開く必要があるかどうかを確認する場合には、これを繰り返す必要があります。

Flowchart illustrating the process of mobile broadband app checking available and connected networks.

ネットワーク API

特殊な PDP コンテキストを使用してデータを送信する場合、Microsoft Store アプリでは、データ転送に使用するネットワーク API に基づいて異なるロジックを使用する必要があります。

HTTP ベースの API

XMLHTTPRequestIXHR2Windows.Web.SyndicationWindows.Web.AtomPub などの HTTP ベースの API、JQuery や Windows.Web.Http、などの Windows HTTP プロトコルに基づく API には、特定のインターフェイスにバインドする機能がありません。 これらの API の場合、Windows はポリシーを使用して特殊な PDP コンテキストへのデータのルーティングを処理します。 特殊な PDP コンテキストがアクティブ化されると、アプリはルーティング先と特殊な PDP コンテキストに基づいてルーティング規則を指定できます。 ルーティング先には、ドメイン名または IP アドレス (video.fabrikam.com、.contoso.com、123.23.34.333 など) を指定できます。 ルーティング規則を指定した後、アプリが上記の HTTP API のいずれかを使用してデータを転送する場合、Windows はルーティング規則に基づいて特殊な PDP コンテキストにデータを送信します。 アプリがデータの転送を完了したら、特殊な PDP コンテキストを切断し、ルート ポリシーを削除する必要があります。

バックグラウンド転送 API と HTTP クライアント (C#) API はルート ポリシーを使用できません。

Diagram demonstrating the process of using HTTP-based APIs for sending data through a special PDP context.

ソケット ベースの API

Windows.Networking.Sockets 名前空間で使用できるソケット ベースの API (TCP、UDP、ストリーム ソケットなど) は、特定のインターフェイスにバインドするメカニズムを提供します。 アプリでソケット API を使用する場合は、特殊な PDP コンテキストにデータをルーティングするために、特定のインターフェイスにバインドする必要があります。 特殊な PDP コンテキストがアクティブ化されると、AcquireConnectionAsync API によってアプリにインターフェイス情報が提供されます。 この情報を使用して、特定のインターフェイスにバインドし、データの転送を開始できます。

Diagram depicting the process of using socket-based APIs for sending data through a special PDP context.

複数の PDP コンテンツ API 情報

Windows 8.1 と Windows 10 では、複数の PDP コンテキストをサポートするために次の API が追加されています。

  • CellularApnContext このクラスには、ネットワーク上のアクセス ポイントを指定するために使用されるプロパティが含まれています。 特定のアクセス ポイントへの接続を確立するために、AcquireConnectionAsync 呼び出しで CellularApnContext オブジェクトが渡されます。

  • ConnectivityManager::AcquireConnectionAsync この API は、指定されたアクセス ポイント名 (APN) または PDP コンテキストに対して新しい接続をアクティブ化します。 この非同期メソッドを使用すると、アプリは、適切な構成情報を使用して特定の APN または PDP コンテキストへの接続を要求できます。 特殊な APN がアクティブ化されると、Windows とアプリへの新しい仮想インターフェイスとして表示されます。

  • ConnectivityManager::AddHttpRoutePolicy このメソッドは、特殊な PDP コンテキストにデータをルーティングするために HTTP スタック トラフィックによって使用されるポリシーを追加します。 アプリでは、ドメイン名や IP アドレス、特殊な PDP コンテキスト プロファイルなど、ルーティング先に基づいてポリシーを指定できます。 Windows HTTP スタックでは、アプリによってポリシーが作成されると、データを特殊な PDP コンテキストにルーティングするためにポリシーを使用します。

  • ConnectivityManager::RemoveHttpRoutePolicy このメソッドは、以前に追加された HTTP ルート ポリシーを削除します。

次のコードは、HTTP ベースのデータ転送にこれらの API を使用する方法を示しています。

var connectivity = Windows.Networking.Connectivity;
var currentRoutePolicy = null;
var currentConnectionSession = null;

//  Create PDP context/APN data
var apnContext                      =   new connectivity.CellularApnContext();
apnContext.accessName               =   "myAPN.com";
apnContext.userName                 =   "APNusername"
apnContext.password                 =   "[PLACEHOLDER]";
apnContext.isCompressionEnabled     =   false;
apnContext.authenticationType       =   connectivity.CellularApnAuthenticationType.none;

//  Request a connection to Windows
connectivity.ConnectivityManager.acquireConnectionAsync(apnContext).done(onConnectionSucceeded, onConnectionFailed);


//  On successful Activation of APN, Windows returns a ConnectionSession object that encapsulates the new connection profile

function onConnectionSucceeded(result
{
    // keep the connectionSession in scope
    currentConnectionSession= result;

    //  create a route policy for the new connection
    currentRoutePolicy = new connectivity.routePolicy(currentConnectionSession.ConnectionProfile, new hostName("video.mydomain.com"),Windows.Networking.DomainNameType.suffix);

    //  indicate the new route policy to the Http stack
    connectivity.connectivityManager.addHttpRoutePolicy(currentRoutePolicy);

    // Backend data interaction with appropriate HTTP APIs (IXHR, Open IFrame etc.)


    // After completing the data transfer remove the Route Policy
    connectivity.connectivityManager.removeHttpRoutePolicy(currentRoutePolicy);
    currentRoutePolicy = null;

    // Disconnect the PDP Context to free up resources
    currentConnectionSession.close();
}

次のコードは、ソケット ベースのデータ転送にこれらの API を使用する方法を示しています。

// Connect to Special PDP Context
var connectivity = Windows.Networking.Connectivity;
var currentRoutePolicy = null;
var currentConnectionSession = null;

// Create PDP Context/APN Data
var apnContext = new connectivity.CellularApnContext();

// Create PDP context/APN data
var apnContext = new connectivity.CellularApnContext();
apnContext.accessName = "myAPN.com";
apnContext.userName = "APNusername"
apnContext.password = "[PLACEHOLDER]";
apnContext.isCompressionEnabled = false;
apnContext.authenticationType = connectivity.CellularApnAuthenticationType.none;

// Request the connection to Windows
connectivity.ConnectivityManager.acquireConnectionAsync(apnContext).done(onConnectionSucceeded, onConnectionFailed);

// On successful activation of an APN, Windows returns a ConnectionSession object that encapsulates the new connection profile
                function onConnectionSucceeded(result) {

// keep the connectionSession in scope
currentConnectionSession = result;

var socket = new Windows.Networking.Sockets.StreamSocket();
var hostName = new Windows.Networking.HostName("www.contoso.com");
var portNumber = "1234";

// Bind the socket to new Special PDP Context Connection
socket.connectAsync(hostName, portNumber, SocketProtectionLevel.PlainSocket, currentConnectionSession.connectionProfile.networkAdapter).done(onSocketConnectionSucceeded, onSocketConnectionFailed);

function onSocketConnectionSucceeded(result)
{
    // Start transferring data using socket APIs

}

// Closing the sockets
socket.close();

// Disconnect the PDP Context to free up resources
currentConnectionSession.close();

特殊な PDP コンテキスト接続でのネットワーク移行を処理するには、アプリで NetworkStatusChanged イベントを処理する必要があります。

シナリオ: プレミアム モバイル ブロードバンド アプリで、特別な APN を使用して無料のデータ アクセスを提供する

このシナリオでは、モバイル ブロードバンド アプリは、特殊な PDP コンテキストを使用して無料のデータ アクセスを提供します。 アプリは、Wi-Fi ネットワークなどの接続されたネットワークを使用するか (無料の場合)、特定の通信事業者 ネットワークに接続されている場合は特別な APN を使用します。 次のサンプル コードは、無料のネットワークが接続されていない場合に、アプリで複数の PDP コンテキスト API を使用して、特殊な PDP コンテキストでデータを転送する方法を示しています。

// Reference the namespace
var connectivity = Windows.Networking.Connectivity;

// Current route policy
var currentRoutePolicy = null;
var currentConnectionSession = null;

function onLoad()
{
  // Register for network status change
  connectivity.networkInformation.addEventListener("networkstatuschanged", OnNetworkStatusChange);
  // Process the current status
  handleNetworkChange();
}

//  Handle newtork status changes
function onNetworkStatusChange()
{
  HandleNetworkChange();
}

// On network status change:
//  if there is no connectionPolicy, evaluate a new one
//  if there is a current connectionPolicy ==> verify it is still valid
//      evaluate a new one if the current connectionPolicy is not valid
function handleNetworkChange()
{
  if (isCurrentPolicyStillValid())
  {
    //the current policy is still valid.
    return;
  }

  //  No policy or current policy is not good anymore
  //  cleanup any previous configuration
  if (currentRoutePolicy)
  {
    connectivity.ConnectivityManager.removeHttpRoutePolicy(currentRoutePolicy);
    currentRoutePolicy = null;
  }

  //  if a different APN was connected, disconnect it to free up resources
  if (connectionConnectionSession != null)
  {
    connectionConnectionSession.close();
    connectionConnectionSession = null;
  }

  // evaluate connection policy
  startEvaluateConnectionPolicy();
}

//  evaluate if the current connectionPolicy is still valid
function isCurrentPolicyStillValid()
{
  if (null != currentRoutePolicy)
  {
    // a policy is currently in place, let's verify if it is still valid
    var currentProfile = currentRoutePolicy.connectionProfile();
    if (NetworkConnectivityLevel.none != currentProfile.GetNetworkConnectivityLevel())
    {
      // current policy is still good. bail out
      return true;
    }
  }
  return false;
}

// starts the evaluation of a new connection policy
function startEvaluateConnectionPolicy()
{
  // first try to get a free network if it is available
  var queryFilter = new connectivity.connectionProfileFilter();
  queryFilter.networkCostType = connectivity.networkCostType.unrestricted;
  queryFilter.isConnected = true;

  connectivity.networkInformation.findConnectionProfilesAsync(queryFilter).done(onSuccess, onFailure);
}

//  Succesfully retrieved at least one free connection profile
function onSuccess(results)
{
  if(results.count > 0)
  {
  //  Enfore the route to the http stack
  enforceHttpRoutePolicy(results[0]);

  // Backend data interaction with appropriate APIs(Open IFrame etc.)

  }
  else
  {
    onFailure();
  }
}

//  there are no free networks available at this time
function onFailure()
{
  //  create a request to connect a specific APN on the network
  // no free network available, connect
  var apnContext                      =   new connectivity.CellularApnContext();
  apnContext.accessPointName          =   "myAPN.com";
  apnContext.userName                 =   "APNusername"
  apnContext.password                 =   "[PLACEHOLDER]";
  apnContext.isCompressionEnabled     =   false;
  apnContext.authenticationType       =   connectivity.CellularApnAuthenticationType.none;

  //
  //  request the connection to Windows
  connectivity.connectivityManager.acquireConnectionAsync(apnContext).done(onConnectionSucceeded, onConnectionFailed);
}

//  on success Windows returns a ConnectionSession object that encapsulates the new connection profile
function onConnectionSucceeded(result)
{
  // keep the connectionSession in scope
  currentConnectionSession= result;
  //  create a route policy for the new connection
  enforceHttpRoutePolicy(currentConnectionSession.ConnectionProfile,new hostName("video.mydomain.com"),Windows.Networking.DomainNameType.suffix);

  // Backend data interaction with appropriate APIs(Open IFrame etc.)

}

//  Windows was not able to connect the specified APN
function onConnectionFailed()
{
  // display error message and just wait for Network Status Change event to try again
}

//  utility function to enforce a route policy
function enforceHttpRoutePolicy(connectionProfile,targetSuffix)
{
  //  Keep the route request global so we can close it later
  currentRoutePolicy= new connectivity.routePolicy(connectionProfile, targetSuffix);
  //  Indicate the new route policy to the Http stack
  connectivity.connectivityManager.addHttpRoutePolicy(currentRoutePolicy);
}

//  cleanup on shutdown
function onShutdown()
{
  //  Remove the route policy from HttpStack
  connectivity.connectivityManager.removeHttpRoutePolicy(currentRoutePolicy);
  currentRoutePolicy = null;

  //  If a different APN was connected, disconnect it to free up resources
  if(currentConnectionSession!= null)
  {
    currentConnectionSession.close();
  }
}

シナリオ: モバイル ブロードバンド アプリでは、サブスクリプションの購入とプロビジョニングに特別な PDP コンテキストが必要である

このシナリオでは、モバイル ブロードバンド アプリは、サブスクリプションの購入とプロビジョニングのための特別な PDP コンテキストが必要です。 このアプリは、接続されているネットワークに関係なく、特殊な PDP コンテキストをアクティブ化します。

var connectivity = Windows.Networking.Connectivity;
var currentRoutePolicy = null;
var currentConnectionSession = null;

function onLoad()
{
  // Register for network status change
  connectivity.networkInformation.addEventListener("networkstatuschanged", OnNetworkStatusChange);
  // Process the current status
  handleNetworkChange();
}

function onNetworkStatusChange()
{
  HandleNetworkChange();
}

//  Create the PDP Context/APN Data
var apnContext                      =   new connectivity.CellularApnContext();
apnContext.providerId               =   "23545";
apnContext.accessPointName          =   "myAPN.com";
apnContext.userName                 =   "APNusername"
apnContext.password                 =   "[PLACEHOLDER]";
apnContext.isCompressionEnabled     =  false;
apnContext.authenticationType       =   connectivity.CellularApnAuthenticationType.none;

//  Request the connection to Windows
connectivity.connectivityManager.acquireConnectionAsync(apnContext).done(onConnectionSucceeded, onConnectionFailed);

//  On successful connection to PDP Context,  Windows returns a ConnectionSession object that incapsulate the new connection profile
function onConnectionSucceeded(result)
{
  // keep the connectionSession in scope
  currentConnectionSession= result;

  //  create a route policy for the new connection
  currentRoutePolicy = new connectivity.routePolicy(currentConnectionSession.ConnectionProfile, new hostName("video.mydomain.com"),Windows.Networking.DomainNameType.suffix);

  //  indicate the new route policy to the Http stack
  connectivity.connectivityManager.addHttpRoutePolicy(currentRoutePolicy);

  // Backend data interaction with appropriate APIs(Open IFrame etc.)

  // After completing the data transfer remove the Route Policy
  connectivity.connectivityManager.removeHttpRoutePolicy(currentRoutePolicy);
  currentRoutePolicy = null;

  // Disconnect the PDP Context to free up resources
  currentConnectionSession.close();

}

function handleNetworkChange()
{
  // App behavior to handle network
  var currentProfile = currentRoutePolicy.connectionProfile();
  if (NetworkConnectivityLevel.none != currentProfile.GetNetworkConnectivityLevel())
  {
    // The special PDP Context is disconnected, app should handle this. It can request another connection to special PDP Context or it can show error to the user.
  }
}

モバイル ブロードバンド アプリに関する考慮事項

モバイル ブロードバンド アプリは、各 PDP コンテキストのローカル データ使用量情報を取得し、特殊な PDP コンテキストのポリシーを使用して Windows に影響を与えることができます。

ローカル データの使用量

Windows 8 では、現在のデータ使用量を表示できるモバイル ブロードバンド アプリを通じて、ユーザーとのサブスクリプションベースの継続的な関係を提供します。 ユーザーは、現在のデータ使用量を表示し、支払いサイクルまたはセッションの終了日を理解して、適切な決定を下すことができます。 ネットワークの負荷をできるだけ減らすには、ネットワークでのデータ使用量を定期的にチェックする必要があります。 Windows には、データ使用量と組み合わせて現在のデータ使用量をユーザーに表示するために使用できるローカルデータ使用量 API が用意されています。

特殊な PDP コンテキストを使用すると、特定のアプリやサービスに対するデータ アクセス料金を区別できます。 各異なる PDP コンテキストは、ローカル データ使用カウンターの異なるプロファイルとして扱われます。 モバイル ブロードバンド アプリは、インターネット PDP コンテキストが Windows 8 でどのように機能したかと同様に、特定の期間の各 PDP コンテキストのローカル データ使用量に対してクエリを実行できます。 この情報を使用して、ユーザーに適切なデータ使用エクスペリエンスを表示できます。

次のサンプル コードは、ネットワーク API を使用して、すべての PDP コンテキストのローカル データ使用量を読み取る方法を示しています。

// Get the network account ID.
IReadOnlyList<string> networkAccIds = Windows.Networking.NetworkOperators.MobileBroadbandAccount.AvailableNetworkAccountIds;

if (networkAccIds.Count == 0)
{
  rootPage.NotifyUser("No network account ID found", NotifyType.ErrorMessage);
  return;
}

// For the sake of simplicity, assume we want to use the first account.
// Refer to the MobileBroadbandAccount API's how to select a specific account ID.
string networkAccountId = networkAccIds[0];

// Create mobile broadband object for specified network account ID
var mobileBroadbandAccount = Windows.Networking.NetworkOperators.MobileBroadbandAccount.CreateFromNetworkAccountId(networkAccountId);

// Get all connection profiles associated with this network account ID
var connectionProfiles = mobileBroadbandAccount.GetConnectionProfiles();

// Collect local usages for last one hour
DateTime endTime = DateTime.Now;
TimeSpan timeDiff = TimeSpan.FromHours(1);
DateTime startTime = endTime.Subtract(timeDiff);
string message = string.Empty;

foreach (var connectionProfile in connectionProfiles)
{
  // Display local usages for each connection profiles
  DataUsage localUsage = connectionProfile.GetLocalUsage(startTime, endTime);
  message += "Connection Profile Name:  " + connectionProfile.ProfileName + "\n\n";
  message += "Local Data Usage from " + startTime.ToString() + " to " + endTime.ToString() + ":\n";
  message += " Bytes Sent     : " + localUsage.BytesSent + "\n";
  message += " Bytes Received : " + localUsage.BytesReceived + "\n\n";
}

// Print the message string

ポリシー

一部の通信事業者は、特殊な PDP コンテキストの帯域幅が制限されていることを示しています。 特殊な PDP コンテキストをアクティブ化するが、特殊な PDP コンテキストを使用するためのアクセス権を持たないアプリは、サービス拒否攻撃を発生させる可能性があります。 特別な APN の使用は、ビジネス関係を持つ特定のアプリに制限する必要があります。 Windows には、特別な APN 名を持つ UWP アプリのリストを提供できます。 Windows では、その情報を使用して、特別な APN へのアクセスを制限します。 リストを指定しないと、Windows では、すべてのアプリに対して特殊な PDP コンテキストが開かれていると想定されます。

これは、特殊な PDP コンテキストで余分なトラフィックを回避するためだけです。 これは、アプリを特殊な PDP コンテキストに制限するためのセキュリティ メカニズムとして利用することはできません。 特殊な PDP コンテキストへのアクセスを制限する場合は、ネットワークに何らかの認証またはセキュリティ メカニズムを実装する必要があります。 たとえば、特定の PDP コンテキストに対して特定の IP アドレスのみを許可するフィルターを使用できます。

一部のモバイル ネットワークでは、複数の PDP コンテキストがサポートされていません。 ネットワークが複数の PDP コンテキストをサポートしているかどうかをプロビジョニングできます。 ネットワークで複数の PDP コンテキストがサポートされていない場合、Windows ではアプリが特別な APN に対してオンデマンド接続を作成できないようにする必要があります。 既定では、Windows では複数の PDP コンテキストがサポートされていることを前提としています。

次のサンプル XML ファイルは、Windows プロビジョニング メタデータを使用して、特殊な PDP コンテキストに対して許可されるアプリのリストを提供する方法を示しています。

<?xml version="1.0" encoding="utf-8"?>
<CarrierProvisioning xmlns="http://www.microsoft.com/networking/CarrierControl/v1">
  <Global>
    <!-- Adjust the Carrier ID to fit your own ID. Refer to the documentation about Carrier ID's. -->
    <CarrierId>{11111111-1111-1111-1111-111111111111}</CarrierId>
    <!-- Adjust the Susbscriber ID. Refer to the documentation about Subscriber ID's. -->
    <SubscriberId>1234567890</SubscriberId>
  </Global>
  <Extensions>
    <Extensions_v2 xmlns="http://www.microsoft.com/networking/CarrierControl/v2">
      <AdditionalPDPContexts>
        <MultiplePDPContextPolicies MultiplePDPContextSupport="true">
          <PDPContextPolicy>
            <!-- Adjust the profile name -->
            <Name>Contoso1</Name>
            <Context>
              <!-- Adjust the access string to your APN. -->
              <AccessString>Contoso.Contoso1</AccessString>
              <!-- Adjust the UserLogonCred to fit your UserLogonCred. Refer to the documentation about UserLogonCred's. -->
              <UserLogonCred>
                <UserName>user1</UserName>
                <Password>[PLACEHOLDER]</Password>
              </UserLogonCred>
            </Context>
            <AppIDList>
              <!-- Adjust the AppId to your AppId -->
              <AppID>Contoso.Sample1.CS_dsarewaj</AppID>
              <AppID>Contoso.Sample2.CPP_dsarewaj</AppID>
            </AppIDList>
          </PDPContextPolicy>
          <PDPContextPolicy>
            <!-- Adjust the profile name -->
            <Name>Contoso2</Name>
            <Context>
              <!-- Adjust the access string to your APN. -->
              <AccessString>Contoso.Contoso2</AccessString>
              <!-- Adjust the UserLogonCred to fit your UserLogonCred. Refer to the documentation about UserLogonCred. -->
              <UserLogonCred>
                <UserName>user2</UserName>
                <Password>[PLACEHOLDER]</Password>
              </UserLogonCred>
            </Context>
            <AppIDList>
              <!-- Adjust the AppId to your AppId -->
              <AppID>Contoso.Sample3.CS_dsarewaj</AppID>
              <AppID>Contoso.Sample4.CPP_dsarewaj</AppID>
            </AppIDList>
          </PDPContextPolicy>
        </MultiplePDPContextPolicies>
      </AdditionalPDPContexts>
    </Extensions_v2>
  </Extensions>
</CarrierProvisioning>

オーディオとビデオのストリーミング

オーディオ ストリーミング アプリでは、特殊な PDP コンテキストを使用してオーディオ ストリームまたはビデオ ストリームを再生できます。 HTTP API と同様に、アプリでは次のロジックを使用し、<オーディオ> タグまたは<ビデオ> タグを使用してオーディオまたはビデオを再生できます。

Diagram showing the workflow of a streaming app using a special PDP context.

WinInet API に基づいてビデオ フレームワークを使用できます。

InstantGo

InstantGo では、ユーザーが携帯電話で期待するようになってきた、すばやく電源をオンまたはオフできるユーザー エクスペリエンスが実現されています。 また、携帯電話の場合と同様に、InstantGo を使用すると、適切なネットワークが利用可能になるたびに、システムを最新の状態に維持し、到達可能な状態にすることができます。 低電力 PC プラットフォームの InstantGo は、特定の Windows 認定要件を満たしている必要があります。

InstantGo では、次のシナリオがサポートされています。

  • 新しいコンテンツを使用してライブ タイルを更新する

  • 電子メールを受信する

  • Web サイトからファイルをダウンロードまたはアップロードする

  • Web サイト上の写真などのコンテンツを共有する

  • インスタント メッセージを受信する

  • VoIP 呼び出しを受信する

  • リアルタイムで通信する

  • バックグラウンド オーディオと音楽を再生する

InstantGo の詳細については、「InstantGo の概要」を参照してください。

モバイル ブロードバンド アプリでは、これらの InstantGo シナリオの一部を有効にするために特殊な PDP コンテキストを使用できます。 特殊な PDP コンテキストがカバレッジ外であるために切断された場合は、次のロジックを使用して再接続する必要があります。 デバイスがコネクト スタンバイ電源状態になると、Windows は 10 分後に特殊な PDP コンテキストへのすべての接続を切断し、アプリでもう一度接続を要求する必要があります。

Flowchart illustrating the process of reconnecting to a special PDP context in InstantGo scenarios.

バックグラウンドでのオーディオ ストリーミング

オーディオ ストリーミング アプリでは、特殊な PDP コンテキストを使用して、バックグラウンドおよびコネクト スタンバイ電源状態でオーディオを実行できます。 バックグラウンドでオーディオを再生する方法の詳細については、「バックグラウンドでオーディオを再生する方法」を参照してください。

リアルタイム通信アプリ

VoIP やチャット アプリなどのリアルタイム通信アプリは、特殊な PDP コンテキストでウェイクアップ トリガーを受け取ることができます。 ウェイクアップ トリガーを使用すると、システムがコネクト スタンバイ電源状態にある場合を含め、アプリを常にトリガーできます。

このシナリオを有効にするには、モバイル ブロードバンド デバイスは、モバイル ブロードバンド インターフェイス モデル (MBIM) 仕様に記載されているように、特殊な PDP コンテキストでウェイクアップ フィルターをサポートする必要があります。

モバイル ブロードバンド デバイス

複数の PDP コンテキストをサポートするには、モバイル ブロードバンド デバイスのファームウェアで、MBIM 仕様で定義されている複数の PDP コンテキストをサポートする必要があります。 また、複数の PDP コンテキストに固有の Windows ハードウェア認定キット テストにも合格する必要があります。

この機能は通信事業者固有であるため、モバイル ブロードバンド デバイスでは省略可能です。 この機能が必要な場合は、通信事業者の要件に複数の PDP コンテキスト機能を追加する必要があります。

  • デバイス ファームウェアは、MBIM 仕様のセクション 10.5.12.1 で詳しく説明されているように、複数の IP データ ストリームをサポートする必要があります。 これには、複数の PDP コンテキストを完全にサポートするために、CID と IP データ ストリームのすべての制御実装のサポートが含まれます。

  • デバイス ファームウェアは、Windows で使用するために複数のデュアル ベアラー (IPv4 & IPv6) PDP コンテキストをサポートする必要があります。

    • これには、要件に応じて、インターネット接続用の 1 とモバイル ブロードバンド アプリ用の追加の PDP コンテキストが含まれます。

    • これには、ファームウェアが SMS やその他の管理コンテキストに使用できるデバイスで管理される PDP コンテキストは必要ありません。

  • デバイス ファームウェアは、ファームウェア内で既にデバイスで管理されている PDP コンテキストに対して、ホスト オペレーティング システム要求を適切に活用できる必要があります。

  • デバイス ファームウェアは引き続き SMS PDP コンテキストを抽象化し、その下で使用されているベアラーに関係なく、SMS CID を介してルーティングする必要があります。