Issue
I recently implemented a button in an Android application to open links externally, but I realized I can't find a way to open the link in a window.
I need it to open like this, not href="https://i.imgur.com/E7rof96.jpg" rel="nofollow noreferrer">like this (look at the url bar).
Here's the piece of code I currently use:
Intent intent = new Intent(Intent.ACTION_VIEW).setData(Uri.parse("https://www.example.com"));
startActivity(intent);
Is there any simple way to do this?
Solution
You maybe looking for Custom Tabs by Chrome
https://developer.chrome.com/docs/android/custom-tabs/
https://developer.chrome.com/docs/android/custom-tabs/integration-guide/
Answered By - javdromero
Answer Checked By - Candace Johnson (JavaFixing Volunteer)