بپوشید

برای ساعت‌های هوشمند Wear OS by Google اپلیکیشن بسازید.

این جدول تمام مصنوعات موجود در گروه androidx.wear را فهرست می‌کند.

مصنوع انتشار پایدار کاندیدای انتشار انتشار بتا انتشار آلفا
پوشیدن ۱.۴.۰ - - -
ورودی سایش ۱.۲.۰ - - -
تست ورودی سایش ۱.۲.۰ - - -
سایش مداوم ۱.۱.۰ - - -
تعاملات با تلفن همراه ۱.۱.۰ - - -
تعاملات از راه دور با لباس ۱.۲.۰ - - ۱.۳.۰-آلفا۰۱
این کتابخانه آخرین بار در تاریخ: ۳ ژوئن ۲۰۲۶ به‌روزرسانی شده است.

اعلام وابستگی‌ها

برای افزودن یک وابستگی به Wear، باید مخزن Google Maven را به پروژه خود اضافه کنید. برای اطلاعات بیشتر، مخزن Google's Maven را مطالعه کنید.

وابستگی‌های مربوط به مصنوعات مورد نیاز خود را در فایل build.gradle برای برنامه یا ماژول خود اضافه کنید:

شیار

dependencies {
    implementation "androidx.wear:wear:1.4.0"

    // Add support for wearable specific inputs
    implementation "androidx.wear:wear-input:1.2.0"
    implementation "androidx.wear:wear-input-testing:1.2.0"

    // Use to implement wear ongoing activities
    implementation "androidx.wear:wear-ongoing:1.1.0"

    // Use to implement support for interactions from the Wearables to Phones
    implementation "androidx.wear:wear-phone-interactions:1.1.0"
    // Use to implement support for interactions between the Wearables and Phones
    implementation "androidx.wear:wear-remote-interactions:1.2.0"
}

کاتلین

dependencies {
    implementation("androidx.wear:wear:1.4.0")

    // Add support for wearable specific inputs
    implementation("androidx.wear:wear-input:1.2.0")
    implementation("androidx.wear:wear-input-testing:1.2.0")

    // Use to implement wear ongoing activities
    implementation("androidx.wear:wear-ongoing:1.1.0")

    // Use to implement support for interactions from the Wearables to Phones
    implementation("androidx.wear:wear-phone-interactions:1.1.0")
    // Use to implement support for interactions between the Wearables and Phones
    implementation("androidx.wear:wear-remote-interactions:1.2.0")
}

برای اطلاعات بیشتر در مورد وابستگی‌ها، به «افزودن وابستگی‌های ساخت» مراجعه کنید.

بازخورد

بازخورد شما به بهبود Jetpack کمک می‌کند. اگر مشکلات جدیدی کشف کردید یا ایده‌هایی برای بهبود این کتابخانه دارید، به ما اطلاع دهید. لطفاً قبل از ایجاد یک کتابخانه جدید، نگاهی به مشکلات موجود در این کتابخانه بیندازید. می‌توانید با کلیک بر روی دکمه ستاره، رأی خود را به یک مشکل موجود اضافه کنید.

ایجاد یک مسئله جدید

برای اطلاعات بیشتر به مستندات ردیاب مشکل مراجعه کنید.

هسته سایشی

نسخه ۱.۱

نسخه ۱.۱.۰

۳ ژوئن ۲۰۲۶

androidx.wear:wear-core:1.1.0 منتشر شد. نسخه ۱.۱.۰ شامل این کامیت‌ها است.

ویژگی‌های اصلی نسخه ۱.۱.۰: * اضافه شدن CINNAMON_BUN در WearApiVersionHelper برای بررسی سازگاری API با SDK ۳۷.

نسخه ۱.۱.۰-rc01

۱۹ مه ۲۰۲۶

androidx.wear:wear-core:1.1.0-rc01 بدون هیچ تغییری نسبت به نسخه قبلی منتشر شده است. نسخه 1.1.0-rc01 شامل این کامیت‌ها است.

نسخه ۱.۱.۰-بتا۰۱

۶ مه ۲۰۲۶

androidx.wear:wear-core:1.1.0-beta01 منتشر شد. نسخه 1.1.0-beta01 شامل این کامیت‌ها است.

تغییرات API

  • CINNAMON_BUN در WearApiVersionHelper برای بررسی سازگاری API با SDK 37 اضافه شد.

نسخه ۱.۱.۰-آلفا۰۲

۸ آوریل ۲۰۲۶

androidx.wear:wear-core:1.1.0-alpha02 منتشر شد. نسخه 1.1.0-alpha02 شامل این کامیت‌ها است.

ویژگی‌های جدید

  • اضافه کردن VersionCodes جدید برای WearApiVersionHelper ( I86bc1 ، b/487264133 )

نسخه ۱.۱.۰-آلفا-۰۱

۲۵ مارس ۲۰۲۶

androidx.wear:wear-core:1.1.0-alpha-01 منتشر شد. نسخه 1.1.0-alpha-01 شامل این کامیت‌ها است.

تغییرات API

  • CINNAMON_BUN (SDK 37) در WearApiVersionHelper اضافه شد. ( Id1ee0 ، b/487264133 )

نسخه ۱.۰

نسخه ۱.۰.۰

۱۷ دسامبر ۲۰۲۵

androidx.wear:wear-core:1.0.0 منتشر شد. نسخه ۱.۰.۰ شامل این کامیت‌ها است.

ویژگی‌های اصلی نسخه ۱.۰.۰:

  • WearApiVersionHelper برای کمک به بررسی سازگاری API در زمان اجرا روی Wear اضافه شد. کلاینت‌ها می‌توانند از این کلاس کمکی استاتیک و متد ارائه شده (#isApiVersionAtLeast(VERSION)) برای بررسی سازگاری استفاده کنند.

نسخه ۱.۰.۰-rc01

۸ اکتبر ۲۰۲۵

androidx.wear:wear-core:1.0.0-rc01 بدون هیچ تغییری منتشر شده است. نسخه 1.0.0-rc01 شامل این کامیت‌ها است.

نسخه ۱.۰.۰-بتا۰۲

۱۰ سپتامبر ۲۰۲۵

androidx.wear:wear-core:1.0.0-beta02 منتشر شد. نسخه 1.0.0-beta02 شامل این کامیت‌ها است.

رفع اشکالات

  • هنگام بررسی APIهای جدیدتر، از اجرای WearApiVersionHelper روی دستگاه‌های قدیمی‌تر جلوگیری کنید.

نسخه ۱.۰.۰-بتا۰۱

۳۰ ژوئیه ۲۰۲۵

androidx.wear:wear-core:1.0.0-beta01 بدون هیچ تغییر قابل توجهی از آخرین نسخه آلفا منتشر شده است. نسخه 1.0.0-beta01 شامل این کامیت‌ها است.

نسخه ۱.۰.۰-آلفا۰۲

۱۶ ژوئیه ۲۰۲۵

androidx.wear:wear-core:1.0.0-alpha02 منتشر شد. نسخه 1.0.0-alpha02 شامل این کامیت‌ها است.

تغییرات API

  • WearApiVersionHelper را به‌روزرسانی می‌کند تا VIC/Baklava ( I4676d ) را شامل شود.

رفع اشکالات

  • این کتابخانه اکنون از حاشیه‌نویسی‌های nullness از نوع JSpecify استفاده می‌کند که از نوع type-use هستند. توسعه‌دهندگان Kotlin باید از آرگومان‌های کامپایلر زیر برای اعمال استفاده صحیح استفاده کنند: -Xjspecify-annotations=strict , -Xtype-enhancement-improvements-strict-mode ( Icbfb9 , b/326456246 )

نسخه ۱.۰.۰-آلفا۰۱

۲۹ مه ۲۰۲۴

androidx.wear:wear-core:1.0.0-alpha01 منتشر شد. نسخه 1.0.0-alpha01 شامل این کامیت‌ها است.

تغییرات API

  • یک کلاس جدید WearApiVersionhelper برای کمک به بررسی سازگاری API در زمان اجرا روی Wear اضافه شده است. کلاینت‌ها می‌توانند از این کلاس کمکی استاتیک و متد ارائه شده ( #isApiVersionAtLeast(VERSION) ) برای بررسی سازگاری استفاده کنند.

بپوشید

نسخه ۱.۴

نسخه ۱.۴.۰

۲۵ فوریه ۲۰۲۶

androidx.wear:wear:1.4.0 منتشر شد. نسخه ۱.۴.۰ شامل این کامیت‌ها است.

تغییرات مهم از زمان ۱.۳.۰:

  • رفع اشکال مربوط به قرار گرفتن عمودی آیکون ConfirmationOverlay در مرکز، زمانی که پیامی وجود ندارد. I496d8

نسخه ۱.۴.۰-rc01

۲۸ ژانویه ۲۰۲۶

androidx.wear:wear:1.4.0-rc01 منتشر شد. نسخه 1.4.0-rc01 شامل این کامیت‌ها است.

  • هیچ تغییر جدیدی بین نسخه‌های بتا۰۱ و آرسی۰۱ وجود ندارد.

نسخه ۱.۴.۰-بتا۰۱

۱۷ دسامبر ۲۰۲۵

androidx.wear:wear:1.4.0-beta01 منتشر شد. نسخه 1.4.0-beta01 شامل این کامیت‌ها است.

  • از زمان انتشار نسخه آلفای قبلی، هیچ تغییر قابل توجه جدیدی وجود ندارد.

نسخه ۱.۴.۰-آلفا۰۲

۱۶ ژوئیه ۲۰۲۵

androidx.wear:wear:1.4.0-alpha02 منتشر شد. نسخه 1.4.0-alpha02 شامل این کامیت‌ها است.

رفع اشکالات

  • این کتابخانه اکنون از حاشیه‌نویسی‌های nullness از نوع JSpecify استفاده می‌کند که از نوع type-use هستند. توسعه‌دهندگان Kotlin باید از آرگومان‌های کامپایلر زیر برای اعمال استفاده صحیح استفاده کنند: -Xjspecify-annotations=strict ، -Xtype-enhancement-improvements-strict-mode ( If4b1a , b/326456246 )

نسخه ۱.۴.۰-آلفا۰۱

۱۵ نوامبر ۲۰۲۳

androidx.wear:wear:1.4.0-alpha01 منتشر شد. نسخه 1.4.0-alpha01 شامل این کامیت‌ها است.

رفع اشکالات

  • وقتی پیامی وجود ندارد، آیکون ConfirmationOverlay به صورت عمودی در وسط قرار دهید. ( I496d8 )

نسخه ۱.۳

نسخه ۱.۳.۰

۹ آگوست ۲۰۲۳

androidx.wear:wear:1.3.0 بدون هیچ تغییری از زمان 1.3.0-rc01 منتشر شده است. نسخه 1.3.0 شامل این کامیت‌ها است.

تغییرات مهم از زمان ۱.۲.۰

  • AmbientModeSupport به استفاده از LifecycleObserver منتقل کنید. AmbientModeSupport را به نفع کلاس‌های جدید آگاه از چرخه حیات منسوخ کنید.
  • به‌روزرسانی ConfirmationOverlay با آیکون‌ها/طرح‌بندی، فونت‌ها و معیارهای فونت جدید
  • SwipeDismissTransitionHelper به‌روزرسانی شد تا به جای View دوم، از یک پس‌زمینه‌ی قابل ترسیم استفاده کند تا خطاها هنگام استفاده از FragmentContainerView اصلاح کند.
  • انیمیشن SwipeDismissFrameLayout به‌روزرسانی شد تا با پلتفرم Wear و پیاده‌سازی‌های Wear Compose سازگار باشد.
  • رفع اشکال SwipeDismissFrameLayout برای جلوگیری از حذف تصادفی قطعات با یک حرکت عمودی
  • ArcLayout اکنون از وزن‌های بسط‌یافته پشتیبانی می‌کند که به روشی مشابه وزن‌های طرح‌بندی معمولی عمل می‌کنند.
  • پشتیبانی از layoutDirection در ArcLayout

نسخه ۱.۳.۰-rc01

۲۱ ژوئن ۲۰۲۳

androidx.wear:wear:1.3.0-rc01 بدون هیچ تغییری از زمان انتشار 1.3.0-beta01 منتشر شده است. نسخه ۱.۳.۰-rc01 شامل این کامیت‌ها است.

نسخه ۱.۳.۰-بتا۰۱

۷ ژوئن ۲۰۲۳

androidx.wear:wear:1.3.0-beta01 منتشر شد. نسخه 1.3.0-beta01 شامل این کامیت‌ها است.

تغییرات API

  • AmbientLifecycleObserver پس از دریافت بازخورد به‌روزرسانی شد. AmbientLifecycleObserverInterface به AmbientLifecycleObserver تغییر نام داده است و می‌توان با فراخوانی AmbientLifecycleObserver(...) یک نمونه از آن را به دست آورد. isAmbient به جای یک متد، به یک فیلد تبدیل شده است. ( I84b4f )

رفع اشکالات

  • اضافه کردن بررسی‌های null برای مدیریت مواردی که نمای والد هنگام تنظیم مجدد آلفا و ترجمه در SwipeToDismiss ، null است. ( Ib0ec7 )

نسخه ۱.۳.۰-آلفا۰۵

۱۹ آوریل ۲۰۲۳

androidx.wear:wear:1.3.0-alpha05 منتشر شد. نسخه 1.3.0-alpha05 شامل این کامیت‌ها است.

تغییرات API

  • AmbientModeSupport به LifecycleObserver منتقل کنید. AmbientModeSupport به نفع کلاس‌های جدید lifecycle-aware منسوخ کنید. ( I1593b )

رفع اشکالات

  • به‌روزرسانی رویکرد اسکریم پس‌زمینه SwipeDismissTransitionHelper برای استفاده از drawables به جای افزودن view برای رفع خطاها هنگام استفاده از FragmentContainerView ( I851cd )

نسخه ۱.۳.۰-آلفا۰۴

۲۵ ژانویه ۲۰۲۳

androidx.wear:wear:1.3.0-alpha04 منتشر شد. نسخه 1.3.0-alpha04 شامل این کامیت‌ها است.

رفع اشکالات

  • ما انیمیشن موجود در SwipeDismissFrameLayout را به‌روزرسانی کرده‌ایم تا با پلتفرم Wear و پیاده‌سازی‌های Wear Compose سازگار باشد. ( I7261b )

نسخه ۱.۳.۰-آلفا۰۳

۲۴ آگوست ۲۰۲۲

androidx.wear:wear:1.3.0-alpha03 منتشر شد. نسخه 1.3.0-alpha03 شامل این کامیت‌ها است.

ویژگی‌های جدید

  • ArcLayout اکنون از وزن‌های بسطی پشتیبانی می‌کند که به روشی مشابه وزن‌های Layout معمولی عمل می‌کنند. این بدان معناست که می‌توانید اندازه نسبی عناصر فرزند را بدون نیاز به محاسبه مستقیم زوایای آنها مشخص کنید. ما همچنین یک MaxAngleDegrees با بهترین تلاش اضافه کرده‌ایم که هنگام بسط عناصر فرزند با وزن رعایت می‌شود. به عنوان مثال، می‌توانید کمان را با چندین فرزند با وزن تا ۹۰ درجه نگه دارید، این کار همچنین فضای اشغال شده توسط هر عنصر غیر بسطی را در نظر می‌گیرد.

تغییرات API

  • ما به ArcLayout.LayoutParams وزن اضافه کرده‌ایم که به یک ویجت اجازه می‌دهد تا فضای موجود را پر کند، اگر بیش از یک ویجت وجود داشته باشد، سهم آنها از فضای موجود متناسب با وزن آنها است. علاوه بر این ArcLayout.setMaxAngleDegrees را اضافه کرده‌ایم تا بتوانید مثلاً گسترش را در ۹۰ درجه محدود کنید (توجه داشته باشید که این بر طرح‌بندی هیچ ویجت فرزند با اندازه ثابت تأثیر نمی‌گذارد). در نهایت، ArcLayout.Widget اکنون دارای setSweepAngleDegrees است که به ArcLayout اجازه می‌دهد تا یک ویجت را با وزن غیر صفر از اندازه آن مطلع کند. ( I75f24 )
  • به‌روزرسانی قابلیت تهی‌سازی setColorFilter ( I99ddf ، b/236498063 )

نسخه ۱.۳.۰-آلفا۰۲

۲۳ فوریه ۲۰۲۲

androidx.wear:wear:1.3.0-alpha02 منتشر شد. نسخه 1.3.0-alpha02 شامل این کامیت‌ها است.

ویژگی‌های جدید

  • پشتیبانی از layoutDirection در ArcLayout ( I14d49 )
  • پیام توصیف محتوای بهبود یافته برای ConfirmationOverlay ( I0fdf8 )
  • به‌روزرسانی ConfirmationOverlay با آیکون‌ها/طرح‌بندی جدید. ( If5b54 )

رفع اشکالات

  • قوانین ProGuard برای اطمینان از حفظ کدهای مربوط به محیط اضافه شد ( Idaa10 )
  • با استفاده از یک تابع جابجایی عمودی ( idb6d8 ) از حذف تصادفی قطعات در SwipeDismissFrameLayout جلوگیری کنید.
  • رفع مشکل ConfirmationOverlay وقتی که هیچ پیامی ندارد ( I63e6f )

مشارکت خارجی

  • دائه گیو لی (سامسونگ) - با استفاده از یک حرکت عمودی، از حذف تصادفی قطعات در SwipeDismissFrameLayout جلوگیری کنید ( Idb6d8 )

نسخه ۱.۳.۰-آلفا۰۱

۲۹ سپتامبر ۲۰۲۱

androidx.wear:wear:1.3.0-alpha01 منتشر شد. نسخه 1.3.0-alpha01 شامل این کامیت‌ها است.

رفع اشکالات

  • اکنون ConfirmationOverlay آیکون را به سمت بالا هل می‌دهد تا پیام‌های طولانی‌تر را در خود جای دهد، بدون اینکه پیام وارد قاب دستگاه (یا خارج از صفحه) شود. ( I54bff )

نسخه ۱.۲

نسخه ۱.۲.۰

۱۵ سپتامبر ۲۰۲۱

androidx.wear:wear:1.2.0 منتشر شد. نسخه ۱.۲.۰ شامل این کامیت‌ها است.

تغییرات مهم از زمان ۱.۱.۰

  • کامپوننت CurvedText برای نوشتن آسان متن منحنی با پیروی از انحنای بزرگترین دایره‌ای که می‌توان در نما حک کرد، اضافه شد. یک مثال کاربردی:

    <androidx.wear.widget.CurvedText
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="example curved text"
            app:anchorAngleDegrees="180"
            app:anchorPosition="center"
            app:clockwise="false"
            style="@android:style/TextAppearance.Large"
    />
    

    نمونه‌ای از متن منحنی در اندروید ویر

  • محفظه ArcLayout برای چیدمان عناصر فرزند آن به صورت یک به یک روی یک کمان در جهت عقربه‌های ساعت یا خلاف جهت عقربه‌های ساعت اضافه شد. فرزندان آن می‌توانند ویجت استاندارد اندروید یا ویجت‌های "منحنی" باشند که رابط ArcLayout.Widget را پیاده‌سازی می‌کنند. ( I536da ) یک مثال کاربردی:

    <androidx.wear.widget.ArcLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:anchorPosition="center">
          <ImageView
                  android:layout_width="20dp"
                  android:layout_height="20dp"
                  android:src="@drawable/ic_launcher"
          />
          <androidx.wear.widget.CurvedText
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:text="Curved Text"
                  style="@android:style/TextAppearance.Small"
                  android:padding="2dp"
           />
      </androidx.wear.widget.WearArcLayout>
    

    نمونه‌ای از متن قوس‌دار در اندروید ویر

  • یک کانتینر طرح‌بندی جدید به نام DismissibleFrameLayout اضافه شده است که دکمه‌های رد کردن با دکمه برگشت و/یا کشیدن برای رد کردن را که برای استفاده در یک فعالیت در نظر گرفته شده است، مدیریت می‌کند. حداقل یک شنونده باید برای انجام عمل رد کردن اضافه شود. یک شنونده معمولاً یک نمای حاوی یا یک قطعه را از فعالیت فعلی حذف می‌کند. setSwipeDismissible(boolean) و setBackButtonDismissible(boolean) برای کنترل مستقیم ویژگی‌ها ارائه شده‌اند. این طرح‌بندی جدید قرار است جایگزین SwipeDismissFrameLayout موجود شود.

  • پشتیبانی از قابلیت «از سرگیری خودکار» فعالیت (Activity) در کلاس AmbientModeSupport، زمانی که دستگاه از حالت محیطی خارج می‌شود، اضافه شد. این قابلیت قبلاً در کلاس منسوخ‌شده‌ی WearableActivity از WearableSupportLibrary موجود بود. ( I336ab )

  • کلاس WearableCalendarContract از کتابخانه پشتیبانی Wearable منتقل شده است. این API زیرمجموعه‌ای از داده‌های موجود از طریق CalendarContract را ارائه می‌دهد، اما به طور خودکار با دستگاه‌های پوشیدنی همگام‌سازی می‌شود. ( I6f2d7 )

  • یک API WearTypeHelper جدید در androidx.wear.utils اضافه شد تا مشخص شود که آیا دستگاه پوشیدنی داده شده برای چین است یا خیر. ( Ib01a9 )

  • ویژگی‌های دسترسی به androidx.wear.widget.ConfirmationOverlay اضافه شد که در صورت تنظیم و به دنبال آن توضیحات انیمیشن، پیام‌ها را با صدای بلند می‌خواند. ( I524dd )

  • اشکالی که باعث می‌شد در صورت عدم ارائه پیام، ConfirmationActivity از کار بیفتد، برطرف شد. ( Ie6055 )

  • اشکالی که باعث می‌شد پیمایش افقی RecyclerViews باعث شود WearableDrawerLayout تمام تعاملات را زیر نظر بگیرد، برطرف شد. ( I24c7f )

نسخه ۱.۲.۰-rc01

۱ سپتامبر ۲۰۲۱

androidx.wear:wear:1.2.0-rc01 بدون هیچ تغییری از آخرین نسخه بتا منتشر شده است. نسخه 1.2.0-rc01 شامل این کامیت‌ها است.

نسخه ۱.۲.۰-بتا۰۱

۱۸ آگوست ۲۰۲۱

androidx.wear:wear:1.2.0-beta01 منتشر شد. نسخه 1.2.0-beta01 شامل این کامیت‌ها است.

رفع اشکالات

  • رفع اشکالی که باعث می‌شد در صورت عدم ارائه پیام، ConfirmationActivity از کار بیفتد. ( Ie6055 )

نسخه ۱.۲.۰-آلفا۱۳

۴ آگوست ۲۰۲۱

androidx.wear:wear:1.2.0-alpha13 منتشر شد. نسخه 1.2.0-alpha13 شامل این کامیت‌ها است.

تغییرات API

  • نام فایل WearTypeHelper.isChinaDevice به WearTypeHelper.isChinaBuild ( I47302 ) تغییر یافت.

رفع اشکالات

  • ما ویژگی‌های دسترسی‌پذیری را به androidx.wear.widget.ConfirmationOverlay اضافه کرده‌ایم که در صورت تنظیم و به دنبال آن توضیحات انیمیشن، پیام‌ها را با صدای بلند می‌خواند. ( I524dd )

نسخه ۱.۲.۰-آلفا۱۲

۲۱ ژوئیه ۲۰۲۱

androidx.wear:wear:1.2.0-alpha12 منتشر شد. نسخه 1.2.0-alpha12 شامل این کامیت‌ها است.

تغییرات API

  • ما یک API WearTypeHelper جدید در androidx.wear.utils اضافه کرده‌ایم تا مشخص کند که آیا دستگاه پوشیدنی داده شده برای چین است یا خیر ( Ib01a9 )

نسخه ۱.۲.۰-آلفا۱۱

۳۰ ژوئن ۲۰۲۱

androidx.wear:wear:1.2.0-alpha11 منتشر شد. نسخه 1.2.0-alpha11 شامل این کامیت‌ها است.

رفع اشکالات

  • اشکالی که باعث می‌شد پیمایش افقی RecyclerViews باعث شود WearableDrawerLayout تمام تعاملات را زیر نظر بگیرد، برطرف شد. ( I24c7f )

نسخه ۱.۲.۰-آلفا۱۰

۲ ژوئن ۲۰۲۱

androidx.wear:wear:1.2.0-alpha10 منتشر شد. نسخه 1.2.0-alpha10 شامل این کامیت‌ها است.

ویژگی‌های جدید

  • آلفا۱۰ پشتیبانی از دسترسی‌پذیری را در Curved Text و ArcLayout بهبود می‌بخشد. همچنین تغییر نام جزئی در DismissibleFrameLayout اضافه شده است تا به شفاف‌سازی API کمک کند.

تغییرات API

  • ما متدهای زیر را در DismissibleFrameLayout ( Ib195e ) تغییر نام داده‌ایم:
    • Callback#onDismissed -> Callback#onDismissedFinished
    • isSwipeDismissible -> isDismissableBySwipe
    • isBackButtonDismissible -> isDismissableByBackButton
  • ما متدهای زیر را نهایی کرده‌ایم ( Ib195e ):
    • setBackButtonDismissible
    • setSwipeDismissible
    • registerCallback
    • unregisterCallback

رفع اشکالات

  • از محتوای CurvedTextView در Talkback استفاده کنید. ( I05798 )
  • دسترسی بهتر برای نماهای معمولی در ArcLayout. ( I4418d )

نسخه ۱.۲.۰-آلفا۰۹

۱۸ مه ۲۰۲۱

androidx.wear:wear:1.2.0-alpha09 منتشر شد. نسخه 1.2.0-alpha09 شامل این کامیت‌ها است.

تغییرات API

  • یک تابع جدید CurvedTextView.setTypeface() (مشابه تابع TextView ) برای تنظیم فونت متن و سبک پررنگ/ایتالیک اضافه شد. ( I4653c )
  • نام WearArcLayout به ArcLayout ، WearCurvedText را به CurvedText و WearArcLayout.ArcLayoutWidget را به ArcLayout.Widget تغییر داد. ( I6e5ce )
    • در ArcLayout.Widget ، getThicknessPx به getThickness تغییر نام داد.
    • ثابت‌های ترازبندی عمودی در ArcLayout.LayoutParams اکنون با VERTICAL_ALIGN_ (به جای VALIGN_ قبلی) نامگذاری می‌شوند.
  • در CurvedTextView ، متدهای setMinSweepDegrees و setMaxSweepDegrees با setSweepRangeDegrees ( I7a9d9 ) جایگزین شدند.

نسخه ۱.۲.۰-آلفا۰۸

۵ مه ۲۰۲۱

androidx.wear:wear:1.2.0-alpha08 منتشر شد. نسخه 1.2.0-alpha08 شامل این کامیت‌ها است.

تغییرات API

  • برای بهبود وضوح کد، حاشیه‌نویسی‌های @FloatRange را به برخی از پارامترهای زاویه و انواع برگشتی اضافه کردیم. ( I430dd )
  • در رابط WearArcLayout.ArcLayoutWidget ، متد insideClickArea اکنون isPointInsideClickArea نامیده می‌شود. ( Ia7307 )

نسخه ۱.۲.۰-آلفا۰۷

۲۴ مارس ۲۰۲۱

androidx.wear:wear:1.2.0-alpha07 منتشر شد. نسخه 1.2.0-alpha07 شامل این کامیت‌ها است.

رفع اشکالات

  • رفع خطاهای مربوط به المان‌های فرزند غیر خمیده درون WearArcLayout که ناشی از استفاده از اندازه صفحه نمایش با ارتفاع بزرگتر از عرض بود. این المان‌های فرزند غیر خمیده اکنون به درستی درون یک کمان در همه انواع صفحه نمایش قرار می‌گیرند.

نسخه ۱.۲.۰-alpha06

۲۷ ژانویه ۲۰۲۱

androidx.wear:wear:1.2.0-alpha06 منتشر شد. نسخه 1.2.0-alpha06 شامل این کامیت‌ها است.

تغییرات API

  • کتابخانه‌ی Ongoing Activities را به یک زیرکتابخانه‌ی جدید به نام wear-ongoing منتقل کنید. کلاس‌ها اکنون در پکیج androidx.wear.ongoing قرار دارند (قبلاً androidx.wear.ongoingactivities بود) ( I7c029 )
  • کلاس WearableCalendarContract را از کتابخانه پشتیبانی Wearable به AndroidX منتقل کنید. این API زیرمجموعه‌ای از داده‌های موجود از طریق CalendarContract را ارائه می‌دهد، اما به طور خودکار با دستگاه‌های پوشیدنی همگام‌سازی می‌شود. ( I6f2d7 )

رفع اشکالات

  • قابلیت رد کردن دکمه بازگشت را به طور پیش‌فرض در Dismissible FrameLayout غیرفعال کنید، زیرا کشیدن انگشت برای رد کردن همچنان روش اصلی برای بازگشت به حالت تمام صفحه در دستگاه‌های پوشیدنی است ( Ic24e3 )
  • رفع برخی مشکلات مربوط به مدیریت قابلیت مشاهده فرزندان در WearArcLayout ( Icf912 )

نسخه ۱.۲.۰-آلفا۰۵

۱۳ ژانویه ۲۰۲۱

androidx.wear:wear:1.2.0-alpha05 منتشر شد. نسخه 1.2.0-alpha05 شامل این کامیت‌ها است.

رفع اشکالات

  • فایل javadoc کلاس AmbientModeSupport را به‌روزرسانی کنید تا قطعه کدهای نمونه‌ای برای نمایش بهتر کاربرد عمومی این کلاس ارائه دهد.

نسخه ۱.۲.۰-آلفا۰۴

۱۶ دسامبر ۲۰۲۰

androidx.wear:wear:1.2.0-alpha04 منتشر شد. نسخه 1.2.0-alpha04 شامل این کامیت‌ها است.

تغییرات API

  • پشتیبانی از قابلیت «از سرگیری خودکار» فعالیت (Activity) در کلاس AmbientModeSupport، زمانی که دستگاه از حالت محیطی خارج می‌شود، اضافه شد. این قابلیت قبلاً در کلاس منسوخ‌شده‌ی WearableActivity از WearableSupportLibrary موجود بود. ( I336ab )
  • فعالیت مداوم
    • اکنون می‌توان هنگام ایجاد یک OngoingActivity، دسته‌بندی را تنظیم کرد، مثلاً OngoingActivitiy.Builder.getCategory(String)
    • OngoingActivityData اکنون دارای یک مهر زمانی است که نشان می‌دهد OngoingActivity چه زمانی ساخته شده است - OngoingActivityData.getTimestamp()
    • ( I91cb4 )
  • پشتیبانی از تنظیم حاشیه برای فرزندان WearArcLayout با تغییر پارامترهای طرح‌بندی به منظور بسط MarginLayoutParams اضافه شده است، یعنی WearArcLayout.LayoutParams از android.view.ViewGroup.MarginLayoutParams بسط می‌یابد. ( I2cd88 )
  • نوع لنگر پیش‌فرض WearCurvedTextView را به WearArcLayout.ANCHOR_CENTER تغییر دهید (قبلاً WearArcLayout.ANCHOR_START بود). این کار ارتباط بین طرح‌بندی قوس و متن منحنی را ساده می‌کند، زیرا متن منحنی به طور پیش‌فرض خود را در مرکز x در بالا رسم می‌کند و طرح‌بندی قوس والد می‌تواند آن را به جایی که نیاز دارد بچرخاند ( I105ff ).

نسخه ۱.۲.۰-آلفا۰۳

۲ دسامبر ۲۰۲۰

androidx.wear:wear:1.2.0-alpha03 منتشر شد. نسخه 1.2.0-alpha03 شامل این کامیت‌ها است.

ویژگی‌های جدید

یک کانتینر طرح‌بندی جدید DismissibleFrameLayout، که دکمه‌ی برگشت و/یا کشیدن برای رد کردن را مدیریت می‌کند، برای استفاده در یک فعالیت در نظر گرفته شده است. حداقل یک شنونده باید اضافه شود تا روی یک عمل رد کردن عمل کند. یک شنونده معمولاً یک نمای حاوی یا یک قطعه را از فعالیت فعلی حذف می‌کند. setSwipeDismissible(boolean) و setBackButtonDismissible(boolean) برای کنترل مستقیم بر ویژگی‌ها ارائه شده‌اند. این طرح‌بندی جدید قرار است جایگزین SwipeDismissFrameLayout موجود شود.

ویجت‌های Curved اکنون رویدادهای لمسی را مدیریت می‌کنند. ویجت‌های معمولی درون WearArcLayout تمام رویدادهای لمسی را که به فضای مختصات آنها نگاشت شده‌اند، دریافت می‌کنند. WearCurvedTextView (چه درون WearArcLayout و چه خارج از آن) می‌تواند کنترل‌کننده‌های onClick و onLongClick را تنظیم کند.

کلاس‌های فعالیت‌های جاری اکنون به جای استفاده از serialization/deserialization سفارشی، VersionedParcelables هستند. آیکون استاتیک و هدف لمسی اکنون الزامی هستند.

تغییرات API

  • ویژگی "sweepDegrees" برای WearCurvedTextView به minSweepDegrees و maxSweepDegrees تفکیک شده است تا طرح‌بندی انعطاف‌پذیرتری از این ویجت ارائه دهد.

نسخه ۱.۲.۰-آلفا۰۲

۱۱ نوامبر ۲۰۲۰

androidx.wear:wear:1.2.0-alpha02 منتشر شد. نسخه 1.2.0-alpha02 شامل این کامیت‌ها است.

این نسخه برای اولین بار یک «API فعالیت‌های در حال انجام» جدید اضافه می‌کند. این API می‌تواند توسط توسعه‌دهندگان برای نشان دادن اینکه یک فعالیت طولانی مدت، مانند تمرین تناسب اندام یا یک جلسه پخش رسانه، در حال انجام است، استفاده شود. این به توسعه‌دهندگان اجازه می‌دهد تا به‌روزرسانی‌های وضعیت دوره‌ای مانند «مسافت و زمان دویدن» یا «آهنگ در حال پخش فعلی» را برای نمایش در صفحه ساعت یا در لانچر برنامه ارائه دهند. این قابلیت برای دستگاه‌های آینده با قابلیت فعالیت در حال انجام فعال شده است.

تغییرات API

  • API جدید برای فعالیت‌های جاری، این قابلیت روی «دستگاه‌های پشتیبانی نشده» غیرفعال است. ( I69a31 )

نسخه ۱.۲.۰-آلفا۰۱

۲۸ اکتبر ۲۰۲۰

androidx.wear:wear:1.2.0-alpha01 منتشر شد. نسخه 1.2.0-alpha01 شامل این کامیت‌ها است.

ویژگی‌های جدید

  • کامپوننت WearCurvedTextView برای نوشتن آسان متن منحنی با پیروی از انحنای بزرگترین دایره‌ای که می‌تواند در نما حک شود، اضافه شد. یک مثال کاربردی:
<androidx.wear.widget.WearCurvedTextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="example curved text"
        app:anchorAngleDegrees="180"
        app:anchorPosition="center"
        app:clockwise="false"
        style="@android:style/TextAppearance.Large"
/>

نمونه‌ای از متن منحنی در اندروید ویر

  • محفظه WearArcLayout برای چیدمان عناصر فرزند آن به صورت تک تک روی یک کمان در جهت عقربه‌های ساعت یا خلاف جهت عقربه‌های ساعت اضافه شد. فرزندان آن می‌توانند ویجت استاندارد اندروید یا ویجت‌های "منحنی" باشند که رابط ArcLayoutWidget آن را پیاده‌سازی می‌کنند. یک مثال کاربردی:
<androidx.wear.widget.WearArcLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:anchorPosition="center">
      <ImageView
              android:layout_width="20dp"
              android:layout_height="20dp"
              android:src="@drawable/ic_launcher"
      />
      <androidx.wear.widget.WearCurvedTextView
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:text="Curved Text"
              style="@android:style/TextAppearance.Small"
              android:padding="2dp"
       />
  </androidx.wear.widget.WearArcLayout>

نمونه‌ای از متن قوس‌دار در اندروید ویر

( آی۵۳۶دا )

نسخه ۱.۱

نسخه ۱.۱.۰

۱۴ اکتبر ۲۰۲۰

androidx.wear:wear:1.1.0 منتشر شد. نسخه ۱.۱.۰ شامل این کامیت‌ها است.

تغییرات عمده از زمان ۱.۰.۰

  • پیشوند layout_ به ویژگی boxedEdges (که اکنون layout_BoxedEdges ) برای BoxInsetLayout اضافه شد تا با قرارداد نامگذاری اندروید مطابقت داشته باشد. این کار خطای linter را در اندروید استودیو برای این ویژگی‌ها حذف می‌کند. ( I4272f )
  • گزینه EXTRA_ANIMATION_DURATION_MILLIS به ConfirmationActivity اضافه شد تا مدت زمان نمایش کادر محاوره‌ای تأیید را در نظر بگیرد. ( adb83ce ، b/143356547 )
  • WearableActionDrawView به‌روزرسانی شد تا باد شدن کشوی اکشن را تا اولین باز شدن کشو به تأخیر بیندازد. ( I01026 ، b/163870541 )

نسخه ۱.۱.۰-rc03

۲ سپتامبر ۲۰۲۰

androidx.wear:wear:1.1.0-rc03 منتشر شد. نسخه 1.1.0-rc03 شامل این کامیت‌ها است.

رفع اشکالات

  • مشکل عدم نمایش محتوا در Action Drawer هنگام باز شدن برطرف شد. ( I01026 ، b/163870541 )

نسخه ۱.۱.۰-rc02

۲۴ ژوئن ۲۰۲۰

androidx.wear:wear:1.1.0-rc02 منتشر شد. نسخه 1.1.0-rc02 شامل این کامیت‌ها است.

رفع اشکالات

  • پیشوند layout_ به ویژگی boxedEdges (که اکنون layout_boxedEdges ) برای BoxInsetLayout اضافه شده است تا با قرارداد نامگذاری اندروید مطابقت داشته باشد. این کار خطای linter را در اندروید استودیو برای این ویژگی‌ها حذف می‌کند.

نسخه ۱.۱.۰-rc01

۱۴ مه ۲۰۲۰

androidx.wear:wear:1.1.0-rc01 بدون هیچ تغییری از زمان .1.0-beta01 منتشر شده است. نسخه 1.1.0-rc01 شامل این کامیت‌ها است.

نسخه ۱.۱.۰-بتا۰۱

۲۹ آوریل ۲۰۲۰

androidx.wear:wear:1.1.0-beta01 بدون هیچ تغییری نسبت به androidx.wear:wear:1.1.0-alpha01 منتشر شده است. نسخه 1.3.0-beta01 شامل این کامیت‌ها است.

نسخه ۱.۱.۰-آلفا۰۱

۱۵ آوریل ۲۰۲۰

androidx.wear:wear:1.1.0-alpha01 منتشر شد. نسخه 1.1.0-alpha01 شامل این کامیت‌ها است.

تغییرات API

  • گزینه EXTRA_ANIMATION_DURATION_MILLIS اختیاری به ConfirmationActivity اضافه شد تا مدت زمان نمایش کادر محاوره‌ای تأیید را در نظر بگیرد. ( adb83ce ، 134523c ، b/143356547 )

رفع اشکالات

  • WearableActionDrawView به‌روزرسانی شد تا باد شدن کشوی اکشن تا زمانی که کشو برای اولین بار باز شود، به تأخیر بیفتد. ( 5cd32f7 )

تعاملات از راه دور با لباس

نسخه ۱.۳.۰

نسخه ۱.۳.۰-آلفا۰۱

۱۹ مه ۲۰۲۶

androidx.wear:wear-remote-interactions:1.3.0-alpha01 منتشر شد. نسخه 1.3.0-alpha01 شامل این کامیت‌ها است.

تغییرات API

  • startRemoteActivityAttemptUnlock و startPhoneActivityWithUnlock به RemoteActivityHelper اضافه شد که به برنامه‌های Wear OS اجازه می‌دهد پس از باز کردن قفل گوشی، فعالیتی را در گوشی متصل آغاز کنند، البته منوط به اینکه کاربر قابلیت و پلتفرم را ثبت‌نام کرده باشد. startRemoteActivityAttemptUnlock می‌تواند در صورت عدم دسترسی به قابلیت، به startRemoteActivity موجود بازگردد. ( Ic23ae ، b/468374830 )

نسخه ۱.۲

نسخه ۱.۲.۰

۲۵ فوریه ۲۰۲۶

androidx.wear:wear-remote-interactions:1.2.0 منتشر شد. نسخه ۱.۲.۰ شامل این کامیت‌ها است.

تغییرات مهم از زمان ۱.۱.۰:

  • فایل RemoteActivityHelper.startRemoteActivity به‌روزرسانی شد تا در صورت موجود بودن (از Wear 6 به بعد) از یک API عمومی Wear SDK جدید ( startRemoteActivity ) استفاده کند. Id1e77
  • وابستگی به نسخه Play Basement که حاوی آسیب‌پذیری CVE-2022-2390 بود، به‌روزرسانی شد.

نسخه ۱.۲.۰-rc01

۲۸ ژانویه ۲۰۲۶

androidx.wear:wear-remote-interactions:1.2.0-rc01 منتشر شد. نسخه 1.2.0-rc01 شامل این کامیت‌ها است.

رفع اشکالات

  • وابستگی به نسخه Play Basement که حاوی آسیب‌پذیری CVE-2022-2390 بود، به‌روزرسانی شد.

نسخه ۱.۲.۰-بتا۰۱

۱۷ دسامبر ۲۰۲۵

androidx.wear:wear-remote-interactions:1.2.0-beta01 منتشر شد. نسخه 1.2.0-beta01 شامل این کامیت‌ها است.

  • از زمان انتشار نسخه آلفای قبلی، هیچ تغییر قابل توجه جدیدی وجود ندارد.

نسخه ۱.۲.۰-آلفا۰۱

۲ ژوئیه ۲۰۲۵

androidx.wear:wear-remote-interactions:1.2.0-alpha01 منتشر شد. نسخه 1.2.0-alpha01 شامل این کامیت‌ها است.

ویژگی‌های جدید

  • فایل RemoteActivityHelper.startRemoteActivity به‌روزرسانی شد تا در صورت موجود بودن (از Wear 6 به بعد) از یک API عمومی Wear SDK جدید ( startRemoteActivity ) استفاده کند. ( Id1e77 )

نسخه ۱.۱

نسخه ۱.۱.۰

۱۱ دسامبر ۲۰۲۴

androidx.wear:wear-remote-interactions:1.1.0 منتشر شد. نسخه ۱.۱.۰ شامل این کامیت‌ها است.

تغییرات مهم از زمان ۱.۰.۰

  • ما RemoteActivityHelper.isRemoteActivityHelperAvailable را اضافه کرده‌ایم که به بررسی اینکه آیا قابلیت راه‌اندازی یک فعالیت از راه دور در دسترس است یا خیر، کمک می‌کند. ( I107a9 )

نسخه ۱.۱.۰-rc01

۱۶ اکتبر ۲۰۲۴

androidx.wear:wear-remote-interactions:1.1.0-rc01 بدون هیچ تغییری از زمان انتشار 1.1.0-beta01 منتشر شده است. نسخه ۱.۱.۰-rc01 شامل این کامیت‌ها است.

نسخه ۱.۱.۰-بتا۰۱

۲۴ ژوئیه ۲۰۲۴

androidx.wear:wear-remote-interactions:1.1.0-beta01 منتشر شد. نسخه 1.1.0-beta01 شامل این کامیت‌ها است. انتشار 1.3.0-beta01 از Wear Remote Interactions نشان می‌دهد که این نسخه از کتابخانه از نظر امکانات کامل شده و API قفل شده است (به جز مواردی که به عنوان آزمایشی علامت‌گذاری شده است).

نسخه ۱.۱.۰-آلفا۰۲

۱۰ ژانویه ۲۰۲۴

androidx.wear:wear-remote-interactions:1.1.0-alpha02 منتشر شد. نسخه 1.1.0-alpha02 شامل این کامیت‌ها است.

تغییرات API

  • ما RemoteActivityHelper.isRemoteActivityHelperAvailable را اضافه کرده‌ایم که به بررسی اینکه آیا قابلیت راه‌اندازی یک فعالیت از راه دور در دسترس است یا خیر، کمک می‌کند. ( I107a9 )
  • ما سازنده‌ی RemoteActivityHelper را به‌روزرسانی کرده‌ایم تا پارامترهای اختیاری سازگار با جاوا داشته باشد. ( I75554 )

نسخه ۱.۱.۰-آلفا۰۱

۲۱ ژوئن ۲۰۲۳

androidx.wear:wear-remote-interactions:1.1.0-alpha01 منتشر شد. نسخه 1.1.0-alpha01 شامل این کامیت‌ها است.

رفع اشکالات

  • نحوه‌ی تکمیل و مدیریت خطا در RemoteActivityHelper بهبود یافته است. ( I60d60 )

مشارکت خارجی

  • وابستگی Guava را از wear-remote-interactions حذف کنید و از جایگزین‌های کوچک‌تر استفاده کنید.

ورودی سایش

نسخه ۱.۲

نسخه ۱.۲.۰

۱۰ سپتامبر ۲۰۲۵

androidx.wear:wear-input:1.2.0 و androidx.wear:wear-input-testing:1.2.0 منتشر شدند. نسخه ۱.۲.۰ شامل این کامیت‌ها است.

تغییرات مهم از زمان ۱.۱.۰:

  • ثابت‌های مکان دکمه فیزیکی نمایان هستند.
  • WearableRemoteInputExtender برای تنظیم موارد اضافی مخصوص Wear در android.app.RemoteInput اضافه شد (برای مثال، فعال کردن ورودی Emoji)

نسخه ۱.۲.۰-rc01

۲۷ آگوست ۲۰۲۵

androidx.wear:wear-input:1.2.0-rc01 و androidx.wear:wear-input-testing:1.2.0-rc01 بدون هیچ تغییری از آخرین نسخه بتا منتشر شده‌اند. نسخه 1.2.0-rc01 شامل این کامیت‌ها است.

نسخه ۱.۲.۰-بتا۰۱

۳۰ ژوئیه ۲۰۲۵

androidx.wear:wear-input:1.2.0-beta01 و androidx.wear:wear-input-testing:1.2.0-beta01 بدون هیچ تغییر قابل توجهی از آخرین نسخه‌های آلفا منتشر شده‌اند. نسخه 1.2.0-beta01 شامل این کامیت‌ها است.

نسخه ۱.۲.۰-آلفا۰۴

۱۶ ژوئیه ۲۰۲۵

androidx.wear:wear-input:1.2.0-alpha04 و androidx.wear:wear-input-testing:1.2.0-alpha04 منتشر شدند. نسخه 1.2.0-alpha04 شامل این کامیت‌ها است.

ویژگی‌های جدید

  • هنگام محاسبه موقعیت دکمه‌های فیزیکی نسبت به صفحه نمایش، چرخش صفحه را در نظر بگیرید. ( 87a57e )

تغییرات API

  • در wear-input نام LOC * را به LOCATION * تغییر دهید. ( I5e879 )

رفع اشکالات

  • این کتابخانه اکنون از حاشیه‌نویسی‌های nullness از نوع JSpecify استفاده می‌کند که از نوع type-use هستند. توسعه‌دهندگان Kotlin باید از آرگومان‌های کامپایلر زیر برای اعمال استفاده صحیح استفاده کنند: -Xjspecify-annotations=strict , -Xtype-enhancement-improvements-strict-mode ( Icbfb9 , b/326456246 )

نسخه ۱.۲.۰-آلفا۰۲

۲۹ سپتامبر ۲۰۲۱

androidx.wear:wear-input:1.2.0-alpha02 و androidx.wear:wear-input-testing:1.2.0-alpha02 منتشر شدند. نسخه 1.2.0-alpha02 شامل این کامیت‌ها است.

تغییرات API

  • نام disallowEmoji در WearableRemoteInputExtender به setEmojisAllowed تغییر یافت تا مشخص شود آیا گزینه رسم ایموجی نمایش داده شود یا خیر. ( I28393 )

نسخه ۱.۲.۰-آلفا۰۱

۱۵ سپتامبر ۲۰۲۱

androidx.wear:wear-input:1.2.0-alpha01 و androidx.wear:wear-input-testing:1.2.0-alpha01 منتشر شدند. نسخه 1.2.0-alpha01 شامل این کامیت‌ها است.

تغییرات API

  • تمام ثابت‌های مکان دکمه از WearableButtons نمایش داده شدند. ( Ibb12c )
  • کلاس WearableRemoteInputExtender اضافه شده است که می‌تواند برای افزودن موارد اضافی مخصوص Wear به android.app.RemoteInput استفاده شود. ( I01903 )

نسخه ۱.۱

نسخه ۱.۱.۰

۱۸ آگوست ۲۰۲۱

androidx.wear:wear-input:1.1.0 و androidx.wear:wear-input-testing:1.1.0 منتشر شدند. نسخه ۱.۱.۰ شامل این کامیت‌ها است.

تغییرات مهم از زمان ۱.۰.۰

  • RemoteInputIntentHelper اضافه شد.
    • این کلاس می‌تواند برای ساخت یک RemoteInput Intent استفاده شود. سپس می‌توان از آن برای درخواست ورودی از کاربران در یک activity قابل تنظیم استفاده کرد.

نسخه ۱.۱.۰-rc01

۴ آگوست ۲۰۲۱

androidx.wear:wear-input:1.1.0-rc01 و androidx.wear:wear-input-testing:1.1.0-rc01 منتشر شدند. نسخه 1.1.0-rc01 شامل این کامیت‌ها است.

هیچ تغییری در API از زمان androidx.wear:wear-input:1.1.0-beta01 و androidx.wear:wear-input-testing:1.1.0-beta01 است

نسخه ۱.۱.۰-بتا۰۱

۲۱ ژوئیه ۲۰۲۱

androidx.wear:wear-input:1.1.0-beta01 و androidx.wear:wear-input-testing:1.1.0-beta01 بدون هیچ تغییری از زمان 1.1.0-alpha03 منتشر شده‌اند. نسخه 1.1.0-beta01 شامل این کامیت‌ها است.

نسخه ۱.۱.۰-آلفا۰۳

۳۰ ژوئن ۲۰۲۱

androidx.wear:wear-input:1.1.0-alpha03 و androidx.wear:wear-input-testing:1.1.0-alpha03 منتشر شدند. نسخه 1.1.0-alpha03 شامل این کامیت‌ها است.

رفع اشکالات

  • اشکالی که باعث می‌شد Intentهای RemoteInput که RemoteInput ها از طریق RemoteInputHelper.putRemoteInputsExtra به آنها اضافه شده بود، رد شوند، برطرف شد.

نسخه ۱.۱.۰-آلفا۰۲

۱۸ مه ۲۰۲۱

androidx.wear:wear-input:1.1.0-alpha02 و androidx.wear:wear-input-testing:1.1.0-alpha02 منتشر شدند. نسخه 1.1.0-alpha02 شامل این کامیت‌ها است.

تغییرات API

  • متدهای RemoteInputIntentHelper که برای دریافت یا قرار دادن موارد اضافی که نشان‌دهنده برچسب‌های title، cancel، confirm و in progress هستند استفاده می‌شوند، اکنون به جای String از CharSequence برای این برچسب‌ها استفاده می‌کنند. ( I0e71f )

نسخه ۱.۱.۰-آلفا۰۱

۲۷ ژانویه ۲۰۲۱

androidx.wear:wear-input:1.1.0-alpha01 و androidx.wear:wear-input-testing:1.1.0-alpha01 منتشر شدند. نسخه 1.1.0-alpha01 شامل این کامیت‌ها است.

تغییرات API

  • کلاس RemoteInputIntent را از کتابخانه پشتیبانی Wearable به AndroidX منتقل کنید. کلاس منتقل شده به RemoteInputIntentHelper تغییر نام می‌دهد که توابع کمکی را برای پشتیبانی از ورودی‌های از راه دور از طریق شروع یک intent فراهم می‌کند. ( I47cee )

نسخه ۱.۰

نسخه ۱.۰.۰

۲ دسامبر ۲۰۲۰

androidx.wear:wear-input:1.0.0 و androidx.wear:wear-input-testing:1.0.0 منتشر شدند. نسخه ۱.۰.۰ شامل این کامیت‌ها است.

این نسخه مشابه نسخه 1.0.0-rc01 است.

ویژگی‌های اصلی نسخه ۱.۰.۰

  • انتقال قابلیت‌های WearableButtons از کتابخانه پشتیبانی Wearable به Jetpack.

  • androidx.wear.input.test.TestWearableButtonsProvider که androidx.wear.input.WearableButtonsProvider را پیاده‌سازی می‌کند، برای کمک به تست برنامه‌های توسعه‌یافته با کتابخانه androidx.wear:wear-input اضافه شده است.

نسخه ۱.۰.۰-rc01

۱۱ نوامبر ۲۰۲۰

androidx.wear:wear-input:1.0.0-rc01 و androidx.wear:wear-input-testing:1.0.0-rc01 منتشر شدند. نسخه 1.0.0-rc01 شامل این کامیت‌ها است.

این نسخه مشابه نسخه 1.0.0-beta01 است.

نسخه ۱.۰.۰-بتا۰۱

۲۸ اکتبر ۲۰۲۰

androidx.wear:wear-input:1.0.0-beta01 و androidx.wear:wear-input-testing:1.0.0-beta01 بدون هیچ تغییری از زمان 1.1.0-alpha01 منتشر شده‌اند. نسخه 1.0.0-beta01 شامل این کامیت‌ها است.

تست ورودی-پوشش نسخه ۱.۰.۰-alpha01

۱۴ اکتبر ۲۰۲۰

androidx.wear:wear-input-testing:1.0.0-alpha01 منتشر شد. نسخه 1.0.0-alpha01 شامل این کامیت‌ها است.

تغییرات API

  • androidx.wear.input.test.TestWearableButtonsProvider که androidx.wear.input.WearableButtonsProvider را پیاده‌سازی می‌کند، برای کمک به تست برنامه‌های توسعه‌یافته با کتابخانه androidx.wear:wear-input اضافه شد. ( I0ed0c )

نسخه ورودی لباس ۱.۰.۰-alpha01

۲ سپتامبر ۲۰۲۰

androidx.wear:wear-input:1.0.0-alpha01 منتشر شد. نسخه 1.0.0-alpha01 شامل این کامیت‌ها است.

ویژگی‌های جدید

Migration of WearableButtons functionality from Wearable Support Library to Jetpack. Additional testing support will be provided in androidx.wear:wear-input-testing library in the next Jetpack release.

Wear-Ongoing

Version 1.1

Version 1.1.0

۱۰ سپتامبر ۲۰۲۵

androidx.wear:wear-ongoing:1.1.0 is released. Version 1.1.0 contains these commits .

Important changes since 1.0.0:

  • Added a content description field to Ongoing Activities, which is used by accessibility services.
  • Added RequiresPermission annotations to APIs that require POST_NOTIFICATIONS permission on SDK 33 and above.

Version 1.1.0-rc01

August 27, 2025

androidx.wear:wear-ongoing:1.1.0-rc01 is released with no changes since the last beta. Version 1.1.0-rc01 contains these commits .

Version 1.1.0-beta01

۳۰ ژوئیه ۲۰۲۵

androidx.wear:wear-ongoing:1.1.0-beta01 is released with no notable changes since the last alpha. Version 1.1.0-beta01 contains these commits .

Version 1.1.0-alpha01

۲۳ آگوست ۲۰۲۳

androidx.wear:wear-ongoing:1.1.0-alpha01 is released. Version 1.1.0-alpha01 contains these commits.

API Changes

  • Add a content description field to Ongoing Activity. This will be used by accessibility services to describe the Ongoing Activity. ( I79fc6 )

Bug Fixes

  • Added @RequiresPermission to APIs that require granting the POST_NOTIFICATIONS permission on SDK 33 and above. ( Ie542e , b/238790278 )

نسخه ۱.۰

Version 1.0.0

September 1, 2021

androidx.wear:wear-ongoing:1.0.0 is released. Version 1.0.0 contains these commits.

Major features of 1.0.0

  • The Wear Ongoing Activities API is an API for developers, including third party developers, used to mark their activity as an “Ongoing Activity”, and provide the needed information.
  • Ongoing Activities refer to activities that could be running in the background of the watch (eg workouts, calls and media). On Wear 3, an activity declared as ongoing will be made more prominent through a dedicated overlay icon on the watchface and a different rendering in the app launcher.
  • For more information, see the Wear Ongoing Activity Guide

Version 1.0.0-rc01

۱۸ آگوست ۲۰۲۱

androidx.wear:wear-ongoing:1.0.0-rc01 is released with no changes since 1.0.0-beta01 . Version 1.0.0-rc01 contains these commits.

Version 1.0.0-beta01

August 4, 2021

androidx.wear:wear-ongoing:1.0.0-beta01 is released. Version 1.0.0-beta01 contains these commits.

API Changes

  • Some setters on OngoingActivity.Builder now accept a null argument in order to give symmetry and consistency to the setters and getters ( I17ee5 )

Version 1.0.0-alpha06

June 2, 2021

androidx.wear:wear-ongoing:1.0.0-alpha06 is released. Version 1.0.0-alpha06 contains these commits.

API Changes

  • Add Title field to Ongoing Activity. ( I7a405 )

Bug Fixes

  • SerializationHelper.copy() now does a defensive copy of the information ( I8b276 )
  • Improved setCategory documentation ( Iff01f )

Version 1.0.0-alpha05

۱۸ مه ۲۰۲۱

androidx.wear:wear-ongoing:1.0.0-alpha05 is released. Version 1.0.0-alpha05 contains these commits.

API Changes

  • OngoingActivity now has getters to retrieve all values directly set via the Builder (or the defaults taken from the associated Notification). ( Id8ac8 )

    • The new class Status is now used to create the status of the the OngoingActivity
    • OngoingActivityData and OngoingActivityStatus are no longer part of the public API.
  • The classes TextStatusPart and TimerStatusPart are no longer part of the public API. ( I57fb6 )

    • To create a Part with a static text, use Status.TextPart .
    • To create a Part with a stopwatch (counting up), use Status.Stopwatch
    • To create a Part with a timer (counting down), use Status.Timer

Version 1.0.0-alpha04

May 5, 2021

androidx.wear:wear-ongoing:1.0.0-alpha04 is released. Version 1.0.0-alpha04 contains these commits.

API Changes

  • On OngoingActivity, the methods fromExistingOngoingActivity are now called recoverOngoingActivity.
  • OngoingActivity now has a full set of getters, the same previously only available at OngoingActivityData. ( I0ee4d )

Wear-Phone-Interactions

Version 1.1

Version 1.1.0

۲۶ فوریه ۲۰۲۵

androidx.wear:wear-phone-interactions:1.1.0 is released. Version 1.1.0 contains these commits .

Important changes since 1.0.0

  • This version contains crucial bug fix for Apps running on Wear OS 5 (API level 34) or higher and targeting API level 35 or higher.
  • Apps should update to this version of the library before updating their targetSdkVersion to 35 or higher.
  • Otherwise, runtime exception will be thrown.
  • A new definition for paired device type - none , when the device is not paired with the phone, has been added.

Version 1.1.0-rc01

۱۲ فوریه ۲۰۲۵

androidx.wear:wear-phone-interactions:1.1.0-rc01 is released with no notable changes since the last beta. Version 1.1.0-rc01 contains these commits .

Version 1.1.0-beta01

January 29, 2025

androidx.wear:wear-phone-interactions:1.1.0-beta01 is released. Version 1.1.0-beta01 contains these commits .

ویژگی‌های جدید

The 1.1.0-beta01 release of Wear Phone Interactions indicates that this release of the library is feature complete and the API is locked (except where marked as experimental). Wear Phone Interactions 1.1 includes the following new functionalities and APIs:

  • Added property redirectUrl to OAuthRequest .
  • Documentation fixes
  • Additional type in PhoneTypeHelper to specify when device is not paired with phone, instead of using existing unknown type.

API Changes

  • Added new definition for paired device type - none, when device is not paired with the phone. ( I06cb8 )

Version 1.1.0-alpha05

۱۱ دسامبر ۲۰۲۴

androidx.wear:wear-phone-interactions:1.1.0-alpha05 is released. Version 1.1.0-alpha05 contains these commits .

Bug Fixes

  • Fix a crash bug when running on Wear OS 5 (API level 34) or higher while targeting API level 35 or higher. Apps should update to this version of the library before updating their targetSdkVersion to 35 or higher.

Version 1.1.0-alpha04

۱۰ ژانویه ۲۰۲۴

androidx.wear:wear-phone-interactions:1.1.0-alpha04 is released. Version 1.1.0-alpha04 contains these commits.

API Changes

  • We have added RemoteAuthClient.isRemoteAuthAvailable which checks whether remote auth is available. ( Ibc10c )

Version 1.1.0-alpha03

March 9, 2022

androidx.wear:wear-phone-interactions:1.1.0-alpha03 is released. Version 1.1.0-alpha03 contains these commits.

Bug Fixes

  • redirectUrl from OAuthRequest now returns an empty String if there the redirect URL is not set in the given request URL. ( I44242 )

Version 1.1.0-alpha02

۱۵ دسامبر ۲۰۲۱

androidx.wear:wear-phone-interactions:1.1.0-alpha02 is released. Version 1.1.0-alpha02 contains these commits.

Bug Fixes

  • Fix the errors in RemoteAuthClient documentation, including error in code sample snippet and the dead link to ErrorCode ( I260e8 )

Version 1.1.0-alpha01

September 15, 2021

androidx.wear:wear-phone-interactions:1.1.0-alpha01 is released. Version 1.1.0-alpha01 contains these commits.

API Changes

  • Added property redirectUrl to OAuthRequest. ( I98840 , Ie684d )

نسخه ۱.۰

Wear-Phone-Interactions Version 1.0.1

۱۵ دسامبر ۲۰۲۱

androidx.wear:wear-phone-interactions:1.0.1 is released. Version 1.0.1 contains these commits.

Bug Fixes

  • Fixed exception was thrown from the BridgingManager when trying to disable bridging notifications without excludedTags .

Wear-Phone-Interactions Wear-Remote-Interactions

نسخه ۱.۰

Version 1.0.0

September 15, 2021

androidx.wear:wear-phone-interactions:1.0.0 and androidx.wear:wear-remote-interactions:1.0.0 are released. Version 1.0.0 contains these commits.

Major features of 1.0.0

The Phone Interaction Library contains APIs for interactions from the Wearables to Phones. It contains the following:

  • PhoneDeviceType , providing helper methods for determining the type of phone the current watch is paired to, for use on Wearable devices only.
  • BridgingManager , BridgingManagerService and BridgingConfig APIs to enable/disable notifications at runtime and optionally set tags for notifications that are exempt from the bridging mode.
  • RemoteAuthClient , providing support for remote authentication on Wearables together with support for adding OAuth PKCE extension. Additional handlers and helper classes for communication are provided.

The Remote Interaction Library contains APIs for interactions between the Wearables and Phones. It contains the following:

  • WatchFaceConfigIntentHelper , providing helper functions to specify the ID and component name in the watch face configuration activities for the companion on the phone.
  • RemoteActivityHelper class which can be used for opening intents on other devices (ie from watch to phone).

Version 1.0.0-rc01

September 1, 2021

androidx.wear:wear-phone-interactions:1.0.0-rc01 and androidx.wear:wear-remote-interactions:1.0.0-rc01 are released. Version 1.0.0-rc01 contains these commits.

Bug Fixes

  • Fix bug preventing errors raised within Google Play Services from being propagated to the caller when using RemoteActivityHelper ( I60d60 )
  • Fix bug where RemoteActivityHelper would never fulfill its Future if there were no connected nodes, or if the requested nodeId was not found ( I60d60 )

Version 1.0.0-beta01

۱۸ آگوست ۲۰۲۱

androidx.wear:wear-phone-interactions:1.0.0-beta01 and androidx.wear:wear-remote-interactions:1.0.0-beta01 are released. Version 1.0.0-beta01 contains these commits.

API Changes

  • Renamed class RemoteIntentHelper to RemoteActivityHelper . Renamed functions RemoteIntentHelper#getRemoteIntentExtraIntent and RemoteIntentHelper#getRemoteIntentNodeId to RemoteActivityHelper#getTargetIntent and RemoteActivityHelper#getTargetNodeId , respectively. ( Id2042 )

Wear-Phone-Interactions Version 1.0.0-alpha07

August 4, 2021

androidx.wear:wear-phone-interactions:1.0.0-alpha07 is released. Version 1.0.0-alpha07 contains these commits.

API Changes

  • Renamed WearTypeHelper.isChinaDevice to WearTypeHelper.isChinaBuild . ( I47302 )
  • We have updated RemoteAuthClient library to automatically pick redirect_uri based on device type (RoW/China). ( I38866 )
  • Fixed bug that caused converting BridgingConfig to/from Bundle to fail with ClassCastException. Added unit tests for BridgingManagerService class. ( I68ecb )

Wear-Remote-Interactions Version 1.0.0-alpha06

August 4, 2021

androidx.wear:wear-remote-interactions:1.0.0-alpha06 is released. Version 1.0.0-alpha06 contains these commits.

Wear-Phone-Interactions Version 1.0.0-alpha06

July 21, 2021

androidx.wear:wear-phone-interactions:1.0.0-alpha06 is released. Version 1.0.0-alpha06 contains these commits.

API Changes

  • BridgingManagerSeviceBinder class is now a subclass of Service and is renamed to BridgingManagerSevice. ( I9fca2 )
  • Method RemoteAuthClient.Callback.onAuthorizationError is changed to include OAuthRequest parameter. Methods requiring callback now also require an executor for the callback to be run on. ( I35e11 )

Bug Fixes

  • We have made the authentication API clearer with more documented parameters and by using properties where possible. ( I12287 )

Wear-Phone-Interactions Version 1.0.0-alpha05

June 30, 2021

androidx.wear:wear-phone-interactions:1.0.0-alpha05 is released. Version 1.0.0-alpha05 contains these commits.

Bug Fixes

  • Documented parameters that should be passed in constructor for BridgingConfig.Builder .

Wear-Remote-Interactions Version 1.0.0-alpha05

July 21, 2021

androidx.wear:wear-remote-interactions:1.0.0-alpha05 is released. Version 1.0.0-alpha05 contains these commits.

API Changes

  • We have added the RemoteIntentHelper class (previously RemoteIntent in the Wearable Support Library) which can be used for opening intents on other devices (ie from watch to phone). ( I1d7e0 )

  • The PlayStoreAvailability class has been removed from the AndroidX library. To detect whether the Play Store is available on a connected phone, use the androidx.phone.interactions.PhoneTypeHelper.getPhoneDeviceType method to determine if the connected phone is an Android phone. Then use the androidx.wear.utils.WearTypeHelper.isChinaDevice method to determine if the connected phone is a Chinese device. If the phone is an Android phone and if it is not a Chinese device then the Play Store will be available. ( Ie7dec )

Wear-Phone-Interactions Version 1.0.0-alpha04

April 7, 2021

androidx.wear:wear-phone-interactions:1.0.0-alpha04 is released. Version 1.0.0-alpha04 contains these commits.

API Changes

  • Updated ErrorCode constants to make the new library backwards compatible with the implementation in Wearable Support Library.

Bug Fixes

  • Fixed exception caused by new OAuth API when starting an OAuth session.

Wear-Remote-Interactions Version 1.0.0-alpha03

April 7, 2021

androidx.wear:wear-remote-interactions:1.0.0-alpha03 is released. Version 1.0.0-alpha03 contains these commits.

API Changes

  • Changed PlayStoreAvailability to be a class that contains companion object with static methods. Usage stays the same.

Bug Fixes

  • Fixed summary doc for WatchFaceConfigIntentHelper to correctly show sample code with actual HTML characters.

Wear-Ongoing Wear-Phone-Interactions Version 1.0.0-alpha03

March 10, 2021

androidx.wear:wear-ongoing:1.0.0-alpha03 and androidx.wear:wear-phone-interactions:1.0.0-alpha03 are released. Version 1.0.0-alpha03 contains these commits.

ویژگی‌های جدید

  • Migrate OAuthClient from Wearable Support Library to AndroidX. This migrated class is renamed to RemoteAuthClient and it gives support for remote authentication on Wearables together with support for adding OAuth PKCE extension. Additional handlers and helper classes for communication are provided.
  • Ongoing activities can now be associated with a Notification that has a tag, using the new OngoingActivity.Builder constructor.

API Changes

  • Added support for notification tags on the Ongoing Activities Library ( I653b4 )
  • Migrate OAuthClient from Wear Support Library to AndroidX, and add support for OAuth PKCE extension ( I3eaaa )

Wear-Remote-Interactions Version 1.0.0-alpha02

March 10, 2021

androidx.wear:wear-remote-interactions:1.0.0-alpha02 is released. Version 1.0.0-alpha02 contains these commits.

ویژگی‌های جدید

  • Migrating PlayStoreAvailability class from Wearable Support Library to AndroidX which provides an API for checking whether the Play Store is available on the Phone.

Bug Fixes

  • Migrating PlayStoreAvailability class from Wearable Support Library to AndroidX. ( I69bfe )

Version 1.0.0-alpha02

۱۰ فوریه ۲۰۲۱

androidx.wear:wear-ongoing:1.0.0-alpha02 and androidx.wear:wear-phone-interactions:1.0.0-alpha02 are released. Version 1.0.0-alpha02 contains these commits.

API Changes

  • Added support for more complex status. They are composed of a template (or several) and a series of Parts that will be used to fill the template's placeholders. OngoingActivityStatus now has a static method to create simple statuses with only one part (a Text or a Timer), and a Builder to create more complex statuses. ( I1fe81 )
  • Move BridgingManager and BridgingConfig classes from Wear Support Library to AndroidX which provides APIs to enable/disable notifications at runtime and optionally set tags for notifications that are exempt from the bridging mode. ( I3a17e )

Version 1.0.0-alpha01

۲۷ ژانویه ۲۰۲۱

androidx.wear:wear-ongoing:1.0.0-alpha01 , androidx.wear:wear-phone-interactions:1.0.0-alpha01 , and androidx.wear:wear-remote-interactions:1.0.0-alpha01 are released. Version 1.0.0-alpha01 contains these commits.

API Changes

  • Migrate the Ongoing Activities library to a new sub-library: wear-ongoing. Classes now live in the androidx.wear.ongoing package (previously was androidx.wear.ongoingactivities) ( I7c029 )

  • Create a new support library to contain classes that support interactions from the Wearables to Phones. It is initially populated with classes migrated from Wearable Support Library. ( Id5180 )

  • Migrate PhoneDeviceType class from Wearable Support Library to AndroidX. The migrated class is renamed as PhoneTypeHelper which provides helper methods for determining the type of phone the current watch is paired to, for use on Wearable devices only. ( Ibd947 )

  • Create a new support library to contain classes that support interactions between the Wearables and Phones. It is initially populated with classes migrated from Wearable Support Library. ( I9deb4 )

  • Migrate WatchFaceCompanion class from Wearable Support Library to AndroidX. The migrated class is renamed as WatchFaceConfigIntentHelper which provides helper functions to specify the ID and component name in the watch face configuration activities in companion on the phone, it can also be used locally to configure the watch face on the wearable device. ( Ia455f )

Wear-Tooling-Preview

نسخه ۱.۰

Version 1.0.0

November 29, 2023

androidx.wear:wear-tooling-preview:1.0.0 is released. Version 1.0.0 contains these commits.

Features in 1.0.0

  • Add WearDevices to list valid wear devices that can be used for UI previews.

Version 1.0.0-rc01

November 15, 2023

androidx.wear:wear-tooling-preview:1.0.0-rc01 is released with no changes. Version 1.0.0-rc01 contains these commits.

Version 1.0.0-beta01

۱۸ اکتبر ۲۰۲۳

androidx.wear:wear-tooling-preview:1.0.0-beta01 is released with no changes. Version 1.0.0-beta01 contains these commits.

Version 1.0.0-alpha01

۲۳ آگوست ۲۰۲۳

androidx.wear:wear-tooling-preview:1.0.0-alpha01 is released. Version 1.0.0-alpha01 contains these commits.

API Changes

  • Add WearDevices to list valid wear devices that can be used for UI previews ( Ib036e )

Wear Complications and Watchface

نسخه ۱.۰

Version 1.0.0-alpha22

September 15, 2021

androidx.wear:wear-*:1.0.0-alpha22 is released. Version 1.0.0-alpha22 contains these commits.

ویژگی‌های جدید

  • The EditorSession now subscribes to lifecycle observers so you no longer have to explicitly close it when your activity goes away.

API Changes

  • EditorSession and ListenableEditorSession now use kotlin StateFlows for complicationSlotsState, ComplicationsPreviewData and ComplicationsDataSourceInfo. ( I761d9 )
  • EditorSession#userStyle is now a MutableStateFlow<UserStyle> ( I32ca9 )
  • EditorSession.createOnWatchEditorSession now uses a lifecycle observer and it automatically closes when it observes onDestroy. In addition createOnWatchEditorSession now only requires the activity to be passed in. Identical changes have also been applied to ListenableEditorSession. ( Ic6b7f )
  • CustomValueUserStyleSetting's constructor has been reinstated as part of the public API. ( I2e69a )
  • UserStyle now inherits from Map<UserStyleSetting, UserStyleSetting.Option> and MutableUserStyleSetting#put throws IllegalArgumentException if the setting is not in the schema or if the option doesn't match the setting. ( Iba40f )

Version 1.0.0-alpha21

September 1, 2021

androidx.wear:wear-*:1.0.0-alpha21 is released. Version 1.0.0-alpha21 contains these commits.

API Changes

  • All public watch face, client, editor and complication APIs now use java.time.Instant for times rather than a Long, as a consequence the minimum API level has increased to 26. ( I3cd48 )
  • The watchface and complication APIs now use the immutable ZonedDateTime instead of Calendar. ( I25cf8 )
  • ComplicationSlots are now initialized with NoDataComplicationData, ComplicationSlot.complicationData now always has a value and CanvasComplicationDrawable.complicationData is no longer nullable. ( I4dfd6 ) This reduces (but doesn't eliminate) complication flickering when switching between watch faces.

Version 1.0.0-alpha20

۱۸ آگوست ۲۰۲۱

androidx.wear:wear-*:1.0.0-alpha20 is released. Version 1.0.0-alpha20 contains these commits.

API Changes

  • We have added createFallbackPreviewData to ComplicationDataSourceInfo which can be used when ComplicationDataSourceInfoRetriever.retrievePreviewComplicationData returns null. ( I38c4d )
  • ComplicationDataSourceUpdateRequester has been turned into an interface to allow mocking in unit tests. You can construct a concrete ComplicationDataSourceUpdateRequester with ComplicationDataSourceUpdateRequester.create(). ( I7da22 )
  • RenderParameters.pressedComplicationSlotIds has been replaced by RenderParameters.lastComplicationTapDownEvents which exposes the new TapEvent class which contains a triple of x, y coordinates of the tap in pixels and a time stamp. WatchFace.TapListener.onTap has been replaced by onTapEvent(@TapType tapType: Int, tapEvent: TapEvent) . In addition, InteractiveWatchFaceClient.displayPressedAnimation has been removed. ( Id87d2 )
  • Added explicit threading annotation for setImportantForAccessibility ( I990fa )
  • ComplicationSlotBoundsType has been moved to androidx-wear-watchface.ComplicationSlotBoundsType in wear/wear-watchface. ( I09420 )
  • We have added support for passing string resource ids into UserStyleSetting and Options. This is now the recommended way to construct those objects. ( I03d5f )
  • Limits have been imposed upon the maximum wire size of a UserStyle Schema. Also Icons in the schema must not be bigger than 400x400 pixels. ( I3b65b )
  • We added a MutableUserStyle class to support changes to UserStyle instances ( I95a40 )
  • We have renamed ListenableWatchFaceMetadataClient.Companion#listenableCreateWatchFaceMetadataClient to ListenableWatchFaceMetadataClient.Companion#createListenableWatchFaceMetadataClient . ( I64ce2 )
  • We've modified EditorState.previewComplicationsData to only contain data for enabled complications, and we've added EditorSession.DEFAULT_PREVIEW_TIME_MILLIS which if passed to renderWatchFaceToBitmap or PreviewScreenshotParams requests rendering with the watch face's default preview time. ( If7b3c )
  • We have removed UserStyleSetting constructors taking CharSequence from the public API. It's recommended to use the constructors that require StringResource IDs instead. ( I8537b )
  • CurrentUserStyleRepository.UserStyleChangeListener now supports SAM conversion. ( I85989 )

Version 1.0.0-alpha19

August 4, 2021

androidx.wear:wear-*:1.0.0-alpha19 is released. Version 1.0.0-alpha19 contains these commits.

API Changes

  • We've added ListenableWatchFaceMetadataClient.listenableCreateWatchFaceMetadataClient which provides a ListenableFuture wrapper for WatchFaceMetadataClient.createWatchFaceMetadataClient . ( I5fa37 )
  • UserStyleOption.getOptionForId now accepts UserStyleOption.Id instead of a byte array. ( I469be )
  • Provide constants BooleanOption.TRUE and BooleanOption.FALSE and disallow instance creation ( I46e09 )
  • Methods in wear-watchface-client that can throw RemoteException have now been annotated accordingly. ( Ib8438 )
  • For consistency we've renamed EditorSession.createOnWatchEditingSession to createOnWatchEditorSession , similarly createHeadlessEditingSession is now createHeadlessEditorSession . Their guava wrappers have also been renamed. ( I1526b )
  • EditorSession is now an interface and ListenableEditorSession.commitChangesOnClose is now properly delegated. ( I7dc3e )
  • We now reject any user style schema that has settings or options with conflicting IDs ( Ic2715 )
  • We have added an overloaded UserStyle.get which accepts UserStyleSetting.Id . ( I2aa0f )

Version 1.0.0-alpha18

July 21, 2021

androidx.wear:wear-*:1.0.0-alpha18 is released. Version 1.0.0-alpha18 contains these commits.

API Changes

  • We moved ComplicationHelperActivity to androidx.wear:wear-watchface library. ( I39e76 )
  • For consistency and clarity, ComplicationProvider has been renamed to ComplicationDataSource and all classes with Provider in their name have been similarly renamed. ( Iaef0b )
  • CanvasComplication.isHighlighted has been moved into RenderParameters.pressedComplicationSlotIds this is a step towards making CanvasComplication stateless. To support this change CanvasComplication.render now also takes the slotId as a parameter and we now pass the ComplicationSlot into GlesTextureComplication . ( I50e6e )
  • We have added headlessDeviceConfig to EditorRequest , if non null this parameter is used to construct a headless instance to back the EditorSession rather than acting on the interactive instance. This allows the editor to be invoked for a watch face that isn't the current one. ( I0a820 )
  • We've added an experimental WatchFaceMetadataClient which allows efficient retrieval of static watch face metadata such as the UserStyleSchema and fixed details about ComplicationSlots . ( I6bfdf )
  • We have renamed CanvasRenderer.uiThreadInit to init. ( I6fff9 )
  • We've added PreviewScreenshotParams an optional new parameter for EditorRequest which instructs EditorSession to take a preview screenshot on commit with these parameter. The preview image is exposed on EditorState.previewImage . ( Ic2c16 )

Bug Fixes

  • Developers no longer need to add ComplicationHelperActivity to their own manifest. ( I6f0c2 )

Version 1.0.0-alpha17

June 30, 2021

androidx.wear:wear-*:1.0.0-alpha17 is released. Version 1.0.0-alpha17 contains these commits.

ویژگی‌های جدید

  • In GlesRenderer , makeUiThreadContextCurrent and makeBackgroundThreadContextCurrent have been replaced by runUiThreadGlCommands and runBackgroundThreadGlCommands which both accept a Runnable . The library ensures that only one GL command runnable is executing at any given time.

  • To make UiThread initialziaion easier we've added CanvasRenderer.uiThreadInit which is called once on the UiThread before any calls to render. We've also added onRendererCreated to CanvasComplication which makes it easier for Renderer and CanvasComplication to share state.

  • For clarity we have renamed Complication to ComplicationSlot and complicationId to either complicationSlotId or complicationInstanceId depending on usage

API Changes

  • For clarity we have renamed Complication to ComplicationSlot and complicationId to either complicationSlotId or complicationInstanceId depending on usage. Classes using Complication have similarly been renamed eg ComplicationsManager is now called ComplicationSlotsManager. ( I4da44 )
  • In GlesRenderer makeUiThreadContextCurrent and makeBackgroundThreadContextCurrent have been replaced by runUiThreadGlCommands and runBackgroundThreadGlCommands which both accept a Runnable . These functions are only needed if you need to make GL calls outside of render, runBackgroundThreadGlCommands and onUiThreadGlSurfaceCreated . This is required because there can be multiple GlesRenderers each with their own contexts in the same process, potentially from different watch faces. In addition access to the shared current GL context is now synchronized. ( I04d59 )
  • We have added CanvasRenderer.uiThreadInit which is called once on the UiThread before any calls to render. Also for clarity in GlesRenderer we have renamed onGlContextCreated to onBackgroundThreadGlContextCreated , and onGlSurfaceCreated to onUiThreadGlSurfaceCreated . ( If86d0 )
  • HeadlessWatchFaceClient & InteractiveWatchFaceClient getComplicationsSlotState has been renamed to getComplicationSlotsState . In ComplicationSlot : createRoundRectComplicationBuilder , createBackgroundComplicationBuilder , and createEdgeComplicationBuilder have been renamed to createRoundRectComplicationSlotBuilder , createBackgroundComplicationSlotBuilder , and createEdgeComplicationSlotBuilder respectively. ( Ib9adc )
  • We have added onRendererCreated to CanvasComplication which makes it easier for Renderer and CanvasComplication to share state. ( I5e1ac )

Version 1.0.0-alpha16

June 16, 2021

androidx.wear:wear-*:1.0.0-alpha16 is released. Version 1.0.0-alpha16 contains these commits.

ویژگی‌های جدید

  • We've fixed a number of bugs related to the recent threading model changes as well as addressing other issues with the on watch face editor.

Bug Fixes

  • Prevent NPE in onComplicationProviderChooserResult ( b/189594557 )
  • Fix issues with stale surfaces and drawBlack ( b/189452267 )
  • Fix race in accessing complicationsManager.watchState ( b/189457893 )
  • Fix background thread lifetime bug ( b/189445428 )
  • Fix Pre-R Watch face Editor issues ( b/189126313 )
  • Don't update direct boot params for editor style changes ( b/187177307 )

Version 1.0.0-alpha15

June 2, 2021

androidx.wear:wear-*:1.0.0-alpha15 is released. Version 1.0.0-alpha15 contains these commits.

ویژگی‌های جدید

The majority of watch face initialization is now done on a background thread, however after loading all watch face rendering etc is done on the UiThread. There is a memory barrier between loading and rendering so most user watch faces don't need to do anything special. Watch faces using GLES may be an exception since the context is thread specific and we create two linked contexts so it's possible to upload GL resources (eg textures and shaders) on the background thread and use them on the UiThread.

We have split the construction of watchfaces into three functions: createUserStyleSchema, createComplicationsManager and createWatchFace. We assume that createUserStyleSchema and createComplicationsManager are fast and createWatchFace may take some time to load assets. Taking advantage of this we have introduced WatchFaceControlClient.getDefaultProviderPoliciesAndType which returns a map of Complication Ids to DefaultComplicationProviderPolicies and the default ComplicationType. This is faster than creating a headless instance since it doesn't need to fully initialize the watch face to perform the query.

Finally complications are now constructed with a CanvasComplicationFactory which allows for lazy construction of the CanvasComplication renderers.

API Changes

  • Replaced @TargetApi with @RequiresApi . ( I0184a , b/187447093 , b/187447094 )
  • We have introduced WatchFaceControlClient.getDefaultProviderPoliciesAndType which returns a map of Complication Ids to DefaultComplicationProviderPolicies and the default ComplicationType. Where possible a fast path is used that avoids fully constructing a watch face. To facilitate this the WatchFaceService API has had to change with two new methods being: createUserStyleSchema and createComplicationsManager the results of which are passed into createWatchFace. In addition Complications are now constructed with a CanvasComplicationFactory which allows for lazy construction of the CanvasComplication renderers. ( Iad6c1 )
  • We have removed MOST_RECENT_APP from SystemProviders. ( I3df00 )
  • ObservableWatchData is now a sealed class. ( Ic940d )
  • CanvasComplicationFactory.create (which is typically io bound) is now called on a background thread for each complication before ui thread rendering commences. There is a memory barrier between construction and rendering so no special threading primitives are required. ( Ia18f2 )
  • Watchface construction is now done on a background thread although all rendering is done on the ui thread, GlesRenderer supports two linked contexts to support this. WatchFaceControlClient.createHeadlessWatchFaceClient and WatchFaceControlClient.getOrCreateInteractiveWatchFaceClient may resolve before WatchFaceService.createWatchFace has completed. Subsequent API calls will block until watchFace initialization has completed. ( Id9f41 )
  • EXPANSION_DP and STROKE_WIDTH_DP are no longer visible in api.txt. ( I54801 )
  • We have made EditorSession.createOnWatchEditingSession throw TimeoutCancellationException if there's an error instead of sending a null session. Additionally, the return value of EditorRequest.createFromIntent and EditorSession.createOnWatchEditingSession is now NonNull. ( I41eb4 )

Version 1.0.0-alpha14

۱۸ مه ۲۰۲۱

androidx.wear:wear-*:1.0.0-alpha14 is released. Version 1.0.0-alpha14 contains these commits.

ویژگی‌های جدید

  • EditorSession.openComplicationProviderChooser now returns ChosenComplicationProvider which contains the complication id, ComplicationProviderInfo and a Bundle containing any additional extras returned by the provider chooser.
  • In addition we have been steadily migrating code to Kotlin and the majority of the watch face API is now defined in Kotlin.

API Changes

  • GlesRenderer properties eglContext and eglDisplay are now non-nullable. Any GL errors are now reported via GlesRenderer.GlesException rather than via RuntimeExceptions. ( Ib1005 )
  • We have migrated androidx.wear.watchface.complications.rendering.ComplicationDrawable from Java to Kotlin ( Ibc3eb )
  • We have migrated androidx.wear.watchface.complications.rendering.ComplicationStyle from Java to Kotlin ( I3375e )
  • We added information about the complication provider for each complication within EditorSession. ( I37f14 )
  • We extended the result of EditorSession.openComplicationProviderChooser to include information returned by the chosen. ( Iead6d )

Wear Complications & Watchface Version 1.0.0-alpha13

May 5, 2021

androidx.wear:wear-*:1.0.0-alpha13 is released. Version 1.0.0-alpha13 contains these commits.

ویژگی‌های جدید

  • Watch faces can have important visual elements beyond showing the time and complications. To provide screen reader support for this, watchface can now specify accessibility ContentDescriptionLabels via the Renderer's additionalContentDescriptionLabels property. In addition, to control the ordering of ContentDescriptionLabels accessibilityTraversalIndex has been added to complications. This can be modified by a ComplicationsUserStyleSetting.

  • To encourage developers to carefully consider screen readers we have made ShortTextComplicationData.Builder 's, LongTextComplicationData.Builder 's and RangedValueComplicationData.Builder 's contentDescription field mandatory to be passed into their constructors. If ComplicationText.EMPTY is passed in for the contentDescription , a contentDescription will be automatically generated from the text and title.

  • WatchFaceControlClient.getOrCreateInteractiveWatchFaceClient now throws ServiceStartFailureException if the watchface throws an exception during init, this makes it much easier to diagnose issues during watch face startup.

API Changes

  • We added support for having a null component name in ComplicationProviderInfo, which is needed to support older versions of Wear OS. ( I744d2 )
  • We have migrated androidx.wear.complications.SystemProviders from Java to Kotlin. ( Ia1f8b )
  • We have hidden all classes from public API that are in android.support.wearable.complications and created corresponding wrappers in AndroidX where needed. ( I7bd50 )
  • We have renamed method in TimeDifferenceComplicationText.Builder from setMinimumUnit to setMinimalTimeUnit . ( I20c64 )
  • We have made ShortTextComplicationData.Builder 's, LongTextComplicationData.Builder 's and RangedValueComplicationData.Builder 's contentDescription field mandatory to be passed in constructor. ( I8cb69 )
  • We have renamed ComplicationProviderService.onComplicationUpdate to onComplicationRequest and encapsulated id and type parameter of this method into data ComplicationRequest. Corresponding listener has been renamed to ComplicationRequestListener and its method ComplicationRequestListener.onComplicationData. ( Iaf146 )
  • We have removed method isActiveAt from ComplicationData and exposed field validTimeRange instead of it. This method call can be replaced with validTimeRange.contains . ( I65936 )
  • We have changed description of the method ComplicationProviderService.onComplicationActivated to receive a ComplicationType instead of an int. ( Idb5ff )
  • Migrated ProviderUpdateRequester from Java to Koltin. ( Ibce13 )
  • GlesRender.makeContextCurrent is now public. Watch face code may need to make gl calls outside of render and onGlContextCreated and because there may be both an interactive and a headless context its necessary to call this. ( I8a43c )
  • WatchFaceControlClient.getOrCreateInteractiveWatchFaceClient now throws ServiceStartFailureException if the watchface throws during init. In addition WatchFaceService now throws an exception if createWatchFace takes longer than 6 seconds. ( I59b2f )
  • We have removed the unused id property of GlesTextureComplication . ( I28958 )
  • The watchface can now specify accessibility ContentDescriptionLabels via the Renderer 's additionalContentDescriptionLabels property. In addition to controlling the ordering of ContentDescriptionLabels accessibilityTraversalIndex has been added to complications. This can be modified by a ComplicationsUserStyleSetting. ( Ib7362 )
  • Expand documentation about touch event handling in the watch face. ( Iaf31e )

Bug Fixes

  • EditorSession.getComplicationsPreviewData() now returns a map for every rather only non-empty complications. An instance of EmptyComplicationData is used for empty complications. ( I1ef7e )

Wear Complications & Watchface Version 1.0.0-alpha12

۲۱ آوریل ۲۰۲۱

androidx.wear:wear-*:1.0.0-alpha12 is released. Version 1.0.0-alpha12 contains these commits.

ویژگی‌های جدید

Watch face editors need to highlight parts of the watch face to help convery which aspect of a watch is being configured. We've extended RenderParameters to allow styles as well as complications to be highlighted. There's a new optional HighlightLayer which is intended to be matted on top of the watch face with alpha transparency (the screenshot apis can do this matting for you, or provide the HighlightLayer on its own for maximum flexibility). Eg suppose you had a style that lets you configure the appearance of the watch hands, your renderer in its renderHighlightLayer can draw an outline around them.

To encourage Complication Provider support for accessibility we have made PhotoImageComplicationData.Builder's, MonochromaticImageComplicationData.Builder's and SmallImageComplicationData.Builder's contentDescription field to be a mandatory constructor argument. ComplicationTapFilter and Complication.createEdgeComplicationBuilder have been added to support edge complications (drawn around the edge of the screen). Rendering and hit testing of edge complications is left up to the watch face. Edge hit testing isn't supported from the companion editor.

API Changes

  • Added PROVIDER_ prefix to constants in SystemProviders. ( I1e773 )
  • We have made PhotoImageComplicationData.Builder 's, MonochromaticImageComplicationData.Builder 's and SmallImageComplicationData.Builder 's contentDescription field mandatory to be passed in constructor. ( I9643a )
  • ProviderInfoRetriever.requestPreviewComplicationData has been renamed to retrievePreviewComplicationData . ( I911ee )
  • Migrated ComplicationProviderService from Java to Koltin. ( I849f2 )
  • Method ComplicationProviderService.onBind is now final ( I39af5 )
  • We've reinstated interface CanvasComplication and moved CanvasComplicaitonDrawable , GlesTextureComplication and ComplicationHighlightRenderer to wear-watchface-complications-rendering . ( I84670 )
  • RenderParameters has been refactored to support extended highlight rendering. It's now possible to request rendering of highlights for styles as well as all or a single complication. In addition CanvasRenderer and GlesRenderer how have a new abstract renderHighlightLayer method for rendering any highlighting requested by the editor. Layer has been renamed to WatchFaceLayer. ( Ic2444 )
  • ComplicationTapFilter and Complication.createEdgeComplicationBuilder have been added to support edge complications. Rendering and hit testing of edge complications is left up to the watch face. Hit testing isn't supported from within editors. ( Ia6604 )
  • For DoubleRangeUserStyleSetting & LongRangeUserStyleSetting : defaultValue , maximumValue and minimumValue are now kotlin properties. In addition, UserStyleSetting.Option functions like toBooleanOption, toCoplicationOptions, toListOption and similar have been removed. ( I52899 )
  • Add chin size to the properties of the device available to the watch face. ( I76e1e )
  • ComplicationHighlightRenderer 's constructor now accepts outlineExpansion and outlineStrokeWidth parameters. ( I87009 )
  • ComplicationDrawable.getNoDataText is now part of the public API. ( I00598 )

Version 1.0.0-alpha11

April 7, 2021

androidx.wear:wear-*:1.0.0-alpha11 is released. Version 1.0.0-alpha11 contains these commits.

ویژگی‌های جدید

  • More polish has been applied to the watch face APIs. Most of the changes are simple renamings but InteractiveWatchFaceWcsClient and InteractiveWatchFaceSysUiClient have been merged into InteractiveWatchFaceClient .

API Changes

  • ContentDescriptionLabel.text is now a ComplicationText rather than the old wearable support library TimeDependentText. ( I80c03 )
  • SystemProviders.GOOGLE_PAY is not guaranteed to be present on all Android R devices so it has been removed from the list. It's still possible to use this provider via DefaultComplicationProviderPolicy ( If01b5 )
  • We've renamed ComplicationUpdateCallback to ComplicationUpdateListener for consistency. ( I61ec7 )
  • The UserStyle wire format map has been changed to Map<String, byte[]> and for convenience a UserStyleData class has been added to the public API and is now used by wear-watchface-client and wear-watchface-editor. In addition CustomValueUserStyleSetting.CustomValueOption.value is now byte[] instead of String . ( Iaa103 )
  • UserStyleSetting and UserStyleSetting.Option now use UserStyleSetting.Id and UserStyleSetting.Option.Id respectively to store their ids rather than a String. ( I63f72 )
  • InteractiveWatchFaceClient.SystemState has been renamed to WatchUiState . ( I6a4e0 )
  • InteractiveWatchFaceWcsClient and InteractiveWatchFaceSysUiClient have been merged because it was hard to explain the division of responsibility ( Iff3fa )
  • Layer enum values have been renamed for clarity. Layer#TOP_LAYER is now Layer#COMPLICATIONS_OVERLAY and Layer#BASE_LAYER is now Layer#BASE ( Ia144e )
  • UserStyleListener has been renamed to UserStyleChangeListener ( I18524 )
  • UserStyleRepository has been renamed to CurrentUserStyleRepository ( I6ea53 )
  • InteractiveWatchFaceWcsClient.updateInstance has been renamed to updateWatchfaceInstance . ( I321dc )
  • WatchFace TapType events have been renamed to align with MotionEvents / Compose. ( I0dfd0 )
  • takeWatchfaceScreenshot has been renamed to renderWatchFaceToBitmap, and takeComplicationScreenshot has been renamed to renderComplicationToBitmap ( Ie0697 )
  • The CanvasComplication interface has been removed in favor of the open class CanvasComplicationDrawable. ( I1f81f )
  • WatcfaceControlServiceFactory has been removed from the public api. ( I1f8d3 )
  • We've renamed CanvasComplication.setData to CanvasComplication.loadData . ( If1239 )
  • ComplicationsManager.bringAttentionToComplication has been renamed to displayPressedAnimation . ( Ic4297 )
  • WatchFaceService.createWatchFace now has an @UiThread annotation. ( Ib54c2 )
  • Changed the name of a CanvasComplicationDrawable parameter to fix a bug. ( I50dac )
  • We've added HeadlessWatchFaceClient.toBundle() and HeadlessWatchFaceClient.createFromBundle to support sending HeadlessWatchFaceClient over AIDL. ( I07c35 )
  • HeadlessWatchFaceClient and InteractiveWatchFaceClient now have ClientDisconnectListener and isConnectionAlive() to allow you to observe if the connection is broken for some reason (eg the watchface being killed). ( Ie446d )
  • WatchFaceControlClient#getOrCreateWallpaperServiceBackedInteractiveWatchFaceWcsClientAsync is now a suspend function and has been renamed to getOrCreateInteractiveWatchFaceClient . ( Ib745d )
  • EditorState.commitChanges and hasCommitChanges() has been renamed to shouldCommitChanges() . ( I06e04 )
  • previewComplicationData has been renamed to previewComplicationsData to indicate theres (usually) more than one complication in the map. ( I56c06 )
  • InteractiveWatchFaceWcsClient.bringAttentionToComplication has been renamed to displayPressedAnimation for consistency with ComplicationsManager.displayPressedAnimation . ( Ic9999 )
  • All instances of watchface instance id have been encapsulated in a new WatchFaceId class ( I45fdf )
  • complicationState property has been renamed to complicationsState to indicate plurality. ( Ided07 )
  • We've removed the various wear-watchface-client Binder conversions, they should be necessary. ( Icc4c0 )
  • For consistency EditorServiceClient has been refactored to use listeners instead of observers. ( Iec3a4 )
  • We've added a couple of missing @Px annotations to InteractiveWatchFaceSysUiClient and WatchFaceControlClient . ( I3277a )
  • Renamed EditorObserverCallback to EditorObserverListener for consistency. ( Ie572d )
  • EditorState.watchFaceInstanceId is restricted to Android R API level and above and is no longer nullable. ( Id52bb )
  • EditorSession.launchComplicationProviderChooser has been renamed to openComplicationProviderChooser . ( I9d441 )
  • EditorSession.createOnWatchEditingSessionAsync has been renamed to createOnWatchEditingSession and is now a suspend function. ( Id257b )
  • Added several missing @UiThread annotations on EditorSession . ( I6935c )
  • UserStyleSetting.affectsLayers has been renamed to affectedLayers . ( I6e22b )

Version 1.0.0-alpha10

March 24, 2021

androidx.wear:wear-*:1.0.0-alpha10 is released. Version 1.0.0-alpha10 contains these commits.

ویژگی‌های جدید

  • It's now possible to create open gl objects (eg textures) during WatchFaceService.createWatchFace because GlesRenderer now requires an explicit call to initOpenGLContext which can be done inside createWatchFace.

API Changes

  • IdAndComplicationData was a bit awkward and has been removed from the public API. Classes & interfaces that used it have been refactored. ( I4c928 )
  • We've replaced ReferenceTime with CountUpTimeReference and CountDownTimeReference which are more self explanatory. ( Ib66c6 )
  • Added some missing @Px and @ColorInt annotations. ( I9bbc3 )
  • Complication.complicationConfigExtras is now non-nullable and defaults to Bundle.EMPTY . ( Iad04f )
  • GlesRenderer now requires you to call initOpenGLContext after construction. This function was an internal detail but is now on the public API to allow GL calls earlier inside createWatchFace. ( I726c2 )
  • We've removed Complication.setRenderer as it should not be needed. ( Ie992f )
  • Complicaiton.setComplicationBounds is no longer part of the public API. If you need to adjust the position of a complication, this can be done via ComplicationsUserStyleSetting . ( Ibd9e5 )
  • ComplicationsManager.TapCallback.onComplicationSingleTapped has been renamed to onComplicationTapped . ( I3a55c )
  • ComplicationOutlineRenderer.drawComplicationSelectOutline has been renamed to drawComplicationOutline . ( I14b88 )

Version 1.0.0-alpha09

March 10, 2021

androidx.wear:wear-complications-*:1.0.0-alpha09 and androidx.wear:wear-watchface-*:1.0.0-alpha09 are released. Version 1.0.0-alpha09 contains these commits.

ویژگی‌های جدید

  • The interface between WCS/SysUI host and the on watch face has evolved. It's now possible for an editor to determine if a style change will enable or disable a complication (enabled = initiallyEnabled plus any override from ComplicationsUserStyleSetting). Also EditorService.closeEditor allows SysUI to remotely close an on watch face editor if needed.
  • In addition InteractiveWatchFaceWcsClient.setUserStyle with a more powerful command updateInstance which: changes the instance ID, sets the style, and clears complications all in one go.

API Changes

  • TraceEvents have been added to the watchface libraries. ( I1a141 )
  • ComplicationState now has a new property initiallyEnabled which is useful for predicting the consequences of switching styles. ( I8c905 )
  • We've replaced InteractiveWatchFaceWcsClient.setUserStyle with a more powerful command updateInstance which: changes the instance ID, sets the style, and clears complications. ( Ife6f6 )
  • WatchFaceClient screenshot APIs no longer compress the screenshots because that was slow, instead we leave any post processing up to the caller. ( Id35af )
  • It's now possible to remotely close an on watchface editor via EditorService.closeEditor . ( Ic5aa4 )
  • Added nullability annotations ( Ic16ed )

Version 1.0.0-alpha08

February 24, 2021

androidx.wear:wear-*:1.0.0-alpha08 is released. Version 1.0.0-alpha08 contains these commits.

ویژگی‌های جدید

  • Some watch faces are designed around one or more specific complications, to support this we've added Complication.Builder#setFixedComplicationProvider which if set to true prevents the user from changing the complication in that slot.
  • The watchface libraries are Kotlin first and use coroutines (eg suspend functions). For Java users we've provided ListenableFuture wrappers to improve interoperability in the following libraries: wear/wear-watchface-guava, wear/wear-watchface-client-guava & wear/wear-watchface-editor-guava.

API Changes

  • We've removed support for double taps on complications launching the provider chooser, this feature wasn't common in watchfaces and complicated the implementation of SysUI. ( I3ef24 )
  • ProviderInfoRetriever methods may throw ServiceDisconnectedException if the binder closes unexpectedly. ( Ib2cc4 )
  • From Android 11 onwards, there are restrictions on when the ProviderChooser can be run, in addition we'd like editors to be built with the new wear-watchface-editor so ComplicationHelperActivity is being removed from the public API. ( Ib19c1 )
  • Remove ComplicationText static methods in favor of builders. ( Ibe399 )
  • We have introduced guava ListenableFuture wrappers for the various watch face library suspended methods. ( I16b2c )
  • For API clarity we've added a secondary constructor to RenderParameters which doesn't require a tint, for use with LayerModes other than LayerMode.DRAW_OUTLINED . ( I497ea )
  • Previously ListUserStyleSetting was different from the other because it had a default argument. Now all the StyleSetting subclass constructors take the default value last. ( I9dbfd )
  • CanvasComplication has been refactored to use have a hidden method, which makes it easier to implement a subclass ( I5b321 )
  • We have refactored away EditorResult in favor of a new EditorService and EditorSession.broadcastState() to stream updates to an observer (typically SysUI). ( Ic4370 )
  • Some watchfaces are built around a particular complication as an integral part of the watch face where the provider is not user configurable. To support this we've added Complication.Builder#setFixedComplicationProvider . ( I4509e )
  • EditorRequest now specifies package name rather than ComponentName because it was inconvenient for SysUI to look up the class name of the editor, and we only really need the package name. ( Ib6814 )

Version 1.0.0-alpha07

۱۰ فوریه ۲۰۲۱

androidx.wear:wear-*:1.0.0-alpha07 is released. Version 1.0.0-alpha07 contains these commits.

ویژگی‌های جدید

  • WatchFaceService.createWatchFace is now a suspend function which means the watchface no longer has to block the ui thread while waiting for IO. Similarly wear-watchface-editor and wear-complications-data

API Changes

  • Remove PhotoImage class and use Icon directly. ( I8a70b )
  • Expose the validTimeRange of ComplicationData. ( I91366 )
  • Make image-like attributes more explicit. ( I81700 )
  • wear-watchface-editor and wear-complications-data have been refactored to use suspend functions instead of coroutines. Rx java & Future compat wrappers to follow. ( If3c5f )
  • ProviderInfoRetriever now now throws PreviewNotAvailableException if requestPreviewComplicationData can't return preview data due to connection issues or lack of API support. ( I4964d )
  • WatchFaceControlService::createWatchFaceControlClient is now a suspended fuction and getOrCreateWallpaperServiceBackedInteractiveWatchFaceWcsClient is now called getOrCreateWallpaperServiceBackedInteractiveWatchFaceWcsClientAsync returning Deferred<InteractiveWatchFaceWcsClient> . RX java and Future compat wrappers to follow. ( I5d461 )
  • Rename CATEGORY_PROVIDER_CONFIG_ACTION to CATEGORY_PROVIDER_CONFIG . ( I7c068 )
  • Please note createOnWatchEditingSession is now a suspended function because the watchface sometimes isn't available until shortly after the editor activity has started. ( Ida9aa )
  • WatchFaceService.createWatchFace is now a suspend function which allows for async initialization, previously you would have had to block the main thread. ( If076a )
  • UserStyle now has an array operator and we've added casting helpers to UserStyle.Option. ( I35036 )
  • We've fixed a marshalling bug with UserStyle wireformats changing some of the unstable hidden API. ( I8be09 )
  • We've added CustomValueUserStyleSetting which lets you store a single application specific string within a UserStyle. The default watch face editors will ignore this value. ( Ic04d2 )
  • InstanceID is not passed in the intent extras for R and older versions of Android WearOS which we can't upgrade. To support this we now allow InstancID to be null. ( Id8b78 )
  • EditorRequest now includes the editor ComponentName which is set as the component in WatchFaceEditorContract.createIntent ( I3cd06 )
  • The watchface EditorResult now includes preview ComplicationData to allow the caller to take a screenshot of the watchface after editing. ( I2c561 )

Bug Fixes

  • Added toString() overrides to UserStyle, UserStyleSetting and UserStyleSchema which makes working with these classes a bit nicer. ( I9f5ec )

Version 1.0.0-alpha06

۲۷ ژانویه ۲۰۲۱

androidx.wear:wear-*:1.0.0-alpha06 is released. Version 1.0.0-alpha06 contains these commits.

ویژگی‌های جدید

  • We've introduced a new library wear/wear-watchface-editor which allows watch face developers and potentially OEMs to build a style and complication editor. SysUI will send an Intent to the watch face which will use the new EditorSession class to access WatchFace details and record the result via Activity.setWatchRequestResult. To support this we've added ProviderInfoRetriever.requestPreviewComplicationData which allows watch face editors to request preview ComplicationData. The advantage of preview ComplicationData is unlike live data you don't have to worry about showing permission dialogs when rendering your editor (note if a user selects a provider with a permission they will still be prompted to grant the permission).

API Changes

  • ComplicationProviderInfo now has a field for the provider's ComponentName, support for this field will be added to WearOS at a later date and in the meantime, it will be null. ( Id8fc4 )
  • We've added ProviderInfoRetriever.requestPreviewComplicationData which allows watch face editors to request preview ComplicationData. This is useful because live complications may require permissions and you can now display preview data for complications that are not active. ( I2e1df )
  • ComplicationManager is now an optional parameter of WatchFace constructor and the arguments have been reordered to allow this. ( I66c76 )
  • We've added an optional Bundle to Complications which if set gets merged in with the intent sent to launch the provider chooser activity. ( Ifd4ad )
  • We've added a new wear-watchface-editor library to support on watch face and SysUi hosted editors. SysUI will launch these editors by sending an intent. The watch face activity service can use the new EditorSession class to access WatchFace details and record the result via Activity.setWatchRequestResult. ( I2110d )
  • LayerMode.DRAW_HIGHLIGHTED is now called LayerMode.DRAW_OUTLINED and RenderParameters.highlightComplicationId is now called RenderParameters.selectedComplicationId which draws a highlight on the specified complication in addition to an outline. ( I90a40 )
  • WatchFaceControlClient.getOrCreateWallpaperServiceBackedInteractiveWatchFaceWcsClient's future can now resolve with a ServiceStartFailureException if the service dies while waiting for the watchface to be created. ( I0f509 )
  • EditorSession.complicationPreviewData is now a ListenableFuture because fetching this data is an asynchronous process. ( Iead9d )

Bug Fixes

  • We're removing unused fields from ComplicationOverlay leaving enabled and complicationBounds. ( I17b71 )

Version 1.0.0-alpha05

۱۳ ژانویه ۲۰۲۱

androidx.wear:wear-*:1.0.0-alpha05 is released. Version 1.0.0-alpha05 contains these commits.

ویژگی‌های جدید

Watchfaces often support a number of complication configurations with varying numbers of complications shown. To make this easier to set up we now support initially disabled complications by calling setEnabled(false) on the builder. These can be enabled later via ComplicationsUserStyleSetting.

API Changes

  • ComplicationHelperActivity now accepts Collection<ComplicationType> rather than an int array making it easier to use. ( I1f13d )
  • ProviderInfoRetriever.retrieveProviderInfo now correctly returns ListenableFuture<ProviderInfo[]> . ( If2710 )
  • You can now create an initially disabled complication by calling setEnabled(false) on the builder. ( Idaa53 )
  • WatchFaceState now has an isHeadless property which is only true for headless instances. ( Ifa900 )
  • ComplicationDrawable now optionally supports synchronous loading of drawables. This is used by the screenshot APIs. ( I34d4a )

Version 1.0.0-alpha04

December 16, 2020

androidx.wear:wear-*:1.0.0-alpha04 is released. Version 1.0.0-alpha04 contains these commits.

ویژگی‌های جدید

  • The wear watch face library now supports setting bounds per type. Eg you can switch to a wide bounding box for ComplicationType.LONG_TEXT whilst using a smaller bounding box for other types.

API Changes

  • Complications now use ComplicationBounds which wraps a Map<ComplicationType, RectF> to support per complication type sizes. ( I1ebe7 )
  • RenderParameters now lets you specify the highlight tint for use in screen shots. ( Iff42b )
  • With the exception of bounds you now have to use ComplicationsUserStyleSetting to modify complications, this is to ensure the OS is kept in sync. ( I8dc5d )
  • Renderer is now a sealed class. This means CanvasRenderer and GlesRenderer are now inner classes of Renderer. ( Iab5d4 , b/173803230 )
  • CanvasComplicationDrawable.drawHighlight renamed to drawOutline. ObservableWatchData now has a few missing UiThread annotations. ScreenState has now been fully removed from WatchState. ( If1393 )
  • The minimum API level for wear-watchface is now 25. Note hardware canvas support requires API level 26 or above. ( Ic9bbd )
  • InteractiveWatchFaceWcsClient now has a getComplicationIdAt helper. ( I05811 )
  • The API level for wear-watchface-client has been reduced to 25, however the screen shot APIs require API level 27. ( Id31c2 )

Bug Fixes

  • We now expose the complication's current ComplicationData's ComplicationType in ComplicationState. ( I9b390 )
  • InteractiveWatchFaceWcs now has a method `bringAttentionToComplication to briefly highlight the specified complication. ( I6d31c )
  • InteractiveWatchFaceWcsClient#setUserStyle now has an overload accepting Map which can potentially avoid an extra IPC round trip necessary to construct UserStyle. ( I24eec )

Version 1.0.0-alpha03

December 2, 2020

androidx.wear:wear-*:1.0.0-alpha03 is released. Version 1.0.0-alpha03 contains these commits.

ویژگی‌های جدید

The Complication class now has a compicationData property letting watch faces observe ComplicationData changes. This makes it possible to change the complication's dimensions based on the type of the complication.

Variable frame rates are now supported by assigning to Renderer.interactiveDrawModeUpdateDelayMillis. For watch faces which run short animations every second this can lead to good power savings by going to sleep when not animating.

API Changes

  • BACKGROUND_IMAGE has been renamed to PHOTO_IMAGE along with related classes. This type of complication is not exclusively used for backgrounds hence the name change. ( I995c6 )
  • DefaultComplicationProviderPolicy properly annotated with IntDefs. ( I3b431 )
  • The hidden TimeDependentText class is no longer exposed via ContentDescriptionLabel, instead we add an accessor to get the text at a specified time. ( Ica692 )
  • ObservableWatchData's constructor is now internal. ( I30121 , b/173802666 )
  • Complication now has compicationData letting watch faces observe ComplicationData changes. Complication also has a new isActiveAt call which can be used to tell if anything should be rendered at the provided datetime. ( Ic0e2a )
  • The empty SharedMemoryImage is no longer in the public API. ( I7ee17 )
  • WatchFace.overridePreviewReferenceTimeMillis now has an IntRange annotation and the getter and setter have consistent names. ( Ia5f78 )
  • Complication.Builder is now created via Complication.createRoundRectComplicationBuilder or Complication.createBackgroundComplicationBuilder for clarity ( I54063 )
  • Added WatchFace.TapListener which allows taps not consumed by complications to be observed by the WatchFace. ( Ic2fe1 , b/172721168 )
  • WatchFace now supports variable frame rates by assigning to Renderer.interactiveDrawModeUpdateDelayMillis . This can help preserve battery life by sleeping when not animating. ( I707c9 )
  • WatchFace.Builder is no longer needed and invalidate() and interactiveUpdateRateMillis have been moved to Renderer. ( I329ea )
  • For better java interoperability renamed getters for boolean properties in WatchState ( I6d2f1 )
  • Renamed TapListener to TapCallback and InvalidateCallback to InvalidateListener for consistency. ( I9414e )
  • Wear 2.0 watchface style options have been moved to their own class for clarity. WatchFace.Builder setters now have symmetrical WatchFace class getters. ( Iefdfc )
  • Added InteractiveWatchFaceWcsClient and WatchFaceControlClient.getOrCreateWallpaperServiceBackedInteractiveWatchFaceWcsClient which either gets an existing instance or creates it once the wallaper service has connected and made the engine. ( Id666e )
  • WatchFaceControlClient is now an interface to allow tests to mock it. ( I875d9 )
  • HeadlessWatchFaceClient, InteractiveWatchFaceSysUiClientImpl, InteractiveWatchFaceWcsClient are now interfaces to better facilitate testing. ( I7cdc3 )
  • Added annotations to methods in wear-watchface-complications-rendering ( I0d65c )

Bug Fixes

  • Remove screen shape from DeviceConfig, which was duplicating android.content.res.Configuration#isScreenRound() ( Ifadf4 )
  • Changed WatchFaceControlClient.getOrCreateWallpaperServiceBackedInteractiveWatchFaceWcsClient to accept a Map<String, String> instead of UserStyle because it's hard to create a UserStyle without knowing the schema which you can only get after the client has been created. ( Iea02a )
  • Fix InteractiveWatchFaceWcsClient to use ComplicationState instead of the wire format. ( Icb8a4 )
  • UserStyleSettings is now a sealed class because the watch face editors only understand the built in classes. ( I2d797 )

Version 1.0.0-alpha02

November 11, 2020

androidx.wear:wear-*:1.0.0-alpha02 is released. Version 1.0.0-alpha02 contains these commits.

API Changes

  • ComplicationDetails is now called ComplicationState and is properly wrapped and usages of wearable support @ComplicationData.ComplicationType have been migrated to androidx ComplicationType . ( I4dd36 )
  • Add an optional highlightedComplicationId parameter to RenderParameters which allows you to request highlighting of a single complication in screenshots. ( I66ce9 )
  • ComplicationProviderService to use new style complication api for consistency ( Id5aea )
  • getPreviewReferenceTimeMillis now gets reference times from DeviceConfig . ( I779fe )
  • Simplifying Renderer API surface, can use SurfaceHolder.Callback to observe changes instead. ( I210db )
  • CanvasComplicationRenderer doesn't extend from Renderer , renaming it for clarity. ( Ibe880 )

Bug Fixes

  • First version of androidx.wear:wear-watchface-client ( I1e35e )
  • Changed the name of GlesTextureComplication#renderer for clarity ( Ib78f7 )
  • Rename StyleCategory to StyleSetting for clarity ( I488c7 )
  • Adding UserStyleSchema for a cleaner API ( If36f8 )

Version 1.0.0-alpha01

October 28, 2020

androidx.wear:wear-complications-*:1.0.0-alpha01 and androidx.wear:wear-watchface-*:1.0.0-alpha01 are released. Version 1.0.0-alpha01 contains these commits.

API Changes

  • Removed some things we didn't intend to expose in public api. ( I41669 )
  • Create androidx.wear:wear-complications-provider library. ( I77f1f )
  • ComplicationsUserStyleCategory the new recommended category for configuring complications ( I96909 )
  • Add wear-complication-data API. ( I7c268 )
  • Functions with boolean return values to be prefixed with “is” rather than “get” ( If36ff )
  • API advice is to avoid using protected so this class has been refactored to take parameters in via the constructor. ( I61644 )
  • Rename setBackgroundComplication for clarity. ( I96fe3 )
  • Use Kotlin properties for ComplicationDrawable isHighlighted & data ( I4dcc8 )
  • Instead of ComplicationRenderer.InvalidateCallback we add Complication#invalidate() ( I4f4c6 )
  • These APIs are being deprecated in WearableSupport and are removed here. ( Ib425c )
  • Renamed some WatchFace builder methods to emphasize their wear 2.0 legacy nature. ( Idb775 )
  • First beta API candidate for wear/wear-watchface ( Id3981 )
  • First tracked version of the API. ( Ie9fe6 )
  • Properly hiding ComplicationDrawable.BorderStyle IntDef and move to ComplicationStyle for consistency. ( I27f7a )
  • Adding missing annotations for ComplicationStyle methods ( I838fd )
  • This library has no public API surface ( I88e2b )
  • All style category Option classes are now properly final. ( Ib8323 )
  • First tracked version of the API. ( I27c85 )

Bug Fixes

  • Changed ComplicationProviderService to have an explicit getComplicationPreviewData method. ( I4905f )
  • API lint check for MissingGetterMatchingBuilder is enabled for androidx ( I4bbea , b/138602561 )
  • Rename wear-complications-rendering. ( Ifea02 )
  • Style category display names are now CharSequences ( I28990 )
  • Replacing Override with Overlay to match current themes & styles naming conventions. ( I4fde9 )
  • Renamed UserStyle#getOptions for clarity. ( I695b6 )