Skip to content

Web watcher: add support for Brave (com.brave.browser missing from KNOWN_BROWSER_PACKAGES) #306

Description

@Adiyogue

Summary

The Android web watcher only extracts URLs for a hardcoded list of browsers, so users of Chromium-based browsers that aren't on that list end up with an empty aw-watcher-android-web bucket even when the Accessibility permission is granted and working.

Current behaviour

WebWatcher resolves URLs via extractUrl(), gated on KNOWN_BROWSER_PACKAGES:

  • com.android.chrome — com.android.chrome:id/url_bar
  • org.mozilla.firefox — several extractors (ADDRESSBAR_URL_BOX, url_bar_title, mozac_browser_toolbar_url_view)
  • com.sec.android.app.sbrowser — two view ids
  • com.opera.browser — two view ids
  • com.microsoft.emmx — com.microsoft.emmx:id/url_bar

Any other browser package is not matched: the event is classified as "window changed away from a tracked browser", the session is ended, and no URL is recorded. Affected browsers include Brave, Vivaldi, DuckDuckGo, and most OEM browsers.

Request

Add com.brave.browser to KNOWN_BROWSER_PACKAGES and route it to the same extractor as Chrome. Brave is Chromium-based and exposes its address bar as com.brave.browser:id/url_bar, so the existing extractTextByViewId(event, "…:id/url_bar") call should work unchanged.

Longer term

Consider a generic fallback for unknown packages: try the url_bar / url_bar_title family of view ids by matching the suffix of a node's viewIdResourceName rather than requiring a full package-qualified id, before giving up. That would cover the rest of the Chromium-derived browsers and avoid one PR per browser.

It would also help to list the currently supported browsers in the app's UI and/or in the docs on web tracking, so users don't have to read the source to find out why their web bucket is empty.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions