Developing apps on AOS 8.x - Wear OS Q&A, Help & Troubleshooting

Hi everyone,
I'm a bit new to watch / wear os dev but have lots of experience in .net and java. I've developed an app for AOS 9 and am doing some testing (sports app) - but have a bucket of older watches on hand that I feel I could use for extended testing if I could just deploy the app to the watches. Specifically, I have Ticwatch e and s watches here along with some random fossil watches. Anyway, is there a way to develop apps deployable to AOS 8 watches? I understand I'll need to sideload the apk since I can't upload to the store, but it would at least mean I get some use out of these watches! Thanks for the advice.

When you make your app, set the minimum version low enough to target Android 8. You can target whatever is current, just ensure the minimum is low enough.
I used a TicWatch E until fairly recently so this is how I made my custom watch face.

a1291762 said:
When you make your app, set the minimum version low enough to target Android 8. You can target whatever is current, just ensure the minimum is low enough.
I used a TicWatch E until fairly recently so this is how I made my custom watch face.
Click to expand...
Click to collapse
I looked up my build.gradle for the settings...
Code:
android {
compileSdk 31 // Android 12
defaultConfig {
minSdk 26 // Android 8
targetSdk 30 // Android 11
...
dependencies {
implementation 'com.google.android.support:wearable:2.8.1'
compileOnly 'com.google.android.wearable:wearable:2.8.1'
implementation "androidx.wear:wear:1.2.0"
I am compiling against Android 12 because the androidx.wear:wear:1.2.0 dependency requires that.
I'm targeting Android 11 because that's what the Android Studio Wear OS 3 emulator image runs (so it is something I'm actually testing, just not on hardware). The minimum is Android 8 so I can run the resulting APK on a TicWatch E.
You'll notice I am using the old android support wearable dependency. I had some old code and examples I started from and I wasn't much interested in translating it all into the new androidx interfaces. If you're starting from scratch, or you're already using androidx interfaces, you should be able to continue doing so. Note that Google officially states "The Wearable Support Library does not work on Wear OS 3." but ... it works fine on the emulator image, at least the things I use do.

Related

Android Hacker/Developer/Technologist needed for a 120 hour 100% remote project

We have an immediate need for an Android Technologist / Hacker. This project will take around 100-120 hours and there will be future projects available if the person is interested. All work can be done from home (100% remote).
Our company creates digital marketing experiences for national brands at sporting and entertainment events, retails stores, conventions etc. We recently completed a large project for the Super Bowl and we also have exhibits at the Final Four and many other large events.
The first large project will be to make a 360 degree photo booth using android cameras. We want to be able to press a button and have all the cameras take a picture at the same time. We need this person to hack the android devices so that they can trigger their cameras in real time and then save the images locally so the client can pull them off the devices.
Requirements/Skills of the Android Technologist / Hacker:
• Strong experience rooting, networking and streamlining android devices.
• Basic android app development skills (functionality, not front-end development).
• Ability to work independently (100% remote).
• Ability to tackle the project described above.
If you have any interest please email me at [email protected]

Anything similar to Pebblekit JS?

The Wear SDK doesn't appear to have anything similar to the Pebblekit JS Framework. Does this mean that any watch app that wants to access the internet (such as a simple weather app) will need a dedicated companion phone app? Or am I missing something?
The Wear emulator technically looks like Android, but on a small screen, and with a different "launcher".
You can run many existing Android apps on it. I tried one of mine, and it worked, more or less, but the UI was squished as would be expected.
This is why it's called "Android Wear". It's just an Android variant. There may be some "normal" Android APIs it won't support, and there will be watch specific APIs I'm sure.
IMO, it makes sense and is smart of Google to do this. I don't want to deal with 10 different smartwatch OS's.
NOW is the time for a bigger, richer smartwatch OS, because it's now possible to put enough ARM compute power in a watch sized device.
I presume that Google Play will support watch apps at some point. And I'm looking forward to seeing custom watch ROMs. I hope there won't be too much locking down of devices, or at least a Nexus watch or 2 that can be unlocked.
I agree with all of your comments, but I also think the cool thing about pebble is that I can write a watch app that will, for example, get weather from a JSON source on the internet without requiring the user to install another phone app. I don't think you can do that with Wear.

[Request] android 6.0 (mm) project treble ROM. Please create one - urgent

Hi... I have a Razer Phone and in my car I have this Sony Head unit called XSP-N1BT that uses smartphone display as the head unit display upon mounting. It's a great deck, but it doesn't have any on deck control for anything except source and vol + and -
All other settings like menu, sound enhabcements Bluetotth setup, etc are either on the physical small remote controller that came along with it, or by the use of this App from Sony called AppRemote (available on Play Store).
As the head unit has been discontinued by Sony and it's psy its support period, they won't update that app and therefore it cannot be run on nougat or higher android OS. instead of showing source input selection grid with USB, Bluetooth, CD, etc it shows the background image of the sake view, but no input selection icons and in Tue background in tiny letters you can see an HTML code.. Guess it has something to do with nougat and Oreo webview enhancements. I tried installing Marshmallows web view alone and that doesn't really do anything.
So either I need to figure out a way get the app running on nougat+ Oreo (which I doubt I'd have luck with) or I need to find a way to loaf marhmallow on my Razer phone through project treble.
Hope someone here can help. Thanks.
Project treble is only for android 8 and above...
Android 6.0 treble? loooooool . Are you kidding me ?
Dude go and read what project treble is and from when it started, so you won't create a thread like this again.
Sent from my HTC U12+ using XDA Labs
This doesn't make any sense as Treble is only available on Oreo and later.
Thread closed.

A wear OS capable watch for developing custom app on?

Hi, I want to hack together an android app for my own needs and side load it on a wearable running, or capable or running, wear os. My hardware requirements are minimal: no SIM, GPS, haptics or any special hardware required -- just something cheap and readily available in China, where I am now. I see the name Ticwatch cropping up on these forums, but might be overkill.
What are the odds I can load Wear OS on a random android-looking device off Taobao?
Thanks for any recommendations.

Watchface complications

Hello All,
I am developing a watchface in Android studio in java targeting Android 12.
I need to add complications data on my watchface. I want that complication should be set to a default system complication without requiring user to configure it.
I also found it challenging to handle double click/touch gesture on the complications in wear os.
Is there any good and complete tutorial/guide/sample for adding complications on wear os watchfaces in java?
I found one sample on the android developer website but it is not sufficient.
Any help would be much appreciated.
Thanks all.
Teste
salwan.hemant said:
I want that complication should be set to a default system complication without requiring user to configure it.
Click to expand...
Click to collapse
I'm not sure that is even possible? The whole complication system gets data from the system. Your watch face only gets to receive the data the user has allowed via the system dialog your app invokes.
salwan.hemant said:
I also found it challenging to handle double click/touch gesture on the complications in wear os.
Click to expand...
Click to collapse
I made a watch face, but ended up not using the system's support for drawing complications, rather I grabbed the data and did the drawing myself. That also made it trivial to handle clicking, since there isn't anything else to capture events.
The example I link to below suggests you can just not pass tap events to the drawable (if it's not doing what you want). I'm going to guess the standard thing is just to invoke the pending intent, which you can do yourself.
salwan.hemant said:
Is there any good and complete tutorial/guide/sample for adding complications on wear os watchfaces in java?
Click to expand...
Click to collapse
I found this project to be useful...
GitHub - android/wear-os-samples: Multiple samples showing best practices in app and watch face development on Wear OS.
Multiple samples showing best practices in app and watch face development on Wear OS. - GitHub - android/wear-os-samples: Multiple samples showing best practices in app and watch face development o...
github.com
But since I was targeting an older watch (stuck on Android 8) and using Java, I had to go back to a much older version of the code.
git checkout 5c2e340

Categories

Resources