Page 1 of 1

Action: "Set interruptions mode (Android Wear)"

Posted: 29 Mar 2019 00:13
by moonspeak
I would really love an action to be able to toggle Do Not Disturb mode on my Wear OS watch from AM. I know it is set in the global setting "zen_mode", but unfortunately, AM can't touch that specifically.

Alternatively, I know AM says it cannot change global settings on Wear, but what if we enabled it via ADB? I know that can be done for a phone. I tried to manually do it, but ADB says the package has not requested the permission, but presumably, it could be done if the AM app on Wear requested it, right? Or am I missing something?

Re: Action: "Set interruptions mode (Android Wear)"

Posted: 30 Mar 2019 02:13
by Desmanto
I never use android wear and actuallly thinking to buy one. But the price is still high, sometimes I wonder how can it be more expensive than my current phone.

Do you install Automagic too on Android wear? (I wonder if it is possible). If yes, then you probably can use adb to grant the write secure setting and use Automagic on Android Wear to set the setting. I actually still don't understand how all Automagic android wear actions communicate to the android wear itself.

BTW, how do you use Automagic with android wear in your daily flow? I am thinking to buy one if it can let say, show some notif from phone to the watch, execute flow from the watch and can be set with widget/multiple choices input dialog, or any other remote function. Currently i am using mi band 2, and it require additional app to communicate to Automagic. And the choice of remote function is very limited, as it only has one button.

Re: Action: "Set interruptions mode (Android Wear)"

Posted: 05 Apr 2019 17:54
by moonspeak
Desmanto wrote:I never use android wear and actuallly thinking to buy one. But the price is still high, sometimes I wonder how can it be more expensive than my current phone.

Do you install Automagic too on Android wear? (I wonder if it is possible). If yes, then you probably can use adb to grant the write secure setting and use Automagic on Android Wear to set the setting. I actually still don't understand how all Automagic android wear actions communicate to the android wear itself.

BTW, how do you use Automagic with android wear in your daily flow? I am thinking to buy one if it can let say, show some notif from phone to the watch, execute flow from the watch and can be set with widget/multiple choices input dialog, or any other remote function. Currently i am using mi band 2, and it require additional app to communicate to Automagic. And the choice of remote function is very limited, as it only has one button.
Automagic has a Wear OS app. There is a Play Store on the watch where you can browse all apps made specifically for Wear OS. The watch will also list all the apps that match ones installed on your phone so you can easily install the ones you want. But they're not exactly like the phone versions, of course. They're mostly simplified or companion apps.

The Automagic app on Wear OS communicates both ways. The backend part allows all the Automagic actions that have "(Android Wear)" to make the watch do various things, such as displaying widgets, making it vibrate, showing a toast notification (so, yes to "show some notif from phone to the watch"), or changing a system setting (but not global or secure settings sadly). The frontend app on the watch is a shortcut launcher. In Automagic on the phone, you have a "Shortcut (Android Wear)" trigger. You can use this trigger on as many flows as you want and then when you launch the app on your watch, it simply lists all of them by name (you name each shortcut) and you launch whichever one you want (so, yes to "execute flow from the watch"). So you really have the ability to manually launch anything that Automagic can do, which means the possibilities are endless. I have it set up with actions that control my Philips Hue smart lights, but I honestly don't use it too often because I actually feel like it's quicker and easier to pick up my phone for that since I'm at home anyway. But I haven't used it for much else because I mostly use AM for automatically handling things and when I use it for manual actions/shortcuts, it's generally something that I'm going to be doing on the phone anyway so it doesn't make sense to launch it from the watch. However, some things I could think of using it for are a "find my phone" to make it ring or to make it ring like a rake phone call for when you want to get out of a meeting or some other interaction :lol: I'm sure you can imagine up some good uses.

Also, you can sideload any APK onto a Wear OS device, but since the screen is so small (and rounded in most cases), it is very difficult to use any app that isn't designed for Wear OS. I had installed Magisk and Substratum on a previous watch to theme the UI with black backgrounds and just granting root to substratum and navigating substratum to install the overlays was difficult enough. Thankfully Google finally updated Wear OS a while back to use all black backgrounds out of the box, so that is no longer necessary.

As for remote function, not all watches only have one button. I have a Fossil Sport and it has two (plus a third with rotating crown, but the button can't be a shortcut since it's used as the home button and long press for Google Assistant). You could set any of the buttons to launch the AM shortcut launcher for quick access, but I personally have mine set up for Timer and Google Pay. Another thing to note is that watchfaces can be powerful too. There are a lot of watch faces available that let you add complications, one of which can be a shortcut to launch any app on the watch... so you see where I'm going with that.

Anyway, I believe all or most of Fossil's current Wear OS watches have the same button setup. I wish they'd add support for double and long-press though so we could have more shortcuts. But I'd definitely say they make the best overall Wear OS smartwatches if you're going to consider getting one. I'm not sure where you live, but you could go check them out their whole lineup at a Fossil store if there's one near you. That's what I did and it was really great. I realized the Sport looks so much better in person than in their renders online. And it's extremely lightweight and comfortable and surprisingly 'short' (doesn't stick up off the wrist so much). My previous smartwatches looked like hockey pucks. The performance and battery life blow my previous watches out of the water as well. It also has a really well-thought-out charging base that is designed so you can plop it on at any rotation and the contacts will connect (they're circular around the whole bottom of the watch). My past two watches had extremely finicky and annoying charging stands where you had to make sure the watch was on perfectly to connect.

But yeah, it is still difficult to justify the price of these things. I would say it's not really worth it, but I'm a geek for gadgets and fashion, so a watch gets my heavy interest, lol. I think I get enough use out of it and find it stylish enough that I am satisfied with the purchase, but there is still so much potential that the platform simply isn't reaching. I just really hope I don't wake up one day to an article about Google stopping development of Wear OS...

PS: That's cool about the Mi Band, I didn't know it could communicate with AM at all. I used to have the first generation Mi Fit band several years ago, but never got it connected with AM, haha.

Re: Action: "Set interruptions mode (Android Wear)"

Posted: 06 Apr 2019 16:50
by Desmanto
Oh, that's nice. So Automagic on Phone communicate with the Automagic wear app version both ways. Many thanks for the information. Thanks to your post, now I am looking for it again (actually my passion to search for the smartwatch has subsided last week). But I can't find any fossil smartwatch here (Indonesia). The only more popular one is Ticwatch and several friends also recommend it, ticwatch E. Although using mediatek, but most of the review only have minor complaint. It doesn't have NFC though, I can deal with it. There is newer E2, but I have search all online store, no one selling it. I prefer not to buy overseas. Besides, E2 also more expensive. Ticwatch E seems to be perfect choice for now.

I am thinking some niche usage, such as secretly recording the conversation, remote control (camera shutter, media control, marking location), some basic task such as timer, stopwatch, compass or generic info from phone. I will look into the adb secure setting later too. Of course, I will think more about it after using it and see what it can do. But same here, Sometimes I wonder if it really worth it. But for the passion, I should at least give it a test. It also replace my dying mi band 2 screen.

Hope that google keep the wear OS long enough. And Qualcomm/mediatek will release even better chip which can last even longer with the same battery.

Mi Band 2 only connect with very limited function. Only that single touch button is available, and it is very difficult to use it as double/triple tap. Since It has only one button and almost no OS.

Re: Action: "Set interruptions mode (Android Wear)"

Posted: 11 Apr 2019 05:57
by Desmanto
My Ticwatch E has arrived yesterday. Downloaded Automagic companion app, and yes it behaves just like runtime, which to receive and do whatever Phone's Automagic command. Great, I have thought a lot of possibility of what to do with it.

But the battery life is terrible, lasted only about 10 hours :( , with average 10% drain/hour. yeah, I use the watch occassionally. I have disabled some of the apps and turning off some function to see if it can improve the battery life. But it seems it will drain a lot during the next several days, as I setup a lot of things.

I love that we can show widget at the watch. I have designed a simple widget with circle as big as the watch, then put 3x3 action button there. I can then have 9 choices of launching any shortcut. I can multiply it by utilizing the long press and double tap too, but maybe later. I should build a map to assign each action to its according flow.

============================
For the adb, you can enable debugging at the watch and debug over bluetooth from the wear OS app at the phone : https://www.theandroidsoul.com/enable-a ... ear-watch/

But you can't use localhost when connecting, as it resolve to IPv6. Have to use manual 127.0.0.1 IPv4. Here is the command at mine to enable adb, connect and then go to the shell.

Code: Select all

adb forward tcp:4444 localabstract:/adb-hub
adb connect 127.0.0.1:4444
adb -s 127.0.0.1:4444 shell
I tried to enable the write secure setting

Code: Select all

pm grant ch.gridvision.ppam.androidautomagic android.permission.WRITE_SECURE_SETTINGS
But unfortunately Automagic wear companion app doesn't have the permission.

Code: Select all

Operation not allowed: java.lang.SecurityException: Package ch.gridvision.ppam.androidautomagic has not requested permission android.permission.WRITE_SECURE_SETTINGS
@Martin : Maybe you can add the permission to the companion app.

Re: Action: "Set interruptions mode (Android Wear)"

Posted: 18 Apr 2019 21:14
by moonspeak
Desmanto wrote:
11 Apr 2019 05:57
My Ticwatch E has arrived yesterday. Downloaded Automagic companion app, and yes it behaves just like runtime, which to receive and do whatever Phone's Automagic command. Great, I have thought a lot of possibility of what to do with it.

But the battery life is terrible, lasted only about 10 hours :( , with average 10% drain/hour. yeah, I use the watch occassionally. I have disabled some of the apps and turning off some function to see if it can improve the battery life. But it seems it will drain a lot during the next several days, as I setup a lot of things.

I love that we can show widget at the watch. I have designed a simple widget with circle as big as the watch, then put 3x3 action button there. I can then have 9 choices of launching any shortcut. I can multiply it by utilizing the long press and double tap too, but maybe later. I should build a map to assign each action to its according flow.

============================
For the adb, you can enable debugging at the watch and debug over bluetooth from the wear OS app at the phone : https://www.theandroidsoul.com/enable-a ... ear-watch/

But you can't use localhost when connecting, as it resolve to IPv6. Have to use manual 127.0.0.1 IPv4. Here is the command at mine to enable adb, connect and then go to the shell.

Code: Select all

adb forward tcp:4444 localabstract:/adb-hub
adb connect 127.0.0.1:4444
adb -s 127.0.0.1:4444 shell
I tried to enable the write secure setting

Code: Select all

pm grant ch.gridvision.ppam.androidautomagic android.permission.WRITE_SECURE_SETTINGS
But unfortunately Automagic wear companion app doesn't have the permission.

Code: Select all

Operation not allowed: java.lang.SecurityException: Package ch.gridvision.ppam.androidautomagic has not requested permission android.permission.WRITE_SECURE_SETTINGS
@Martin : Maybe you can add the permission to the companion app.
Yep, that was my experience as well. I don't see any reason the companion app can't request the permission on Wear OS, though. Maybe Martin tried before and knows more than us, but maybe things have changed as Wear OS has changed. Hopefully he can add it, as it would be extremely useful. I'm not sure if he's seen this thread though since he hasn't replied, but I don't really want to nag him about it, lol.

Glad I could help with the info and glad you're finding good uses for it :)

Btw, if you're trying to save battery, disable WiFi on the watch. It's on by default but not really necessary. With it on, the watch will connect to WiFi when you go out of range from your phone, but I don't know what it actually gains from the connection (never noticed if it still receives notifications or what), but the WiFi drains a LOT of battery even when you're in range and connected to the phone by bluetooth. I was amazed the first time I disabled it.

Oh, but one thing WiFi on the watch is good for is ADB over WiFi. I find it much more convenient than Bluetooth. You don't have to connect any USB cables or touch your phone at all. Just let the watch connect to the WiFi, get the IP and port from under "Debug over Wi-Fi" in developer options, and then from a PC on the same network you just "ADB connect IP:Port" and you're in.

Re: Action: "Set interruptions mode (Android Wear)"

Posted: 20 Apr 2019 17:01
by Desmanto
Yeah, Android Wear is such a niche market. It is even less user who marry the Wear OS with Automagic. So I can wait for the permission. :)

It has been more than a week, and I get used to it already. The wifi is disabled already from beginning. After uninstalled all the ticwatch built-in bloatware, disable location and many other unused feature, now the watch only consume 3-5%/hour. With minimum-moderate usage, it surely last 24 hours. But I always charge it when possible. At least it can pass thru the office time without problem, that's ok already.

Wifi adb seems much easier, but I think I am gonna stick with the bluetooth method, as I don't use the adb for the watch so much.

I have designed a full working widget with 3x3 buttons, for remote control Google Camera. It has shutter button, zoom in/out, focus/exposure up/down, night mode, timer and view last photo. I even made a secret photo taker too. Widget really unlock the whole new level usage of the wear OS. In the middle of creating the flow, I have to create another flowception to help creating action for all those buttons. It is really painful to select each of those 3x3 widget button and assign the same execute flow and point to the same flow. The additional flowception helps me to save those time.


BTW, maybe you know some wear apps that can stream the sensor value from the Wear OS to Automagic? I know WearMouse, which can be used as mouse. But I mean some gesture recorder for the sensor (gyro + accelero). I have had the idea since 2014, where I can wave my hand or put some gesture, and then it will execute the flow. This way, I can emulate wave my hand to right, it will show the next photo. Wave left, show previous photo. Something like that. (or maybe Automagic can implement this). This certainly will drain the battery like crazy, but of course I will only use it when needed (activate the flow by widget). Imagine than you can wave right and change the color of the (yeelight) bulb, raise up the hand to increase the brightness. This is very good for show-off or prank :D So I don't even need to tell them when they asked me what I can do with the watch, just show them :D