Implicit intents specify the action which should be performed by other components or applications.
For Example: If you want to open an URL in a web browser from your application code, Then following code tells the Android system to view a webpage. Typically the web browser is registered to this
Intent
but other component could also register them self to this to that intent. That means if you have installed web browsers like IE, Mozilla Firfox and Google Chrome, then all browsers might be registered to the intent (Intent.ACTION_VIEW) to show a web page as per you request.
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("http://androidsurya.blogspot.in"));
startActivity(i);
If only one component (here web browser in our example) is found, Android starts this component directly. If several components are identifier by the Android system, the user will get an selection dialog and can decide which component should be used for that
Intent
.
No comments:
Post a Comment