Open sjain882 opened 1 year ago
Thanks for the feature request. I looked into this and it seemed like a simple and sensible addition, so I'm adding a new option for Browser Shortcuts to open them in a custom tab instead of a browser. This will be part of the 3.7.0 release.
Thanks so much for the release!
I should note that there are a few flaws to address (which might be a lot of work, looking at the diff):
You can't pick the browser the custom tab will use (LinkSheet is a workaround, but an extra click) - ideally, this would be pre-picked within the shortcut's settings. This is important for things like user login sessions, etc.
The custom tabs don't dismiss themselves when you navigate to the homescreen, or open another shortcut. Therefore, the open windows build up in the same way as before, when using normal tabs in a browser, and need to be cleared one by one. This doesn't really address the user story depicted in the original issue post.
For an example of point 2, you can try making a search with the Google app, then open a link. Navigate to the homescreen and make another search, open another link, and the previous custom tab will have disappeared in favour of the new link.
Nevertheless I appreciate the update, I will have other uses for this, so thanks so much!
I'll extend the feature in version 3.8.0 to allow the selection of the browser for the Custom Tabs. I'm not sure though if there's any good way to control the automatic closing of the Custom Tabs.
Thanks for adding this! Is there a way to trigger custom tabs via the openUrl() method within a script? That would be quite useful as well.
@christianhans As of version 3.10.0, you can use openUrl()
to open custom tabs. See https://http-shortcuts.rmy.ch/scripting#open-url for details.
@Waboodoo Thanks a lot, this is great. I have in fact already been using this for a while, and it's working very well for me. The only thing I noticed is that the custom tabs don't show the "Share" button, maybe that can be added?
Is your feature request related to a problem? Please describe.
I place shortcuts to websites that I frequently access each day on my homescreen, such as bus timetables. Each time I open these, a new tab is created for them in my browser (Chrome/Edge).
This builds up very fast as I like to treat these shortcuts like apps, i.e., opening a bus timetable, checking the times, then going back to my homescreen and opening another bus timetable, in quick succession while I'm commuting in a rush, rather than having to fiddle with the website itself. This creates a mess that takes time to clean up at the end of the day.
Describe the solution you'd like
Continue allowing the user to select which browser they'd like to use for Browser Shortcuts.
However, the following options should be added alongside:
An option to open them as temporary 'custom tabs' (singular tabs that appear independently in the app switcher), if supported by the chosen browser, would be useful.
An option to make these custom tabs automatically close themselves & be removed from the app switcher when the user navigates away, e.g., to the home screen. This would further suit the use case described above, which I am sure fits plenty of other users too.
Describe alternatives you've considered
I do not believe there are currently any user accessible alternatives to my suggestion.
Additional context
https://developer.chrome.com/docs/android/custom-tabs/