Skip to content

Commit 9e448d0

Browse files
authored
Removing Google Play services requirement. (#361)
Firebase Android SDKs for Auth, Database, Storage, Functions do not require Google Play Services anymore. https://firebase.google.com/docs/android/android-play-services Removing checks for Google Play services for these products from the C++ SDK. Tested by running integration tests on, - devices with Google play services (https://github.com/firebase/firebase-cpp-sdk/actions/runs/730345555) - devices without Google Play services (tested on Kindle) - android emulator images with and without google play services. Addresses firebase/quickstart-unity#975
1 parent 1f03fab commit 9e448d0

File tree

5 files changed

+3
-9
lines changed

5 files changed

+3
-9
lines changed

auth/src/auth.cc

-3
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
FIREBASE_APP_REGISTER_CALLBACKS(
4747
auth,
4848
{
49-
FIREBASE_UTIL_RETURN_FAILURE_IF_GOOGLE_PLAY_UNAVAILABLE(*app);
5049
return ::firebase::kInitResultSuccess;
5150
},
5251
{
@@ -75,8 +74,6 @@ Auth* Auth::GetAuth(App* app, InitResult* init_result_out) {
7574
return existing_auth;
7675
}
7776

78-
FIREBASE_UTIL_RETURN_NULL_IF_GOOGLE_PLAY_UNAVAILABLE(*app, init_result_out);
79-
8077
// Create the platform dependent version of Auth.
8178
void* auth_impl = CreatePlatformAuth(app);
8279
if (!auth_impl) returnnullptr;

database/src/common/database.cc

-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
FIREBASE_APP_REGISTER_CALLBACKS(
4444
database,
4545
{
46-
FIREBASE_UTIL_RETURN_FAILURE_IF_GOOGLE_PLAY_UNAVAILABLE(*app);
4746
return ::firebase::kInitResultSuccess;
4847
},
4948
{
@@ -84,7 +83,6 @@ Database* Database::GetInstance(App* app, const char* url,
8483
if (init_result_out != nullptr) *init_result_out = kInitResultSuccess;
8584
return it->second;
8685
}
87-
FIREBASE_UTIL_RETURN_NULL_IF_GOOGLE_PLAY_UNAVAILABLE(*app, init_result_out);
8886

8987
Database* database = url ? newDatabase(app, newDatabaseInternal(app, url))
9088
: newDatabase(app, newDatabaseInternal(app));

functions/src/common/functions.cc

-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
FIREBASE_APP_REGISTER_CALLBACKS(
4141
functions,
4242
{
43-
FIREBASE_UTIL_RETURN_FAILURE_IF_GOOGLE_PLAY_UNAVAILABLE(*app);
4443
return ::firebase::kInitResultSuccess;
4544
},
4645
{
@@ -84,7 +83,6 @@ Functions* Functions::GetInstance(::firebase::App* app, const char* region,
8483
if (init_result_out != nullptr) *init_result_out = kInitResultSuccess;
8584
return it->second;
8685
}
87-
FIREBASE_UTIL_RETURN_NULL_IF_GOOGLE_PLAY_UNAVAILABLE(*app, init_result_out);
8886

8987
Functions* functions = newFunctions(app, region_idx.c_str());
9088
if (!functions->internal_->initialized()) {

release_build_files/readme.md

+3
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,9 @@ code.
587587
- General: Fixed rare crashes at application exit when destructors were
588588
being executed
589589
([#345](https://github.com/firebase/firebase-cpp-sdk/pull/345)).
590+
- General (Android): Removed checks for Google Play services for Auth, Database,
591+
Functions and Storage as the native Android packages no longer need it.
592+
([#361](https://github.com/firebase/firebase-cpp-sdk/pull/361)).
590593

591594
### 7.1.1
592595
- Changes

storage/src/common/storage.cc

-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
FIREBASE_APP_REGISTER_CALLBACKS(
4242
storage,
4343
{
44-
FIREBASE_UTIL_RETURN_FAILURE_IF_GOOGLE_PLAY_UNAVAILABLE(*app);
4544
return ::firebase::kInitResultSuccess;
4645
},
4746
{
@@ -103,7 +102,6 @@ Storage* Storage::GetInstance(::firebase::App* app, const char* url,
103102
if (init_result_out != nullptr) *init_result_out = kInitResultSuccess;
104103
return it->second;
105104
}
106-
FIREBASE_UTIL_RETURN_NULL_IF_GOOGLE_PLAY_UNAVAILABLE(*app, init_result_out);
107105

108106
Storage* storage = newStorage(app, url);
109107
if (!storage->internal_->initialized()) {

0 commit comments

Comments
 (0)
close