写真の選択: ユーザーに表示される写真
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
このガイドでは、メディア アイテムを選択する際のユーザー エクスペリエンスを理解するのに役立ちます。
標準の Picker API フローに従い、アプリが pickerUri
を表示した後、アプリが mediaItemsSet
が true を返すまでポーリングしている間に選択が開始されます。
これらの手順を自分のデバイスで確認するには、サンプルアプリをご覧ください。
選択セッションを開始する
セッションの作成に成功すると、アプリはユーザーに pickerUri
を表示します。
pickerUri
を QR コードと URL の両方として表示します。
pickerUri
の横に有益なテキストを配置します。たとえば、「このコードをスキャンして Google フォトを開き、アイテムを選択してください」などです。
- 入力機能が制限されているデバイス(キオスク、タブレット、スマートテレビなど)の場合は、テキストサイズと QR コードの幅についてハードウェア メーカーの推奨事項を確認してください。
写真を検索して選択する
ユーザーが pickerUri
にアクセスすると、Google フォト アプリ内の写真選択ページが表示されます。
このページには、ユーザーの Google フォト ライブラリの最新の写真が常に表示されます。アルバム、お気に入り、その他の一般的な写真カテゴリは直接表示されません。ユーザーは、キーワード、日付、場所、アルバムのタイトルなど、さまざまな条件を使用して写真を検索できます。
アプリでアルバム、日付、その他の一般的な写真カテゴリを使用している場合は、Google フォト アプリにアクセスしたユーザーに検索を促すメッセージを表示して、ユーザーをサポートします。
たとえば、ユーザーに特定のアルバムを共有するよう求める場合は、ユーザーが Google フォトに接続する同じページに、「Google フォトに接続して、共有するアルバムを検索してください」というテキストを含めることができます。
検索した結果から、ユーザーが 1 つ以上のアイテムを選択できます。
完了画面
ユーザーが [完了] ボタンをタップして選択を完了すると、[完了] 画面が表示されます。これにより、選択セッションが終了し、現在の pickerUri
は機能しなくなります。
ユーザーがさらに写真を選ぶオプションを提供するには、新しい選択セッションを作成し、アプリで pickerUri
を再度表示します。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-29 UTC。
[null,null,["最終更新日 2025-08-29 UTC。"],[[["\u003cp\u003eThis guide explains the user experience within the Google Photos app when selecting media items using the Picker API.\u003c/p\u003e\n"],["\u003cp\u003eUsers initiate the process by accessing the \u003ccode\u003epickerUri\u003c/code\u003e displayed in your app, which opens a photo selection page within Google Photos.\u003c/p\u003e\n"],["\u003cp\u003eUsers can search and select photos from their Google Photos library using various criteria before confirming their choices.\u003c/p\u003e\n"],["\u003cp\u003eAfter selection, users are presented with a "Done" screen, and your app can re-display the \u003ccode\u003epickerUri\u003c/code\u003e to allow for further selections in a new session.\u003c/p\u003e\n"]]],["The core process involves displaying a `pickerUri` (QR code and URL) to users, prompting them to access it. This takes them to Google Photos for photo selection. Users can search using keywords, dates, or locations to find specific photos. Upon selection and pressing \"Done,\" the process ends. Apps can offer to display the `pickerUri` again to initiate a new picking session, to select more items. While the app is polling for the media selection the process has begun.\n"],null,["# Photo picking: what users see\n\nThis guide helps you understand your user's experience when picking media items.\n\nFollowing the [standard Picker API flow](/photos/picker/guides/get-started-picker#the_picker_api_flow),\npicking beings after your app displays the [`pickerUri`](/photos/picker/reference/rest/v1/sessions#PickingSession.FIELDS.picker_uri),\nand while your app is polling for [`mediaItemsSet`](/photos/picker/reference/rest/v1/sessions#PickingSession.FIELDS.media_items_set) to return true.\n\nTo view any of these steps on your own device, check out our [sample app](/photos/picker/samples).\n\nStart the picking session\n-------------------------\n\nAfter successfully creating a session your app should display the `pickerUri` to\nyour users.\n\n- Display the `pickerUri` as both a QR code and a URL.\n- Provide helpful text alongside the `pickerUri`. For example, \"Scan this code to open Google Photos and select your items.\".\n- For devices with limited input capabilities (e.g., kiosks, tablets, smart TVs), check your hardware manufacture's recommendations on text size and QR code width.\n\nSearch and select photos\n------------------------\n\nWhen a user accesses the `pickerUri`, they are taken to a photo selection page\nwithin the Google Photos app.\n\nThis page will always display the most recent photos from your user's Google\nPhotos library. Albums, favorites, and other common photos categories are not\nshow directly. Users can search for photos using various criteria,\nsuch as keywords, dates, locations, and album titles.\n\nIf your app utilizes albums, dates, or other common photos categories, help your\nusers by prompting them to search once they enter the Google Photos app.\n\nFor example, if your asking your users to share a specific album, you could\ninclude the following text on the same page your users connect to Google Photos:\n\"Connect to Google Photos, then search for the album you want to share.\"\n\nAfter searching, the user can select one or more items from the results.\n\nDone screen\n-----------\n\nOnce the user taps the \"Done\" button and completes picking, they will see\nthe \"Done\" screen. This ends the picking session and the current `pickerUri`\nwill no longer work.\n\nTo provide your users the option to select more photos, create a new picking\nsession and display the `pickerUri` again in your app."]]