firebase / quickstart-cpp

Firebase Quickstart Samples for C++
https://firebase.google.com/games
Apache License 2.0
206 stars 122 forks source link

Sample still using Deprecated Firebase AdMob firebase::admob #119

Open bamfon opened 8 months ago

bamfon commented 8 months ago

[REQUIRED] Please fill in the following fields:

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

google-oss-bot commented 8 months ago

This issue does not seem to follow the issue template. Make sure you provide all the required information.