You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update Analytics to use new options struct. (#1745)
* Initialize Analytics C SDK with AppOptions on desktop
This change updates the desktop analytics initialization to use the
newly required Options struct for the Windows C API.
- In `analytics/src/analytics_desktop.cc`:
- `firebase::analytics::Initialize(const App& app)` now retrieves
`app_id` and `package_name` from `app.options()`.
- It calls `GoogleAnalytics_Options_Create()` to create the options struct.
- Populates `app_id`, `package_name`, and sets a default for
`analytics_collection_enabled_at_first_launch`.
- Calls `GoogleAnalytics_Initialize()` with the populated options struct.
- String lifetimes for `app_id` and `package_name` are handled by
creating local `std::string` copies before passing their `c_str()`
to the C API.
* Format code.
* Fix build issues.
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
0 commit comments