Some details about how this module is used for watch face generation.
The assets directory holds the necessary Watch Face Format resources, namely AndroidManifest.xml,
watchface.xml, watch_face_info.xml and so on. These files are exactly as output by a tool such as
the Figma plugin, Watch Face Designer.
In order to modify these to show the Androidify bot, adjust an <Image> tag to point to the "bot"
resource, e.g. <Image resource="bot"/>: In compiling the APK, the bot.png file will be added, so
this resource will be available to the watch face.
You should ensure that any unnecessary images are removed from res/drawable, for example if Watch
Face Designer outputted a placeholder image that you are replacing for bot.png, remove the
placeholder image (it's likely large!). Furthermore, ensure that the images are optimized, for
example, using pngquant on all images, to help keep the watch face size to a minimum.
To package the watch face, the Pack is used. This is a native
library, so the pre-builts are provided in jniLibs.
A script is also included for building these fresh, but that is generally not necessary when building Androidify.
However, if you do wish to build these, follow these steps in order to run the script:
- Install the Android NDK.
- Install Rust and Cargo.
- Make a copy of
watchface/pack-java/.cargo-exampleaswatchface/pack-java/.cargo. - Open
watchface/pack-java/.cargo/config.toml. - Adjust all the
linkerandarpaths, replacing<NDK_PATH>with the absolute path to your Android NDK installation. Note that each linker must support API level 26 and above, to match the AndroidifyminSdk. For example:armv7a-linux-androideabi26-clang. - Execute the
watchface/provide-libraries-to-androidify-project.shscript. This will build the native libraries and copy them to thejniLibsdirectory.