android icon indicating copy to clipboard operation
android copied to clipboard

Add support for Device Control API without auth (pending Android 13)

Open strikeir13 opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe.

In Android 11, even if a device were secured with a PIN/fingerprint/passcode/password, the smart home/device control menu could be operated without requiring the device to be unlocked. It appears that Android 13 will allow something similar on a per-app basis. I think having this implemented in the Home Assistant Android app would be widely appreciated. Some news coverage of this feature can be found here: https://blog.esper.io/android-dessert-bites-17-control-devices-without-auth-19481628/ The article includes a link to the Android 13 API in question, as well. Describe the solution you'd like

Having the option be configurable in the app would be best so as to satisfy users that prefer the Android 12 behavior (requiring auth) as well as users that want controls to be available without unlocking the device. Describe alternatives you've considered, if any

Rolling back to Android 11?? Only kidding - there aren't any options on Android 12 to use the smart home controls/device control menu without unlocking the phone. Additional context

I fully anticipate that the devs and community behind the Android app may have seen this news just like I did, but if not, I just wanted to get it on the radar. Also, please feel free to close this since it's based on unreleased Android 13 APIs.

Thank you to the HA Android team for everything you do!

strikeir13 avatar Mar 18 '22 16:03 strikeir13

Looks like this is on a per control basis according to the docs :)

https://developer.android.com/reference/android/service/controls/Control.StatefulBuilder#setAuthRequired(boolean)

dshokouhi avatar Mar 18 '22 16:03 dshokouhi

This would be awesome!

vladyspavlov avatar Jun 11 '22 18:06 vladyspavlov

Android 13 is out! The Google Home now supports the device-locked use of HA entities when synced with Google, but would be great to have the native HA app support this, too! I'm more than happy to test if needed.

strikeir13 avatar Aug 16 '22 12:08 strikeir13

This will have to come after #2682 but may be held up by the wear OS Android 13 bug mentioned in the issue.

dshokouhi avatar Aug 16 '22 13:08 dshokouhi

Just got the update to Android 13, would love to see this implemented to get this functionality. It's a shame google took away that awesome power button menu from Android 11 and just scrapped it. At least this update will make me use the native device controls again. Thanks for you hard work!

AABatteries avatar Aug 17 '22 15:08 AABatteries

This will have to come after #2682 but may be held up by the wear OS Android 13 bug mentioned in the issue.

Not necessarily, the app needs to start using the Android 13 SDK to add this but it doesn't need to target it (which the referenced PR does). Submitted a PR to implement this a few minutes ago 😀

jpelgrom avatar Aug 25 '22 18:08 jpelgrom