Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Browser Intent back button

Hello I am lauching the browser from my application using an intent such as:

String url = "XXXX";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);

but when I press back on the browser i want to go back to the my application, instead of going to the options of the browser. how can i control this behaviour?

like image 330
user1437481 Avatar asked Nov 02 '25 03:11

user1437481


1 Answers

You can't as the back button implementation is now under control of Browser Application.

Implement a WebView in your application and handle Back Key Pressed is the only option.

like image 137
user370305 Avatar answered Nov 03 '25 17:11

user370305



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!