Sample still using Deprecated Firebase AdMob firebase::admob
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 35/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- cpp
- 領域
- mobile-dev
研究方向
首先定位 AdMob 範例檔案以及 common_main.cc 中顯示的 firebase::admob 參照,然後檢查目前的 Google Mobile Ads C++ SDK API。當受影響的範例不再使用已棄用的命名空間,並且能針對回報的 Android 目標成功建置時,工作就完成了。
由索引模型根據 Issue 內容生成。
描述
[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 {`
- 主要語言
- C++
- 星號
- 258
- 分支
- 145
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
firebase/quickstart-cpp 的其他 Issue
-
Mireb commercial未關閉new
難度 5/5 一週以上 新手友好度 1/100
firebase/quickstart-cpp#151 · 2 則留言 ·
-
難度 5/5 一週以上 新手友好度 10/100
firebase/quickstart-cpp#128 · 2 則留言 ·
-
new
難度 5/5 一週以上 新手友好度 15/100
firebase/quickstart-cpp#126 · 1 則留言 ·
-
type: feature request
難度 4/5 3-5 天 新手友好度 35/100
firebase/quickstart-cpp#23 · 3 則留言 · 1 個 reaction ·
查看 firebase/quickstart-cpp 的全部 Issue
相似的 Issue
-
Incorrect Link in README.md可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 1/5 1 小時以內 新手友好度 95/100
flameshot-org/flameshot#4996 ·
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 64/100
utopia-rise/godot-jvm#1004 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 70/100
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 70/100
維護者通常 1 天內回覆
-
chore(build): TxCoordinator.cpp uses the deprecated shared_ptr atomic free functions可能已有人在做 @w5jwp 今天認領。 未關閉
難度 1/5 1 小時以內 新手友好度 84/100
aethersdr/AetherSDR#6368 · 1 則留言 ·
維護者通常 1 天內回覆