Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở Phù hợp với người mới
#306 1 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
android, kotlin
Lĩnh vực
mobile-dev

Hướng nghiên cứu

Tìm WebWatcher, extractUrl() và KNOWN_BROWSER_PACKAGES, sau đó kiểm tra cách package Chrome hiện có được định tuyến đến trình trích xuất URL của nó. Thêm Brave bằng package của nó và view ID của thanh địa chỉ, rồi xác minh rằng một sự kiện trợ năng của Brave tạo ra một URL được ghi nhận thay vì kết thúc session.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Kotlin
Star
270
Fork
57
Merge trung bình
20 giờ 32 phút
Pull request đã merge (30 ngày)
38

Chuẩn bị môi trường

Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ActivityWatch/aw-android

Tất cả issue của ActivityWatch/aw-android

Issue tương tự

Thêm issue về Kotlin

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.