Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Sample still using Deprecated Firebase AdMob firebase::admob

Open
#119 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
mobile-dev

Research direction

Start by locating the AdMob sample files and the firebase::admob references shown in common_main.cc, then check the current Google Mobile Ads C++ SDK API. The work is done when the affected samples no longer use the deprecated namespace and build successfully for the reported Android target.

Written by the indexing model from the issue text.

Description

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 {`

Dominant language
C++
Stars
260
Forks
147
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from firebase/quickstart-cpp

All issues in firebase/quickstart-cpp

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.