I want to keep the users on my application while opening a url (On Android), I don't want to open the chrome application.
Like this post:
https://blog.xamarin.com/keep-users-from-leaving-your-app-with-chrome-custom-tabs/
await OpenBrowser(new Uri(https://twitter.com/)); I am not sure if this should be the expected behavior.
It opens the Chrome application.
This does not work on emulators, you need to use on a real device. Tested on my Pixel 2XL and unable to reproduce this.
@jamesmontemagno Sorry but on the notes I added a real device:
Samsung Galaxy S7 with Android 7.0
Do you think this is device specific?
It is highly possible depending on what version of Chrome it has, and what support libs you are using. I am testing on Pixel 2 XL.
It is also possible that samsung blocks it.
Thanks for the answer!
I do have a S7 that I will test on tomorrow though and see.
@jamesmontemagno Did you had a chance to test this with a S7?
so realized i have an s8 today....
Tested it on pixel 2 xl, huawei p8 lite, and hero se, and samsung s8 all with chrome installed and worked perfect. The custom tab came up with the X in the top left and the overflow on top right and says "powered by chrome".
@jamesmontemagno Thanks for the heads up I will investigate further.
@jamesmontemagno In my case. First-time custom tab opening in my app, when I try to load URL at the second time, it opens the chrome application instead of a custom tab.
Most helpful comment
I do have a S7 that I will test on tomorrow though and see.