Common Android Intent Usage

You’ll use a few basic intents most of the time while developing mobile apps for Androids. The following table shows you the code for several basic Android intents.























IntentCode
Start an activitystartActivity(new Intent(this,
Destination.class));
Create a chooserIntent.createChooser(yourIntent, "Please
Select");
Open the Web browserIntent i = newclass="code">

Intent(Intent.ACTION_VIEW,class="code">

Uri.parse("http://example.org"));
startActivity(i);
Start activity for a resultstartActivityForResult(yourIntent,
YOUR_REQUEST_CODE);








dummies

Source:http://www.dummies.com/how-to/content/common-android-intent-usage.html

No comments:

Post a Comment