Learn about the new Picker API and important Library API changes.
Details here.
相片挑選:使用者看到的內容
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
這份指南可協助您瞭解使用者在選擇媒體項目時的體驗。
依照標準 Picker API 流程,選擇會在應用程式顯示 pickerUri
後,以及應用程式輪詢 mediaItemsSet
傳回 true 時開始。
如要在自己的裝置上查看任何步驟,請試用範例應用程式。
開始挑選工作階段
成功建立工作階段後,應用程式應向使用者顯示 pickerUri
。
- 以 QR code 和網址的形式顯示
pickerUri
。
- 請在
pickerUri
旁提供實用的說明文字。例如:「請掃描這段代碼,開啟 Google 相簿並選取相片/影片。」
- 如果是輸入功能受限的裝置 (例如資訊亭、平板電腦、智慧型電視),請查看硬體製造商針對文字大小和 QR code 寬度提供的建議。
搜尋及選取相片
使用者存取 pickerUri
時,系統會將他們帶往 Google 相簿應用程式中的相片選取頁面。
這個頁面會一律顯示使用者 Google 相簿媒體庫中的最新相片。相簿、收藏和其他常見的相片類別不會直接顯示。使用者可以使用各種條件搜尋相片,例如關鍵字、日期、地點和相簿名稱。
如果您的應用程式使用相簿、日期或其他常見的相片類別,請在使用者進入 Google 相簿應用程式後,提示他們進行搜尋,協助使用者。
舉例來說,如果您要求使用者分享特定相簿,可以在使用者連線至 Google 相簿的同一頁面中加入以下文字:「連線至 Google 相簿,然後搜尋要分享的相簿。」
搜尋後,使用者可從搜尋結果中選取一或多個項目。
「完成」畫面
使用者按下「完成」按鈕並完成選擇後,就會看到「完成」畫面。
如要讓使用者選擇選取更多相片,請在應用程式中再次顯示 pickerUri
。如果使用者第二次存取 pickerUri
,系統就會建立新的挑選工作階段。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-02-19 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-02-19 (世界標準時間)。"],[[["This guide explains the user experience within the Google Photos app when selecting media items using the Picker API."],["Users initiate the process by accessing the `pickerUri` displayed in your app, which opens a photo selection page within Google Photos."],["Users can search and select photos from their Google Photos library using various criteria before confirming their choices."],["After selection, users are presented with a \"Done\" screen, and your app can re-display the `pickerUri` to allow for further selections in a new session."]]],["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"]]