Reputation: 45
In Intent.ACTION_VIEW what is Intent? Is it a class or method and here what is ACTION_VIEW ? is it a variable and what is the type of it's ? please explain in details. thank you.
Upvotes: 2
Views: 4653
Reputation: 23483
Intent is a public class that is most commonly used to start new Activities. For instance:
Intent intent = new Intent(CurrentActivity.this, NextActivity.class);
startActivity(intent);
I'd recommend reading the Android Development manual, and trying a couple easy tutorials to get started. You can find that here: http://developer.android.com/training/index.html
This page will describe ACTION_VIEW and Intent in detail; much better than I can: http://developer.android.com/reference/android/content/Intent.html
Hope it helps.
Upvotes: 1
Reputation: 5640
Intent
in android is an abstract public Class
. ACTION_VIEW
is the action on Intent.
public static final String ACTION_VIEW
Since: API Level 1 Activity Action: Display the data to the user. This is the most common action performed on data -- it is the generic action you can use on a piece of data to get the most reasonable thing to occur. For example, when used on a contacts entry it will view the entry; when used on a mailto: URI it will bring up a compose window filled with the information supplied by the URI; when used with a tel: URI it will invoke the dialer.
Input: getData() is URI from which to retrieve data.
Output: nothing.
Constant Value: "android.intent.action.VIEW"
You need to read the developers guide for Android. You will get a better understanding here.
Upvotes: 1