[FREE] BezelControl for Wear OS device

An extension for those who are trying to write applications for watches based on Wear OS devices
, it controls the actions of the bezel.
it is based on the wearable-2.8.1 library, but there is no other way and therefore the extension has a lot of weight.
perhaps in the future I will add functions from this library.
briefly about the blocks that do not require additional explanations :

To activate the bezel control, it should be initiated. then it is tracked in events. I also added a function that puts the focus on the component that will be scrolled by the bezel.

WearBezelControl.aix (821.4 KB)

3 Likes

That is will be awesome if you add demo.
And can you share url of this lib

It’s not easy to get a demo from a watch. and most importantly, it is not required. the operations are described and verified. and the link to the library is here: https://maven.google.com/com/google/android/wearable/wearable/2.8.1/wearable-2.8.1.aar
it contains enough sections for creativity.

1 Like

Whats’s the easiest way to generate a apk which was declared as wearable app. I want to install the apk on my phone and it should be sync to wearable.
I think it’s possible to add something to the manifest, anyone know more?

It is not clear what “synchronized with a wearable device” means? if you mean to synchronize data, then you need one program on your watch and another on your phone. the answer to the first part of the question “declared as a wearable device application” in the application manifest should be:
"uses-feature android:name=“android.hardware.type.watch”
to indicate that your application can work independently, you should specify:
"meta-data
android:name=“com.google.android.wearable.standalone”
android:value=“true”

If you want the app to sync with your mobile device and install on your phone, this parameter can be omitted or set to false

1 Like

I need a solution to easy install a application on a watch, without adb and developer mode. I want to provide a watch app in play store. No data exchange between phone and watch.
When i installed the app on my phone it should also automatic installed on my watch.

why did you decide that it should be fixed on the clock?
To make this happen, you must have TWO applications

  1. Đžne for the watch and the other for the phone. these are different apk.
  2. Have a place on Google market. one apk is in the WEAR section, the other is in the ANDROID section
  3. Have unique signatures from Google
  4. the manifest indicates the dependence of one on the other.
    …
    you will do all further actions manually by editing the apk.
    In any case, it is required :
    Communication via Google Play Console:
    You publish two separate APKs: one for a smartphone and one for a device running Wear OS.
    In the Google Play Console, you can link them as “Companion Apps”.
  5. in the manifest for the apk telefon , you must add:
<application>
    ....   
    <meta-data
        android:name="com.google.android.wearable.beta.app" 
        android:resource="@xml/wearable_app_desc"/>
</application>

2.The XML file must be created:
wearable_app_desc.xml in the res/xml/ file with the contents:

<?xml version="1.0" encoding="utf-8"?>
<wearableApp package="com.example.wearable (youname)">
    <versionCode>1</versionCode> <! version APK Wear OS -->
    <versionName>1.0</versionName> <!-- version name APK Wear OS -->
</wearableApp>
  1. In the Wear OS-apk manifest, add information about compatibility with the wearable device as I indicated earlier:
<application>
    <meta-data
        android:name="com.google.android.wearable.standalone"
        android:value="false"/>
</application>

//// In general, this topic does not concern the extension. perhaps another section of the forum should be kept on this topic/////

Good Job little Kitty :cat: