There is a link that needs to be opened in the browser. How can I do that? At Activity - by intent, and at fragments how?

  • The same intent. What is the problem - do not know where to get the context? - woesss

1 answer 1

code

String ur="vk.com";//ваша ссылка без http Intent i=new Intent(Intent.ACTION_VIEW); i.setData(Uri.parse("http://"+ur)); getActivity().startActivity(i);