Presentation is loading. Please wait.

Presentation is loading. Please wait.

Using connected devices in Metro style apps Metro スタイル アプリで デバイスを使用する

Similar presentations


Presentation on theme: "Using connected devices in Metro style apps Metro スタイル アプリで デバイスを使用する"— Presentation transcript:

1 Using connected devices in Metro style apps Metro スタイル アプリで デバイスを使用する
3/11/2017 7:22 AM PLAT-278T Using connected devices in Metro style apps Metro スタイル アプリで デバイスを使用する Jack Tao Program Manager Lisa Ong Software Developer Microsoft Corporation © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

2 免責事項 本プレゼンテーション (以下、本書) で提供されている情報は、本書が 発表された時点における Microsoft の見解を述べたものです。市場 ニーズの変化に対応する必要があるため、本書は記載された内容の実 現に関する Microsoft の確約とはみなされないものとします。また本 書に記載された情報の正確さについて、保証するものではありません。 本書は情報の提供のみを目的としており、明示または黙示に関わらず、 本書について Microsoft はいかなる保証をするものでもありません。 本書に記載されている機能名や用語の日本語訳は、あくまでも暫定的 なものであり、将来変更される可能性があります。

3 アジェンダ デバイスを使ってアプリの可能性を広げる 使用するデバイスを Metro スタイル アプリで検索する
理解していただきたいこと デバイスとの統合により、アプリの魅力を高める方法

4 Metro スタイル アプリは、 デバイスのアクセスをシームレスに統合できる

5 Metro スタイル アプリからデバイスを 使用する
デバイスのエコシステムには、さまざまなデータとコンテンツがある デバイス コンテンツへのアクセスにより、アプリの可能性はさらに広がる Windows API により、デバイスを活用するアプリの開発が可能になる

6 デバイスを使ってアプリの可能性を広げる

7 Metro スタイル アプリでは、 さまざまなデバイスを簡単に使用できる

8 SMS と Metro スタイル アプリの位置情報機能を使用する
デモ 行方不明のタブレットを見つける方法 SMS と Metro スタイル アプリの位置情報機能を使用する

9 タブレットを見つけた方法 //build/ に持ってきた ノート PC 行方不明の タブレット オフィスにある! どこ???
差出人: 425-mylaptop 宛先: 425-mytablet 本文: Where is my tablet? //build/ に持ってきた ノート PC 差出人: 425-mytablet 宛先: 425-mylaptop 本文: 47.XXXXX, -122.YYYYY 行方不明の タブレット オフィスにある! どこ???

10 SMS と位置情報機能の使用 Windows では、モバイル ダッシュボードを使ってアプリから SMS を送受信可能

11 さまざまなデバイス

12 デバイスには大量の情報が保存されている 音楽 写真 ビデオ ドキュメント 連絡先、予定表、タスク、メモ テキスト メッセージ
位置情報とルート トレーニング記録 健康管理データ

13 一般的なシナリオの多くがデバイスを使用 休暇中に撮った写真や動画をカメラから SkyDrive にアップロード する
電話の連絡先をインポートする 外部ストレージにデータをバックアップする ポータブル ナビゲーション デバイスから移動の履歴を保存する フィットネス用デバイスに毎日のトレーニングを記録する モバイル ブロードバンドで SMS を送受信する

14 アプリは、デバイスのコンテンツを クラウド サービス経由で簡単に使用できる

15 カメラから SkyDrive に写真をアップロードする
3/11/2017 7:22 AM デモ 写真のアップローダー カメラから SkyDrive に写真をアップロードする © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

16 ポータブル ストレージと Web サービス Windows では、アプリはデバイスに保存されたコンテンツに簡単にアクセスできる

17 デバイスの新しい活用方法を実現する、 マッシュアップ アプリを開発できる

18 市販の GPS デバイスのマップを視覚化する
3/11/2017 7:22 AM デモ Rally trip 市販の GPS デバイスのマップを視覚化する © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

19 ポータブル ストレージとマッシュアップ デバイスと Web サービスのデータをアプリで組み合わせ、マッシュアップを作成可能
マッシュアップ アプリでは、デバイスのコンテンツを さらに高度かつ魅力的に活用できる

20 デバイスをアプリで使用する アプリ デバイス デバイスのエコシステム 新たな 可能性 広がる可能性 + Metro スタイル アプリ

21 使用するデバイスを Metro スタイル アプリで検索する

22 使用するデバイスをアプリで検索する方法 複数/外部接続型デバイス 単一/組み込みのデバイス
Windows.Devices.Enumeration を使用 デバイスを列挙するためのクエリを実行 デバイスのアイコンや名前などを取得 connect/disconnect イベントを取得 単一/組み込みのデバイス デフォルトのデバイスを取得

23 クエリと列挙によって、デバイスを検索する

24 すべてのポータブル ストレージ デバイスを検索
var query = Windows.Devices.Enumeration.DeviceClass.portableStorageDevice; Windows.Devices.Enumeration.DeviceInformation.findAllAsync(query). then(function (storageDevices) { var name = storageDevices[0].name; storageDevices[0].getThumbnailAsync(function (deviceIcon) { var imageTag = document.createElement('img'); imageTag.src = URL.createObjectURL(deviceIcon, …); // PNG 形式 }); var storageDevice = Windows.Devices.Portable.StorageDevice.fromId(storageDevices[0].id);

25 1 行のコードで、組み込みのデバイスを検索し、 すぐに使い始めることができる

26 .getDefault( ) パターンの使用 var smsDevice = Windows.Devices.Sms.SmsDevice.getDefault(); // SMS の送受信を開始... var inclinometer = Windows.Devices.Sensors.Inclinometer.getDefault(); // レーシング ゲームの書き込みを開始... var proximity = Windows.Networking.Proximity.ProximityDevice.getDefault(); // 近くにある PC の探索を開始...

27 Metro スタイル アプリで デバイスを使用する

28 アプリでデバイスを使用する方法 デバイスに保存されているファイルを使用する モバイル ダッシュボードを使って SMS を送受信する
ファイルの検索および操作用のファイル API モバイル ダッシュボードを使って SMS を送受信する 電話の連絡先にアクセスする 独自機能を実現するためのポータブル デバイス API

29 デバイス上のファイルを検索して直接使用する

30 外付けカメラで撮った写真を SkyDrive にアップロード
var options = new Windows.Storage.Search.QueryOptions(…, [".jpg", ".png"]); var query = storageDevice.createFileQueryWithOptions(options); query.getFilesAsync(). then(function (pictureFiles) { picturesFiles.forEach(function (pictureFile) { WL.upload({ path: "me/skydrive", file: pictureFile, … }); });

31 SMS をすばやく簡単に送受信する

32 SMS を使って行方不明の PC を見つける // 行方不明の 2 台目の PC に SMS を送信
var msg = new Windows.Devices.Sms.SmsTextMessage(); msg.to = " "; msg.body ="Where is my tablet?"; smsDevice.sendMessageAsync(msg).then(…); // 行方不明の PC 上での処理 smsDevice.onsmsmessagereceived = function (event) { var messageBody = event.textMessage.body; // メッセージの本文を解析して現在の位置情報と共に返信 };

33 電話の連絡先と独自機能にアクセスする

34 電話から連絡先を取得 // 連絡先データは、電話の連絡先サービスに保存されている then(function (devices) {
Windows.Devices.Enumeration.DeviceInformation.findAllAsync(contactsServiceQuery). then(function (devices) { var device = portableDeviceFactory.getDeviceFromId(devices[0].id); var contactsService = device.services[0]; // vcard2 形式で保存されているすべての連絡先データを取得 contactsService.onGetChildrenByFormatComplete = function (contacts) { … }; contactsService.getChildrenByFormat("vcard2"); });

35 必要なケイパビリティは 必ずアプリ マニフェストで宣言する

36 まとめ

37 Metro スタイル アプリは、 デバイス アクセスをシームレスに統合できる

38 重要ポイント デバイスのエコシステムには、さまざまなデータとコンテンツがある
デバイス コンテンツへのアクセスにより、アプリの可能性はさらに広がる Windows API により、デバイスを活用するアプリの開発が可能になる

39 アプリ デバイス デバイスのエコシステム 新たな 可能性 広がる可能性 + Metro スタイル アプリ

40 関連セッション [APP-398T] How to declare your app’s capabilities
[APP-405T] Share: your app powers the Windows 8 share experience [PLAT-282T] File type associations and AutoPlay [PLAT-781T] Using location & sensors in your app [PLAT-891T] Using files: accessing, searching, and acting on files [HW-747T] Building Metro style apps that connect to specialized devices

41 その他の参照リソースとドキュメント Metro スタイル デバイス エクスペリエンス (英語)
Windows.Devices.Enumeration 名前空間 (英語) Windows.Devices.Portable 名前空間 (英語) Windows.Devices.Sms 名前空間 (英語)

42 thank you Feedback and questions http://forums.dev.windows.com
Session feedback

43 3/11/2017 7:22 AM © 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. © 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

44


Download ppt "Using connected devices in Metro style apps Metro スタイル アプリで デバイスを使用する"

Similar presentations


Ads by Google