測試應用程式處理行為變更的方式
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
Wear OS 5 以 Android 14 (API 級別 34) 為建構基礎。準備
適用於 Wear OS 5 的 Wear OS 應用程式,可以處理系統作業
影響 Android 14 所有應用程式的行為變更,以及
針對以 Android 14 為目標版本的應用程式進行變更。
Wear OS 5 的變更影響所有應用程式
以下行為變更會影響
。這些變更會影響在 Wear OS 5 以上版本上執行的所有應用程式。
流量都會傳送到所有國家/地區
隱私資訊主頁
Wear OS 5 開始支援隱私資訊主頁,具備以下功能:
使用者可在集中查看每個應用程式的數據用量。
新手錶只會顯示使用錶面格式的錶面
搭載 Wear OS 5 以上版本的手錶僅支援採用
錶面格式。因此,我們建議您遷移至
使用錶面格式
Wear OS 5 變更會影響指定 Android 14 的應用程式
只有更新目標 SDK 時,應用程式會受到以下變更的影響
升級至 Android 14,即 Wear OS 5 採用的版本。
一律開啟的應用程式可以移至背景
從 Wear OS 5 開始,系統會將持續運作的應用程式移至背景
顯示在微光模式下的螢幕時間過後使用者可以
指定系統逾時設定。
運動錄影應用程式必須宣告前景服務類型
如果應用程式會在符合以下條件的裝置記錄使用者的運動歷程:
搭載 Wear OS 5 以上版本,您必須
在前景服務中指定 health
前景服務類型
叫用 ExerciseClient
。此外,如果您的應用程式可以監控位置資訊
取得相關資訊,您也必須指定 location
前景服務類型
某些腕上裝置可保持解鎖狀態的時間
搭載 Wear OS 5 以上版本的支援裝置,且使用者將手腕關機
然後將裝置從手腕
系統會延長裝置的解鎖時間
反之。
如果您的應用程式需要更高層級的安全性,例如顯示時
機密資料或私人資料—請檢查手腕偵測功能是否已啟用。
可拖曳的內容可能會重疊到系統手勢的啟動點
從 Wear OS 5 開始,系統會處理動作事件手勢
獨立於系統 UI 中使用的手勢操作。
如果應用程式的 UI 含有與系統手勢重疊的大型可拖曳空間
可能需要新增系統手勢排除矩形
次觀看。方法是呼叫 setSystemGestureExclusionRects()
來指示
系統 UI,忽略特定區域的導覽手勢。這與
如何在行動應用程式中處理相衝突的應用程式手勢,以提供
或無邊框 UI 體驗
您可以使用 setSystemGestureExclusionRects()
API 建立系統 UI
以不同方式回應手勢要求舉例來說,系統 UI 可能會顯示
其他 UI 提示 (例如水平列),可確認使用者的意圖。
隱含和待處理意圖的限制
如果您在應用程式中使用資訊方塊,請檢查您的
意圖會受到隱含和待處理意圖的限制影響。
但仍無法關閉部分通知
在搭載 Android 14 的裝置上使用手持版本應用程式
(API 級別 34) 以上版本,使用者可以關閉通知,
無法關閉
不過,在 Wear OS 5 以上版本中,使用者仍無法關閉這類通知。
Android 14 的其他變更
以下是 Android 14 變更最有可能對 Wear OS 造成影響的異動。
應用程式。
影響所有應用程式的 Android 14 變更
Android 14 變更會影響目標 API 級別 34 的應用程式
為您推薦
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[null,null,["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# Test how your app handles behavior changes\n\nWear OS 5 is based on Android 14 (API level 34). When you prepare your\nWear OS app for use on Wear OS 5, handle the system\n[behavior changes that affect all apps in Android 14](/about/versions/14/behavior-changes-all), as well as the\n[changes for apps that target Android 14](/about/versions/14/behavior-changes-14).\n| **Caution:** Before you upload your app to the Play Store, [target Android 14](/training/wearables/versions/5/update-target-sdk) and [configure an emulator](/training/wearables/get-started/creating#configure-emulator) to test your app.\n\nWear OS 5 changes affecting all apps\n------------------------------------\n\nThe following behavior changes affect use cases and libraries that are specific\nto Wear OS. These changes affect all apps that run on Wear OS 5 or higher,\nregardless of target SDK version.\n\n### Privacy dashboard\n\nWear OS 5 adds support for the [privacy dashboard](/training/wearables/principles#privacy-dashboard), which offers\nusers a centralized view of each app's data usage.\n\n### New watches only show watch faces that use Watch Face Format\n\nWatches that launch with Wear OS 5 or higher only support watch faces that use\nthe [Watch Face Format](/training/wearables/wff). For this reason, we recommend that you migrate to\nusing the Watch Face Format.\n\nWear OS 5 changes affecting apps that target Android 14\n-------------------------------------------------------\n\nThe following changes affect your app only if you [update your target SDK\nversion to Android 14](/training/wearables/versions/5/update-target-sdk), the version on which Wear OS 5 is based.\n\n### Always-on apps can move to the background\n\nStarting in Wear OS 5, the [system moves always-on apps to the background](/training/wearables/always-on#background)\nafter they're visible in ambient mode for a certain period of time. Users can\nconfigure the timeout in system settings.\n\n### Exercise-recording apps must declare a foreground service type\n\nIf your app records exercise as part of a user's workout session on devices that\nrun Wear OS 5 or higher, you must\n[specify the `health` foreground service type](/health-and-fitness/guides/health-services/active-data#structure) in the foreground service that\ninvokes [`ExerciseClient`](/reference/kotlin/androidx/health/services/client/ExerciseClient). Additionally, if your app can monitor location\ninformation during the workout session, you must also specify the `location`\nforeground service type.\n\n### Some off-wrist devices stay unlocked longer\n\nOn supported devices that run Wear OS 5 or higher, if the user turns off wrist\ndetection and then takes the device off of their wrist, the\n[system keeps the device unlocked for a longer period of time](/training/wearables/apps/auth-wear#device-unlocked-longer) than it would\notherwise.\n\nIf your app requires a higher level of security---such as when displaying\npotentially sensitive or private data---check whether wrist detection is enabled.\n\n### Draggable content might overlap system gesture activation points\n\nStarting in Wear OS 5, the system treats motion event gestures\nseparately from gesture navigation used in the system's UI.\n\nIf your app's UI includes large draggable spaces that overlap system gesture\nareas, you might need to add system gesture exclusion rectangles for these\nviews. To do so, call [`setSystemGestureExclusionRects()`](/reference/android/view/View#setSystemGestureExclusionRects(java.util.List%3Candroid.graphics.Rect%3E)) to instruct the\nsystem UI to ignore navigation gestures in the given areas. This is similar to\nhow you [handle conflicting app gestures](/develop/ui/views/touch-and-input/gestures/gesturenav#conflicting-gestures) in your mobile app to provide an\nedge-to-edge UI experience.\n\nYou can use the `setSystemGestureExclusionRects()` API to have the system UI\nrespond to gesture requests differently. For example, the system UI might show\nadditional UI hints, like a horizontal bar, to confirm the user's intent.\n\n### Restrictions to implicit and pending intents\n\nIf you use [tiles](/training/wearables/tiles) in your app, check whether your\nintents are affected by the [restrictions to implicit and pending intents](/about/versions/14/behavior-changes-14#safer-intents).\n\n### Some notifications are still non-dismissible\n\nWhen using the handheld version of your app on a device that runs Android 14\n(API level 34) or higher, [users can dismiss notifications](/about/versions/14/behavior-changes-all#non-dismissable-notifications) that, on\nprevious versions, were non-dismissible.\n\nOn Wear OS 5 and higher, however, these notifications are still non-dismissible.\n\nOther changes from Android 14\n-----------------------------\n\nThe following changes from Android 14 are most likely to affect your Wear OS\napp.\n\n### Android 14 changes that affect all apps\n\n- [Schedule exact alarms are denied by default](/about/versions/14/behavior-changes-all#schedule-exact-alarms)\n- [Context-registered broadcasts are queued while apps are cached](/about/versions/14/behavior-changes-all#pending-broadcasts-queued)\n- [Additional reason an app can be placed in the restricted standby\n bucket](/about/versions/14/behavior-changes-all#triggers-to-restricted-bucket)\n\n### Android 14 changes that affect apps targeting API level 34\n\n- [Foreground service types are required](/about/versions/14/behavior-changes-14#fgs-types)\n- [Non-linear font scaling](/about/versions/14/features#non-linear-font-scaling) (only affects view-based UI elements)\n- [Enforcement of `BLUETOOTH_CONNECT` permission in `BluetoothAdapter`](/about/versions/14/behavior-changes-14#enforce-bluetooth_connect)\n- [`JobScheduler` reinforces callback and network behavior](/about/versions/14/behavior-changes-14#jobscheduler-reinforces-behavior)\n- [Runtime-registered broadcasts receivers must be explicitly exported or not\n exported](/about/versions/14/behavior-changes-14#runtime-receivers-exported)\n- [Safer dynamic code loading](/about/versions/14/behavior-changes-14#safer-dynamic-code-loading)\n- [Additional restrictions on starting activities from the background](/about/versions/14/behavior-changes-14#background-activity-restrictions)\n- [User can grant partial access to photos and videos](/about/versions/14/behavior-changes-14#partial-photo-library-access)\n\nRecommended for you\n-------------------\n\n- Note: link text is displayed when JavaScript is off\n- [Privacy changes in Android 10](/about/versions/10/privacy/changes)\n- [Connect to a GATT server {:#connect}](/develop/connectivity/bluetooth/ble/connect-gatt-server)\n- [Communicate in the background](/develop/connectivity/bluetooth/ble/background)"]]