Android Intent Create launchUrlInBrowser(Context context, String url)

Here you can find the source of launchUrlInBrowser(Context context, String url)

Description

launch Url In Browser

License

Open Source License

Declaration

public static void launchUrlInBrowser(Context context, String url) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

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

import android.content.Context;

public class Main {
    public static void launchUrlInBrowser(Context context, String url) {
        Intent i = new Intent(Intent.ACTION_VIEW);
        i.setData(Uri.parse(url));//from  w  ww . j  a  v  a 2 s  .com
        context.startActivity(i);
    }
}

Related

  1. PhotoIntent(Activity activity)
  2. VideoIntent(Activity activity)
  3. call(String aPhoneNumber, Activity aActivity)
  4. intentSysDefault(Activity activity, Class classes, Map paramMap)
  5. audioBecomingNoisy(Context c)