go To Website via URL - Android Network

Android examples for Network:URL

Description

go To Website via URL

Demo Code


//package com.java2s;

import android.content.Context;
import android.content.Intent;

import android.net.Uri;

public class Main {

    public static void goToWebsite(Context context, String url) {
        Uri uriUrl = Uri.parse(url);//  w  w w .j  a v  a  2 s  .c  o m
        Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);
        context.startActivity(launchBrowser);
    }
}

Related Tutorials