Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How do I open links in a window?

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 like this (look at the url bar).

Here’s the piece of code I currently use:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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/

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading