How can I open a URL in Android's web browser from my application?

前端 未结 30 2813
庸人自扰
庸人自扰 2020-11-21 22:09

How to open an URL from code in the built-in web browser rather than within my application?

I tried this:

try {
    Intent myIntent = new Intent(Int         


        
30条回答
  •  我寻月下人不归
    2020-11-21 22:45

    Simple, website view via intent,

    Intent viewIntent = new Intent("android.intent.action.VIEW", Uri.parse("http://www.yoursite.in"));
    startActivity(viewIntent);  
    

    use this simple code toview your website in android app.

    Add internet permission in manifest file,

     
    

提交回复
热议问题