diff --git a/messaging/src/android/cpp/messaging.cc b/messaging/src/android/cpp/messaging.cc index 0f3a8e04e..047c4e859 100644 --- a/messaging/src/android/cpp/messaging.cc +++ b/messaging/src/android/cpp/messaging.cc @@ -630,6 +630,8 @@ InitResult Initialize(const ::firebase::App& app, Listener* listener, pthread_create(&g_poll_thread, nullptr, MessageProcessingThread, nullptr); FIREBASE_ASSERT(result == 0); + FutureData::Create(); + if (g_registration_token_request_state != kRegistrationTokenRequestStateNone) { // Calling this again, now that we're initialized. @@ -647,8 +649,6 @@ InitResult Initialize(const ::firebase::App& app, Listener* listener, kDeliveryMetricsExportToBigQueryEnable); } - FutureData::Create(); - // Supposedly App creation also creates a registration token, but this seems // to happen before the C++ listeners are able to capture it. // So this may seem redundant but at least both are respecting the same flag diff --git a/release_build_files/readme.md b/release_build_files/readme.md index 97cb0377c..6f173209a 100644 --- a/release_build_files/readme.md +++ b/release_build_files/readme.md @@ -578,6 +578,8 @@ code. - Messaging (Android): Fixed crash during termination. ([#739](https://github.com/firebase/firebase-cpp-sdk/pull/739)) ([#745](https://github.com/firebase/firebase-cpp-sdk/pull/745)) + - Messaging (Android): Fixed crash during initialization. + ([#760](https://github.com/firebase/firebase-cpp-sdk/pull/760)) ### 8.7.0