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

Sample still using Deprecated Firebase AdMob firebase::admob

Đang mở
#119 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

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

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
cpp
Lĩnh vực
mobile-dev

Hướng nghiên cứu

Bắt đầu bằng cách xác định các tệp mẫu AdMob và các tham chiếu đến firebase::admob được hiển thị trong common_main.cc, sau đó kiểm tra API hiện tại của Google Mobile Ads C++ SDK. Công việc hoàn tất khi các mẫu bị ảnh hưởng không còn sử dụng namespace đã lỗi thời và build thành công cho Android target được báo cáo.

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

Mô tả

new
[REQUIRED] Please fill in the following fields:
  • Which Firebase Sample: Admob(Auth, Database, etc.)
  • Firebase C++ SDK version: firebase_cpp_sdk_11.6.0
  • Additional SDKs you are using: Admob (Facebook, AdMob, etc.)
  • Platform you are using the SDK on: Windows (Mac, Windows, or Linux)
  • Platform you are targeting: Android(iOS, Android, and/or desktop)
[REQUIRED] Please describe the issue here:

The sample files seem to be out of date, they have not been update to include the change from
recated Firebase AdMob C++ SDK"firebase::admob" to New Google Mobile Ads C++ SDK

(Please list the full steps to reproduce the issue. Include device logs, and stack traces if available.)

Steps to reproduce:

What's the issue repro rate? (eg 100%, 1/5 etc)

What happened? How can we make the problem occur?
This could be a description, log/console output, etc.

Download and following information in sample to setup and run a sample code

If you have a downloadable sample project that reproduces the bug you're reporting, you will
likely receive a faster response on your issue.

// A simple listener that logs changes to a BannerView.
class LoggingBannerViewListener : public firebase::admob::BannerView::Listener {
 public:
  LoggingBannerViewListener() {}
  void OnPresentationStateChanged(
      firebase::admob::BannerView* banner_view,
      firebase::admob::BannerView::PresentationState state) override {
    ::LogMessage("BannerView PresentationState has changed to %d.", state);
  }
  void OnBoundingBoxChanged(firebase::admob::BannerView* banner_view,
                            firebase::admob::BoundingBox box) override {
    ::LogMessage(
        "BannerView BoundingBox has changed to (x: %d, y: %d, width: %d, "
        "height %d).",
        box.x, box.y, box.width, box.height);
  }
};`// A simple listener that logs changes to a BannerView.
class LoggingBannerViewListener : public firebase::admob::BannerView::Listener {
 public:
  LoggingBannerViewListener() {}
  void OnPresentationStateChanged(
      firebase::admob::BannerView* banner_view,
      firebase::admob::BannerView::PresentationState state) override {
    ::LogMessage("BannerView PresentationState has changed to %d.", state);
  }
  void OnBoundingBoxChanged(firebase::admob::BannerView* banner_view,
                            firebase::admob::BoundingBox box) override {
    ::LogMessage(
        "BannerView BoundingBox has changed to (x: %d, y: %d, width: %d, "
        "height %d).",
        box.x, box.y, box.width, box.height);
  }
};

E:/code2023/123456/testapp/src/common_main.cc:26:52: error: no member named 'admob' in namespace 'firebase'
class LoggingBannerViewListener : public firebase::admob::BannerView::Listener {`

Ngôn ngữ chính
C++
Star
260
Fork
147
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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 firebase/quickstart-cpp

Tất cả issue của firebase/quickstart-cpp

Issue tương tự

Thêm issue về C++

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.