How to open an URL from code in the built-in web browser rather than within my application?
I tried this:
try{Intent myIntent =newIntent(Intent.ACTION_VIEW,Uri.parse(download_link));startActivity(myIntent);}catch(ActivityNotFoundException e){Toast.makeText(this,"No application can handle this request."+" Please install a webbrowser",Toast.LENGTH_LONG).show();
e.printStackTrace();}
but I got an Exception:
No activity found to handle Intent{action=android.intent.action.VIEW data =www.google.com
thank you
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.