Brave-browser: [Android] "Add to homescreen" does not create WebAPK

Created on 30 May 2018  Â·  16Comments  Â·  Source: brave/brave-browser

Did you search for similar issues before submitting this one?
Yes

Description:
When adding a PWA to your homescreen it adds a shortcut with the Brave-icon badge.
This behavior is similar to other browsers Edge/Firefox/etc.
However, Chrome creates a WebAPK. This results in the PWA added to your homescreen without a badge; in the app drawer; listed in settings>apps; opens PWA when clicking on corresponding URL.
And in Brave its code, it does seem to have WebAPKs like Chrome has:
https://github.com/brave/browser-android-tabs/tree/master/chrome/android/webapk

Device Details:

  • Install Type(ARM, x86): ARM (if i stand correct?)
  • Device(Phone, Tablet, Phablet): Huawei Nexus 6P
  • Android Version: 8.1.0

Brave Version:
Brave 1.0.48, Chromium 66.0.3359.158

Steps to reproduce:
1. Open a PWA page; e.g. https://pwa.rocks/
2. Add to homescreen

Actual Behavior
Not installed as WebAPK

Expected Behavior
Being installed as WebAPK

Is this an issue with Beta build?
No

Is this an issue in the currently released version?
Yes

Can this issue be consistently reproduced?
Yes

Website problems only:

  • did you check with Brave Shields down? Yes
  • did you check in Chrome for same behavior? Yes (Chrome 66.0.3359.158)

Screenshot if needed:
https://imgur.com/a/h7ikS1t

Any related issues:
N/A

OAndroid prioritP4 suggestion

Most helpful comment

Thank you for the investigation. Unfortunately simply adding it to the list doesn't work. We will be back to that after we finish work on critical features we are working right now.

All 16 comments

I was just going to create an issue, but the very first question sent me here!

This was working at some point in time. I had it working on my previous phone as of last week, but when I received a warranty replacement it was no longer working.

Bump.
'Add to Homescreen' adds the webapp as a shortcut with chrome badge.

Chrome Version: 67.0.3396.87
OS: Android 8.0.0 OnePlus A3003

https://www.vuemastery.com/ check this PWA and answer me why it's deeply integrated on android 8.0

Read this article as well https://medium.com/@firt/android-oreo-takes-a-bite-out-of-progressive-web-apps-30b7e854648f

any help will be appreciated.

any updates yet?

This is currently the only reason why I haven't switched from Chrome yet.

Just as an update I just found this on Google's documentation for WebAPKs:

I am developer of another browser on Android, can I have this seamless install process?
We are working on it. We are committed to making this available to all browsers on Android and we will have more details soon.

— https://developers.google.com/web/fundamentals/integration/webapks

So perhaps the API is just not available to other browsers right now even if they're Chromium-based.

I had a quick look into the code. It looks like the following might be an issue:
https://github.com/brave/browser-android-tabs/blob/041285303ce5997950c5814ef4204db4ccb4a473/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/WebApkUtils.java#L45-L47
Looks to me that the Chrome package names should be replaced by the one(s) used for Brave (com.brave.browser).

It would be interesting to see if this small change already fixes the issue but I never did development on Chromium so I cannot test this (in a short period of time).
I guess it's quite probable that this is not the only issue and some other things have to be adapted as well.

Also I noticed that the Chromium devs seem to be actively working on some changes.
The mentioned lines of code in WebApkUtils.java have been moved to a file called HostBrowserUtils.java and the changelog of that file shows recent activity:
https://chromium.googlesource.com/chromium/src/+log/master/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/HostBrowserUtils.java

I hope someone can have a look into this and try some things to hopefully get this up and running for Brave?

Thank you for the investigation. Unfortunately simply adding it to the list doesn't work. We will be back to that after we finish work on critical features we are working right now.

Thank you for giving it a try this quickly even though it didn't work.
Glad to hear that you'll be looking into the matter in the not too distant future. :)

Any update on this?

@SergeyZhukovsky Any update on this?

As mentioned here this is not on the priority list right now. This will be looked at a latter point of time.

In January 2020, I was able to add TheLounge which is a selfhosted web IRC client "https://thelounge.chat/" as a web app to the home screen. I'd just hit the menu button while using the website, press add to home screen and it would become an app.

Sometime this month of February 2020, this no longer works, so there must of been an update which has broken it.
I can confirm the website still supports webapp because I've not updated my instance and Firefox still works as an WebApp.

I've tried clearing data,cache and reinstalling.

Is this a new bug or same problem?

Is there anything new regarding this bug since the migration to brave-core should already be done?

Was this page helpful?
0 / 5 - 0 ratings