They all transfer info in data and seem like when I start a new intent with them all start a new activity. So I don’t really know the difference between them.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When starting a new activity using an intent, you could choose to view some data or to edit it depending on your needs by specifying one of
ACTION_EDITorACTION_VIEWrespectively. It may be the case that both of these intents start the same activity and so the result is the same whatever you choose or it might be that they are mapped to different activities and thatACTION_EDITwill start an activity where the data is editable andACTION_VIEWwill start an activity where it is not. As the name suggests, you should choose the action that best matches your intent. If you are specifying a filter for your activity, you should keep this in mind too and filter the actions that your activity is designed to fulfill.EDIT: Data refers to what you intend to act on. Normally, an
Intentcontains two things: an action and the data you want to perform the action on. Here are the brief descriptions from the javadoc (which is very good, I suggest you read the section on Intent Resolution):Using that information, Android will attempt to find the most suitable activity to service your intent (one with a filter that matches your intent). Activities in your application take precedence over those outside it, but is is possible and common to invoke an activity in a 3rd party app.