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.
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
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
Đžne for the watch and the other for the phone. these are different apk.
Have a place on Google market. one apk is in the WEAR section, the other is in the ANDROID section
Have unique signatures from Google
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”.
in the manifest for the apk telefon , you must add:
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>
In the Wear OS-apk manifest, add information about compatibility with the wearable device as I indicated earlier: