Share My Creation Developing for Wear OS

I've created an application that runs on Android, Wear OS, and iOS. My goal for Wear OS was to provide a User Interface that accounts for small screen and not so small fingers. To that end I used staggered buttons that all the user to click on end of button with no button above of below.

watchSmall.png

and
watchButtonsSmall.png

Then buttons are scrollable so easy to get the button you want in middle of screen.

In addition, when they click on a button that requires numeric entry I popup a form to provide them with value requirement.
watchEntrySmall.png

Buttons with multiple choices provide a scrollable list.
wtachListSmall.png

The interesting thing is that I can compile with Release and it will upload the APK to my table or phone and it works. Would be nice for small phones.

Anyway, you can develop for a Wear OS device using standard B4A compiler without using Watchface libs. You can have the regular Android app and the Wear app maintained and deployed using one Google Play app!

One note is that I haven't been successful deploying from the PC to the watch using B4A (posted issued in March) so I use ADB to install it and it works fine.
 

ilan

Expert
Licensed User
Longtime User
are you saying that we can develop android wear apps without any need of libs? just set the right variant size and create the app with b4a and compile it to apk?
 

Dave G

Active Member
Licensed User
That is correct. My only library is core. The generated APK can be installed in Wear OS or Android phone/tablet! I added mention of 'wear' in manifest (see below) so Google Play sees it as a Wear app. BTW, I wasn't able to Debug or Release directly to watch, so I use ADB to install it. I posted the issue back in March but never heard back.

AddManifestText(
<uses-feature android:name="android.hardware.type.watch" />
)
AddApplicationText(
<meta-data android:name="com.google.android.wearable.standalone" android:value="true" />
)
 

Dave G

Active Member
Licensed User
BTW, you can upload regular APK to Google Play as well as the Wear OS APK separately for the same Play App so users can install the correct one on their device. If you have a Wear OS watch registered via Google Play then when you do to to Google Play via browser and search Winch Calc it will show you your Android devices as well as Wear OS devices. You can 'push' an install to the Wear OS device! Easy, breezy. I was pleasantly surprised. I used a ListView to show options and it scrolls just fine on the watch!
 

Raywingit

Member
Licensed User
Longtime User
I made a WEAR OS app that needed piggy-backing on the phone App, a few years ago, and had to de-couple it recently as the leap-frog install is no longer supported. Great. But I am buying a Wear with screen size not square and not round (and not round and clipped-off at top/bottom) -- so it is 640 x 480.
Having issues getting an AVD up with an oblong face. I don't mind it not being WEAR specific. I think the AVD manager in Studio allowed any sizes, but in B4A there's a limited selection. Oh god I hope I don't have to run Studio just to get the right AVD.
 

Dave G

Active Member
Licensed User
I didn't use an AVD. I simply connected my watch (TicWatch) via USB and compiled the app onto the watch and tested it. I handled the round watch by adding margins around my forms until it worked. I also pushed the APK to the watch using android utilities. My app runs on the watch as well as phone or tablet!
 
Top