Show Web Page - Android android.content

Android examples for android.content:Intent

Description

Show Web Page

Demo Code

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;

public class Main {

  public static void ShowWebPage(Activity currentActivity, String url) {
    Intent intent = new Intent();
    intent.setAction(Intent.ACTION_VIEW);
    intent.addCategory(Intent.CATEGORY_BROWSABLE);
    intent.setData(Uri.parse(url));// w  ww.jav  a  2s.  co  m
    currentActivity.startActivity(intent);
  }

}

Related Tutorials