How to add an android notification which asks for a Yes or No confirmation on an android wear?
To build this into a notification, you would need to create a custom notification. See here for creating custom layouts for notifications - https://developer.android.com/training/wearables/apps/layouts.html#CustomNotifications
There is no predefined Wear activity/layout for this type of yes/no confirmation. You would need to build this yourself - perhaps with a BoxInsetLayout and two ImageButtons for yes and no.
You can find info on the BoxInsetLayout here - https://developer.android.com/training/wearables/ui/layouts.html#same-layout
This will ensure that your layout looks ok on both square and round devices.
If you're looking for a common Wear experience, you'll probably want to use a DelayedConfirmationTimer and a ConfirmationActivity. These are commonly used to give the user time to cancel their input and to provide an indication that a process is complete, respectively. You can find details here https://developer.android.com/training/wearables/ui/confirm.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With