[Android Client] Open links as Chrome custom tab

Request new functionality here
Burlap
Bear Rating Trainee
Bear Rating Trainee
Posts: 6
Joined: 12 Jun 2015, 07:52

[Android Client] Open links as Chrome custom tab

Postby Burlap » 28 Nov 2015, 15:27

According to this comparison by Google (source), Chrome custom tabs are almost twice as fast as opening a link via the Chrome app or using WebView.
Would it be possible to implement this as an option or would this break backwards compatibility too much?

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: [Android Client] Open links as Chrome custom tab

Postby fox » 28 Nov 2015, 16:28

well actually google made it very easy to add this

i've uploaded a beta version with this enabled (version code 382), you'll see it in a few hours if you have beta updates enabled

e: some caveats

1. i'm not doing prefetching because who knows if someone is gonna click on article url or not, etc
2. not sure if its a good idea to duplicate main ttrss functionality within custom tab menu items, this has potential of being kinda complicated

e2: also this moves minimum sdk level to 16, which means goodbye ICS, and all the five or so people who still use it in 2015 a.d.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: [Android Client] Open links as Chrome custom tab

Postby fox » 28 Nov 2015, 16:48

one more thing, currently all external urls on click etc open in custom tabs if available, which implicitly prevents stuff like "open this reddit comment thread with my app" from working. maybe this should be limited to some specific kinds of urls / UI elements, idk.

Burlap
Bear Rating Trainee
Bear Rating Trainee
Posts: 6
Joined: 12 Jun 2015, 07:52

Re: [Android Client] Open links as Chrome custom tab

Postby Burlap » 29 Nov 2015, 13:03

Tested it a bit, works like a charm for my purposes!
Thanks.

Masiosare
Bear Rating Trainee
Bear Rating Trainee
Posts: 22
Joined: 23 May 2013, 01:08

Re: [Android Client] Open links as Chrome custom tab

Postby Masiosare » 29 Nov 2015, 18:47

I can confirm it works perfectly.

But the "doesn't open the app" it's an awful trade.

Can you consider to set up an option to enable this? Watching everything in a custom tab breaks every integration with native apps like YouTube, reddit apps, Twitter, Facebook, etc.

Thanks

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: [Android Client] Open links as Chrome custom tab

Postby fox » 29 Nov 2015, 21:24

yeah maybe an option or something like that

idk longtap override

e: option is the easy/dumb way here, so ideas welcome

randompherret
Bear Rating Trainee
Bear Rating Trainee
Posts: 36
Joined: 04 Jul 2013, 08:11

Re: [Android Client] Open links as Chrome custom tab

Postby randompherret » 30 Nov 2015, 00:46

In the custom chrome tab you can also press overflow menu and open in chrome.

j-g42
Bear Rating Trainee
Bear Rating Trainee
Posts: 1
Joined: 30 Nov 2015, 02:14

Re: [Android Client] Open links as Chrome custom tab

Postby j-g42 » 30 Nov 2015, 02:26

I registered here just to add my 2p worth as a user of TTRSS and the Android client for a couple of years now.

Please, if you're going to have Chrome custom tabs in TTRSS, have this as an option only - it really pisses me off when apps open a chrome tab with no way out except to open in Chrome. I choose to use another browser for a reason and I want http(s) URLs to open in that browser or in the specific app that I've set to handle those links (youtube, twitter etc). Capturing a web session inside an app by employing a Chrome tab or even webview sucks - it's one reason why I ditched feedly.

Seriously, I can wait 2 seconds for Android to switch to my browser. It's not like I'd be doing anything else in that time anyway other than staring at my phone.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: [Android Client] Open links as Chrome custom tab

Postby fox » 30 Nov 2015, 04:22

I agree, forcing this is a bad idea. Next beta is going to have something like this (if relevant options are enabled): https://fakecake.org/uploads/2015/2015119Hmk4j.png

quick preview being chrome tab i guess. better dialog labels or w/e welcome.

e: vvvvvv fwiw opening a reddit post w/ custom tab seems to be slightly faster than opening it with now for reddit and waiting until it finishes loading comments and stuff, thats excluding the time for switching active app. not that it ultimately matters much, obviously.

Masiosare
Bear Rating Trainee
Bear Rating Trainee
Posts: 22
Joined: 23 May 2013, 01:08

Re: [Android Client] Open links as Chrome custom tab

Postby Masiosare » 30 Nov 2015, 05:18

Yes please.
I've been hating this change with passion. The dialog seems a fine compromise

Burlap
Bear Rating Trainee
Bear Rating Trainee
Posts: 6
Joined: 12 Jun 2015, 07:52

Re: [Android Client] Open links as Chrome custom tab

Postby Burlap » 01 Dec 2015, 00:32

Yes, I think having a general on/off switch in the options together with the message box you posted is the best solution.
People who hate custom tabs don't need to be bothered with them and people who want them can enable them or decide on a per-case basis.
Android won't let you read out in advance with what app a certain link would be opened, I guess? That would make it much easier...

Also, I'd put "open with external app" instead of just "open with app" in that message box btw.
Makes it clear you're not talking about your own app.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: [Android Client] Open links as Chrome custom tab

Postby fox » 01 Dec 2015, 09:13

that's pretty much how it works now, if you choose open with app and uncheck the checkbox this effectively disables the custom tabs altogether

>Android won't let you read out in advance with what app a certain link would be opened, I guess? That would make it much easier...

it does but custom tabs incompatible with this approach that's why i had to add the dialog

>Also, I'd put "open with external app" instead of just "open with app" in that message box btw.

that's too long though for a dialog, would look terrible. i agree the wording is not ideal so ideas welcome

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: [Android Client] Open links as Chrome custom tab

Postby fox » 01 Dec 2015, 09:39

maybe its better to just say open instead of open with app, idk

darknite323
Bear Rating Trainee
Bear Rating Trainee
Posts: 40
Joined: 30 Oct 2013, 15:46

Re: [Android Client] Open links as Chrome custom tab

Postby darknite323 » 01 Dec 2015, 11:42

fox wrote:maybe its better to just say open instead of open with app, idk

Couple of suggestions based on what I've seen other developers use.

Open with ...
The three dots implying that you then choose what you want to open it with.

External App
It already says Open link at the top of the popup so why bother even having Open With there in the first place.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: [Android Client] Open links as Chrome custom tab

Postby fox » 01 Dec 2015, 11:46

well you can also set default browser for specific kind of url so this open with ... will not produce the chooser dialog at all times

of course this is might be getting a bit too spergy/pedantic

e: https://fakecake.org/uploads/2015/201512BswL3T.png


Return to “Feature requests”

Who is online

Users browsing this forum: No registered users and 3 guests