Reputation: 13
I'm trying to add a "Share" Action Button on my Notifications for Android Wear. When I'd click on the button, I want to open a chooser that let the user pick which app to open to share the info (SMS, GMail, Facebook, Twitter, ...). I know how to do it on my handled device but I want to open something similar on the watch. Here's the code launched when the button is pressed :
Intent shareIntent = new Intent(Intent.ACTION_SEND);
shareIntent.setType("text/plain");
shareIntent.putExtra(Intent.EXTRA_TEXT, "text to share");
startActivity(Intent.createChooser(shareIntent, "Share"));
Currently, when the button is pressed, no chooser is shown and a Toast appears on my handled device saying that my "text to share" has been saved into a note with Evernote. I don't understand why does it do that, has anyone managed to do something similar with Android Wear ?
Upvotes: 0
Views: 128
Reputation: 13
Alright, so I found out that the applications on smartphone can't be directly called from an app chooser on the wearable. Only the Evernote for Android Wear app could be used so the app chooser didn't even pop. I solved my problem by sending a message to my smartphone and let it handle the Share action.
Upvotes: 1