Intent on Fragment Activity Android

Asked

Viewed 54 times

0

How to Open a New Screen or Link Via Intent in Fragment Activity?inserir a descrição da imagem aqui See that there is a button at the end how to make it open a link?

  • You want to open the browser or open the site within the application with webView?

  • I wish to open in the browser!

1 answer

0

Hello, first you should add the internet permission on Androidmanifest.xml

<uses-permission android:name="android.permission.INTERNET" />

Then you can call Intent by passing the URI

    Uri uri = Uri.parse("https://www.google.com");
    Intent intent = new Intent(Intent.ACTION_VIEW, uri);
    startActivity(intent);

Browser other questions tagged

You are not signed in. Login or sign up in order to post.