Why did the Android app switch to launching sites in the full browser instead of using a browser view inside the app in 1.7.1?
I think this is the commit, since it removes use of ChromeCustomTab.
Why did the Android app switch to launching sites in the full browser instead of using a browser view inside the app in 1.7.1?
I think this is the commit, since it removes use of ChromeCustomTab.
The app now also manages to crash on launch half the time. Is it possible to downgrade to an older version?
Sorry to hear the app is crashing on launch, I will look into that. Can you let me know what device you are using and what Android version you are on?
As you point out, the change to use the default browser instead of ChromeCustomTab was made in that commit from 2020, it should have already been there in the previous version of the app (1.6.0 I believe). We made that change because ChromeCustomTab was buggy and it required Chrome to be installed on the device for it to work. (Many users were complaining about the Chrome requirement of the app.)
Samsung Galaxy S9 running Android 10 security patch 1 May 2021 (the latest available). I think the crash happens when the app has been in the background for a while and not explicitly closed.
The commit dates from after the release of 1.6.0 (Feb 2020 if https://apkpure.com/discoursehub/com.discourse/versions is to be believed). The code removed already caught a failure to use ChromeCustomTab and launched the link, or would the app not launch at all without Chrome installed?
Thanks, you are right, the removal of ChromeCustomTab was done in 1.6.2 which never made it to production (it was only in beta). So effectively this change is new in 1.7.0. See also Discourse Hub doesn't open forums in their PWAs - #12 by md-misko for more details on why we made the switch, in addition to working without Chrome, this change also allows launching the PWA from DiscourseHub.
I am about to push a beta version with a fix for the crash issue. Will post a link here when that is ready.
OK so the solution is to install PWAs for each forum? Nope, that doesnât work either, it still launches the tab in Firefox (I created the PWA with Chrome though). I have to say I never found the Chrome tab experience slow, certainly not compared to opening the full browser. Navigating back to the hub was quick too, just pull down to expose the X of the chrome tab.
Yes, you have a choice between using the PWA or a browser. If you donât see a prompt, you can reset the defaults. In your Android settings, search for âopening linksâ, find the URL of your site, and then in its page click on âClear defaultsâ. Once that is done, when going to DiscourseHub youâll be prompted, it should look similar to this if you have a PWA installed:
Also, for the crash issue, please try version 1.7.2 in the beta release channel - https://play.google.com/store/apps/details?id=com.discourse
I donât have a Google account so canât access the beta channel (I use Aurora Store which doesnât seem to support it).
I cleared defaults from Firefox and get the prompt now, but it only shows browsers, not the PWA.
And the Chrome PWA doesnât send me notifications either. Never mind, a disable/enable got it to send one. Some further investigating and reading of Add to homescreen banner on Android - #62 by Falco indicates the WebAPK bit isnât working for me, since thatâs what binds the intents for the siteâs URLs, and I donât see a new icon in the applications drawer or app settings.
I just tested adding your site as a webapk on my phone and it did work, but took a while. Testing with other sites it appears that the WebAPK minting server from Google is a bit slow at the moment, but waiting a couple minutes did work for me.
Version 1.7.2 of the app is now in production in the Google Play Store (not sure how quickly the Aurora Store will see the update, though).
Aurora store uses the play store, just without having a Google account on your phone (it uses an anonymous one to get a token).
Which is maybe why WebAPK doesnât work for me, if they need a google account to be created via Googleâs servers.
Or itâs because Chrome calls Google play to install the WebAPK chromium/WebApkInstaller.java at master · chromium/chromium · GitHub which requires a google account.
So in order to address user complaints about Chrome being installed, you removed ChromeCustomTab and instead changed to a workflow around WebAPKs, which require Chrome (or Samsung browser) and a Google account to work as intended. So itâs less accessible. Also there is a way to use the default browserâs custom tab implementation since about half of my apps get a Powered by Firefox version instead of the Chrome version.
Did some digging on this, and came across the following:
https://community.tt-rss.org/t/dont-hardcode-chrome-when-opening-custom-tabs/319
https://git.tt-rss.org/fox/tt-rss-android/src/branch/master/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java#L97
and hereâs an implementation that correctly uses Firefox custom tabs on my device:
So could you re-add it with this extra detection, which would remove the Chrome dependency properly and make the app useful again?
The problem is that I would like to give users a choice. Going back to CustomTabs
(and fixing the Chrome-only thing) doesnât give users a choice, it forces the custom tab at all times. So a user that wants to open the site in the browser or in a PWA is out of luck. We canât go back to that.
But I am going to see if I can find a way to add the in-app custom tab as an option alongside browsers and PWAs. Itâs a little tricky, not sure itâs 100% doable but I will try.
It might take me a little bit of time to get to this task, but will let you know when I have a testable beta.
I found some time over the weekend and pushed just now an updated version of the Android app (1.7.3) that allows users to switch back to using custom tabs. There is a new button at the bottom right corner of the screen that displays a settings screen where you can make the switch. Let me know how it goes once you are able to update.
I canât see the updated app in Google Play, has it been held up for approval by Google or something?
It should be there today, sorry about that (the Play Store UI defaults to a staggered rollout).
Working as expected, I get a chrome tab with the setting enabled, and it launched the full browser with it disabled. Thanks for updating it so quickly
This version fixed the crashes, but the new 1.7.3 version is crashing again constantly for me.
Iâm on beta channel, are those versions synced between beta and production on Play Store?
[edit]: when setting âopen sites in in-app browserâ, PWA enabled sites still open as separate apps (which is expected), but crashes are less frequent (almost never), while unsetting this crashes the app every time.