Launch web browser : Browser « Core Class « Android






Launch web browser

  

import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.widget.Toast;
import android.app.AlertDialog;

 class Tools {

     /**
     * Launch web browser
     */
    static public void launchBrowser(Context ctx, String url) {
      ctx.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));   
    }
}  

   
    
  








Related examples in the same category

1.Use Intent to open a browser
2.Launch browser
3.Audio Browser
4.Browser Launch