From the course: Android Development Essential Training: 3 Navigation

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Share data with implicit Intents

Share data with implicit Intents - Android Tutorial

From the course: Android Development Essential Training: 3 Navigation

Start my 1-month free trial

Share data with implicit Intents

- [Narrator] One way the Android framework allows us to send messages to other apps is by means of implicit intents. We've added a share button to our applications toolbar, but so far it does nothing. Let's move over to Android Studio where you'll learn how to power this button to take action. We're here inside of our main activity class. And if you recall, we've already defined our options menu here on line number 40. The next thing we want to do is implement the on options item selected method. This is the method that gets called whenever someone selects an item from the options menu. So let's do that here, starting on line number 45. On options item selected, and we'll go ahead and let Android Studio complete it for us. This method passes the menu item that the user selected. In order to identify it, we need to call the item ID property, and we can find the unique ID that we specified inside of our menu resource. So…

Contents