-
-
Notifications
You must be signed in to change notification settings - Fork 676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add authentication to widget buttons #2798
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! Just a few notes.
Have you tried using a transparent activity? I think it looks better but haven't extensively tested (also can't make a screenshot due to the keyguard 😉).
app/src/main/java/io/homeassistant/companion/android/widgets/button/ButtonWidget.kt
Outdated
Show resolved
Hide resolved
.../main/java/io/homeassistant/companion/android/widgets/common/WidgetAuthenticationActivity.kt
Outdated
Show resolved
Hide resolved
...main/java/io/homeassistant/companion/android/widgets/button/ButtonWidgetConfigureActivity.kt
Outdated
Show resolved
Hide resolved
I didn't know that something like a transparent theme existed - I've never written an Android app, only contributed to some, so my knowledge is very limited on this end. I'll see how it looks / works. |
@jpelgrom I think that I addressed all your comments. The transparent theme looks indeed very good, thanks for the suggestion! |
app/src/main/java/io/homeassistant/companion/android/widgets/button/ButtonWidget.kt
Outdated
Show resolved
Hide resolved
.../main/java/io/homeassistant/companion/android/widgets/common/WidgetAuthenticationActivity.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more thing, sorry I didn't catch it sooner.
...main/java/io/homeassistant/companion/android/widgets/button/ButtonWidgetConfigureActivity.kt
Outdated
Show resolved
Hide resolved
No worries, we are constantly making progress and you are very quick in doing the review! |
I think it's good, just need you to resolve the merge conflict. |
Rebased and pushed :) |
Do I need to do something else before this can be merged? |
Sorry I forgot to click on the approve button Merging feature PRs was on hold for the last week or so because of the new release. Usually @JBassett does a final review of PRs and will merge once he approves. |
Summary
Button widgets on Android do not require an authentication, even if the app is set to require authentication. This is especially annoying if you want an easy way to open the garage door while still providing a basic level of security.
This PR adds a per-button setting "Require authentication" that triggers authenticating via device credentials - biometrics, pattern ...
Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#792
Any other notes
See #1851