GoogleChromeLabs / bubblewrap

Bubblewrap is a Command Line Interface (CLI) that helps developers to create a Project for an Android application that launches an existing Progressive Web App (PWAs) using a Trusted Web Activity.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DelegationService not starting

superkeil opened this issue · comments

Describe the bug
The DelegationService is not starting on Pixel 7a

adb produce this log :
W/TWAConnectionPool( 3068): No TWA candidates for https:/// have been registered.

To Reproduce
Steps to reproduce the behavior:
Create a TWA with basic steps (keep default "enableNotifications: true" in the twa-manifest.json)
build + install
run : adb logcat -v brief | grep -e TWAConnectionPool
open the app
check the logs of adb

Expected behavior
A TWA candidate should be found so that the service can start running

Smartphone (please complete the following information):

  • Device: Pixel 7a
  • OS: Android 14 (build UP1A.231005.007)
  • Browser: it is a TWA (so default Chrome)
  • Version 119.0.6045.66

Additional context
No need to look at the web part.
Verify this part : https://androidx.tech/artifacts/browser/browser/1.2.0-alpha08-source/androidx/browser/trusted/TrustedWebActivityServiceConnectionManager.java.html
method: createServiceIntent

Well, i managed to get it work by opening the project in AndroidStudio, and force "true" for

        <service
            android:name=".DelegationService"
            android:enabled="true"
            android:exported="true">

in the AndroidManifest.xml.

I revert the modifications and it is good now... don't understand why.

I still have problem with the notification icon. I will update this issue once i got that point resolved

cannot understand why notification icon (SMALL_ICON) is not showing on new notification. The drawables are looking fine. The bubblewrap code seems to link correctly variables to resources.

Maybe something is related to my original problem. The values of the twa-manifest.json file could be not load properly at first (which would explain why the background service was ignored)

i resolved my problem with notification icon, nothing to do with bubblewrap.

i had a blank square icon on notification, it was because my monochromeIconUrl was not set.

I set it and it resolved my issue.

Please note that the monochromeIconUrl should point to a foreground all white image with transparent background