Telefon uygulamanızı kadran itme için yapılandırma
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Standart pazar yerinde, kullanıcının uygulamayla etkileşim kurduğu baskın yöntem telefon uygulamasıdır.
Kadran ayarlama
Kullanıcı telefon uygulamasında bir kadran seçtiğinde, kadranı ayarlamak için sonraki akış iki bölümden oluşur:
Yükleme:MessageClient üzerinden başlatılan Watch Face Push'u kullanarak kadranı yükleyin. Bu adım, telefondan kol saatine MessageClient kullanılarak tetiklenen addWatchFace veya updateWatchFace ile kolayca gerçekleştirilir.
Herhangi bir işlem yapmanız gerekmiyor olabilir. Pazar yeri, etkin kadranı kontrol ediyor olabilir.
Kullanıcı müdahalesi gerekmiyor olabilir. Uygulama, etkin kadranı ayarlamak için gerekli izinlere sahiptir ve bunu doğrudan setWatchFaceAsActive() kullanarak yapabilir.
İzin isteklerinin nasıl kabul edileceği veya uzun basma hareketi ya da tamamlayıcı bir uygulama aracılığıyla saat yüzünün nasıl manuel olarak ayarlanacağı konusunda rehberliğe ihtiyaç duyulabilir.
Yükleme yanıtı
Etkinleştirme aşamasını kolaylaştırmak için Yükleme aşamasında saatten telefona aşağıdaki bilgiler döndürülmelidir:
Yükleme denemesinin sonucu
isWatchFaceActive() işleminin sonucu: Uygulamada etkin kadranın olup olmadığını belirlemek için kullanılır.
setWatchFaceAsActive()'nın daha önce çağrılıp çağrılmadığı. Wear OS uygulaması bu bilgileri yerel olarak izlemeli ve kalıcı hale getirmelidir. Bu API çağrısı yalnızca bir kez kullanılabilir.
Etkinleştirme
Yükleme işleminden sonra yanıt, uygulamada zaten etkin bir kadran olduğunu belirtebilir. Ancak bu durum söz konusu değilse uygulama, saat yüzünü etkin olarak ayarlamak için bir düğme göstermeyi tercih edebilir.
Senaryo 1: Etkin kadranı ayarlama girişimlerinin tümü başarısız oldu
Yüklemeden gelen yanıt, setWatchFaceAsActive()'nın daha önce çağrıldığını gösteriyorsa düğme, telefonda bir eğitim ekranına yönlendirmelidir. Bu ekranda, kullanıcılara istedikleri saat yüzünü manuel olarak ayarlamak için saat yüzüne dokunup basılı tutmaları gerektiği gösterilir.
2. senaryo: Etkin kadranı ayarlamaya çalışın
Telefon, saate gerekli SET_PUSHED_WATCH_FACE_AS_ACTIVE iznini kontrol etmesi talimatını vermelidir:
Kullanıcı izni daha önce verdiyse setWatchFaceAsActive() işlevini çağırarak devam edin.
Kullanıcı izni daha önce reddettiyse kol saati bunu telefona geri bildirmeli. Telefonda, izin ihtiyacını ve iznin nasıl manuel olarak verileceğini açıklayan bir eğitim ekranı gösterilebilir.
İzin daha önce istenmediyse kol saati, telefona kullanıcıyı kol saatinde izinleri kabul etme konusunda yönlendiren eğitici bir an göstermesini söylemeli ve izin istemeye devam etmelidir.
Kullanıcı izin verirse kol saati setWatchFaceAsActive() işlevini çağırmalıdır.
Aksi takdirde kol saati, telefona izin ihtiyacını ve iznin nasıl manuel olarak verileceğini açıklayan bir eğitim ekranı göstermesi talimatını vermelidir.
Bu sayfadaki içerik ve kod örnekleri, İçerik Lisansı sayfasında açıklanan lisanslara tabidir. Java ve OpenJDK, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-08-29 UTC.
[null,null,["Son güncelleme tarihi: 2025-08-29 UTC."],[],[],null,["# Configure your phone app for Watch Face Push\n\nFor the canonical marketplace, the phone app is the predominant way in which\nthe user interacts with the app.\n\nSet a watch face\n----------------\n\nWhen the user selects a watch face in the phone app, there are two parts to the\nsubsequent flow to set the watch face:\n\n1. **Installation:** Install the watch face using Watch Face Push, initiated through `MessageClient`. This step is straightforward, using either `addWatchFace` or `updateWatchFace`, triggered using `MessageClient` from the phone to the watch.\n2. **Activation:** [Set the installed watch face as active](/training/wearables/watch-face-push/wear-os-app#set-watch-face-as-active). This step has several possible paths, depending on the permission state:\n - There may be **no action needed**. The marketplace may already have control of the active watch face.\n - There may be **no user intervention needed** . The app has the necessary permissions to set the active watch face, and can do so directly using `setWatchFaceAsActive()`.\n - There may be **guidance needed**, either as to how to accept permission requests, or how to manually set the watch face using a long-press gesture or through a companion app.\n\nInstallation response\n---------------------\n\nTo facilitate the **Activation** phase, the **Installation** phase should return\nthe following information from the watch to the phone:\n\n- The outcome of the installation attempt\n- The result of `isWatchFaceActive()` - to determine whether the app already has the active watch face.\n- Whether `setWatchFaceAsActive()` has already been called in the past - the Wear OS app should track and persist this information locally. *This API\n call can only be used once.*\n\nActivation\n----------\n\nFollowing the installation, the response may indicate that the app already has\nthe active watch face. However if it does not, then the app may choose to show a\nbutton to **set watch face as active**.\n\n### Scenario 1: All attempts to set the active watch face are exhausted\n\nIf the response from installation indicated that `setWatchFaceAsActive()` had\nalready been called in the past, then the button should lead to an education\nscreen on the phone, showing the user how to touch \\& hold on the watch face to\nmanually set it to the one they want.\n\n### Scenario 2 - Try to set the active watch face\n\nThe phone should instruct the watch to check for the necessary\n`SET_PUSHED_WATCH_FACE_AS_ACTIVE` permission:\n\n- If the user has **already granted it**, proceed to calling setWatchFaceAsActive().\n- If the user has **previously denied the permission**, the watch should communicate this back to the phone, where an education screen can be shown explaining the need for the permission and how to manually grant it.\n- If the **permission has not been requested before**, the watch should\n instruct the phone to show an educational moment guiding the user on how to\n accept permissions on the watch, and the watch should proceed to request the\n permission.\n\n - If the user grants the permission, the watch should then call `setWatchFaceAsActive()`.\n - Otherwise the watch should instruct the phone to show an education screen explaining the need for the permission and how to manually grant it."]]