Reputation: 3771
I would like to be able to have the user swipe over a screen and tap the "Open on Phone"
action from within my Android Wear app, but I cannot seem to find how to make this happen.
The click and what not is not the issue, I cannot figure out how to add the actions, my activity
doesn't allow the user to swipe over.
Any ideas on how this is accomplished?
The key here is that the actions are in the Activity
, not in the Notification which has plenty of documentation.
For an exact example of what I want, look at the world clock app with no clocks setup. It will say swipe to add, swiping over reveals an add action inside the blue circle background. This is the behavior I'd like to see.
Upvotes: 3
Views: 800
Reputation: 25058
For the most part what you're going to want in wear are notifications. These offer you the actions that you're used to seeing on the watch like the swipe to the right to interact. These actions are just actions that have been added to the notification.
In order to do this in your own Activity on wear you need to implement it yourself just like you would on a phone. I'd recommend starting with a ViewPager and going from there.
Upvotes: 2