get Browser Intent - Android Intent

Android examples for Intent:Browser Intent

Description

get Browser Intent

Demo Code


//package com.java2s;
import android.content.Intent;
import android.net.Uri;

public class Main {
    public static Intent getBrowserIntent(String url) {
        Intent result = new Intent(Intent.ACTION_VIEW);
        result.setData(Uri.parse(url));/*  ww w  . ja  v  a  2  s .c o m*/
        return result;
    }
}

Related Tutorials