Skip to content

Commit dc1e58e

Browse files
committed
Integrate Latest @ 148534595
General changes ... - Update all test app gradle builds to use SDK version 10.2.0. - Refactor Future properties to be lower-case per the style guide. Changes to admob/testapp ... - Refactor AdMob properties to use variable() style rather than GetVariable() style. Changes to analytics/testapp ... - Add SetCurrentScreen to Analytics API. Changes to auth/testapp ... - Refactor Auth properties naming to match Google style guide. Changes to database/testapp ... - Refactor Database properties to use variable() style rather than GetVariable() style. Changes to invites/testapp ... Changes to messaging/testapp ... - Show whether the message was opened by tapping an OS notification. - Update Messaging gradle build to include AAR. Changes to remote_config/testapp ... - Add binary blob test to Remote Config test app. CL: 148534595
1 parent 36c40b5 commit dc1e58e

16 files changed

Lines changed: 737 additions & 741 deletions

File tree

admob/testapp/build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,8 @@ android {
8888
}
8989

9090
dependencies {
91-
compile fileTree(dir: 'libs', include: ['*.jar'])
92-
compile 'com.google.firebase:firebase-ads:10.0.1'
93-
compile 'com.google.android.gms:play-services-base:10.0.1'
91+
compile 'com.google.firebase:firebase-ads:10.2.0'
92+
compile 'com.google.android.gms:play-services-base:10.2.0'
9493
}
9594

9695
apply plugin: 'com.google.gms.google-services'

admob/testapp/src/common_main.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,14 @@ static const int kBirthdayYear = 1976;
132132

133133
static void WaitForFutureCompletion(firebase::FutureBase future) {
134134
while (!ProcessEvents(1000)) {
135-
if (future.Status() != firebase::kFutureStatusPending) {
135+
if (future.status() != firebase::kFutureStatusPending) {
136136
break;
137137
}
138138
}
139139

140-
if (future.Error() != firebase::admob::kAdMobErrorNone) {
140+
if (future.error() != firebase::admob::kAdMobErrorNone) {
141141
LogMessage("ERROR: Action failed with error code %d and message \"%s\".",
142-
future.Error(), future.ErrorMessage());
142+
future.error(), future.error_message());
143143
}
144144
}
145145

@@ -322,7 +322,7 @@ extern "C" int common_main(int argc, const char* argv[]) {
322322
WaitForFutureCompletion(interstitial->ShowLastResult());
323323

324324
// Wait for the user to close the interstitial.
325-
while (interstitial->GetPresentationState() !=
325+
while (interstitial->presentation_state() !=
326326
firebase::admob::InterstitialAd::PresentationState::
327327
kPresentationStateHidden) {
328328
ProcessEvents(1000);
@@ -450,7 +450,7 @@ extern "C" int common_main(int argc, const char* argv[]) {
450450

451451
// If an ad has loaded, show it. If the user watches all the way through, the
452452
// LoggingRewardedVideoListener will log a reward!
453-
if (rewarded_video::LoadAdLastResult().Error() ==
453+
if (rewarded_video::LoadAdLastResult().error() ==
454454
firebase::admob::kAdMobErrorNone) {
455455
LogMessage("Showing a rewarded video ad.");
456456
rewarded_video::Show(GetWindowContext());

analytics/testapp/build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,8 @@ android {
8989
}
9090

9191
dependencies {
92-
compile fileTree(dir: 'libs', include: ['*.jar'])
93-
compile 'com.google.firebase:firebase-analytics:10.0.1'
94-
compile 'com.google.android.gms:play-services-base:10.0.1'
92+
compile 'com.google.firebase:firebase-analytics:10.2.0'
93+
compile 'com.google.android.gms:play-services-base:10.2.0'
9594
}
9695

9796
apply plugin: 'com.google.gms.google-services'

analytics/testapp/src/common_main.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ extern "C" int common_main(int argc, const char* argv[]) {
5151
// Set the user ID.
5252
analytics::SetUserId("uber_user_510");
5353

54+
LogMessage("Set current screen.");
55+
// Set the user's current screen.
56+
analytics::SetCurrentScreen("Firebase Analytics C++ testapp", "testapp");
57+
5458
// Log an event with no parameters.
5559
LogMessage("Log login event.");
5660
analytics::LogEvent(analytics::kEventLogin);

auth/testapp/build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,8 @@ android {
8989
}
9090

9191
dependencies {
92-
compile fileTree(dir: 'libs', include: ['*.jar'])
93-
compile 'com.google.firebase:firebase-auth:10.0.1'
94-
compile 'com.google.android.gms:play-services-base:10.0.1'
92+
compile 'com.google.firebase:firebase-auth:10.2.0'
93+
compile 'com.google.android.gms:play-services-base:10.2.0'
9594
}
9695

9796
apply plugin: 'com.google.gms.google-services'

auth/testapp/src/common_main.cc

Lines changed: 90 additions & 87 deletions
Large diffs are not rendered by default.

database/testapp/build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,8 @@ android {
9090
}
9191

9292
dependencies {
93-
compile fileTree(dir: 'libs', include: ['*.jar'])
94-
compile 'com.google.firebase:firebase-auth:10.0.1'
95-
compile 'com.google.firebase:firebase-database:10.0.1'
93+
compile 'com.google.firebase:firebase-auth:10.2.0'
94+
compile 'com.google.firebase:firebase-database:10.2.0'
9695
}
9796

9897
apply plugin: 'com.google.gms.google-services'

database/testapp/src/common_main.cc

Lines changed: 533 additions & 544 deletions
Large diffs are not rendered by default.

invites/testapp/build.gradle

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,8 @@ android {
8989
}
9090

9191
dependencies {
92-
compile fileTree(dir: 'libs', include: ['*.jar'])
93-
compile 'com.google.firebase:firebase-invites:10.0.1'
94-
compile 'com.google.android.gms:play-services-base:10.0.1'
92+
compile 'com.google.firebase:firebase-invites:10.2.0'
93+
compile 'com.google.android.gms:play-services-base:10.2.0'
9594
}
9695

9796
apply plugin: 'com.google.gms.google-services'

invites/testapp/src/common_main.cc

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222

2323
void ConversionFinished(const firebase::Future<void>& future_result,
2424
void* user_data) {
25-
if (future_result.Status() == firebase::kFutureStatusInvalid) {
25+
if (future_result.status() == firebase::kFutureStatusInvalid) {
2626
LogMessage("ConvertInvitation: Invalid, sorry!");
27-
} else if (future_result.Status() == firebase::kFutureStatusComplete) {
27+
} else if (future_result.status() == firebase::kFutureStatusComplete) {
2828
LogMessage("ConvertInvitation: Complete!");
29-
if (future_result.Error() != 0) {
30-
LogMessage("ConvertInvitation: Error %d: %s", future_result.Error(),
31-
future_result.ErrorMessage());
29+
if (future_result.error() != 0) {
30+
LogMessage("ConvertInvitation: Error %d: %s", future_result.error(),
31+
future_result.error_message());
3232
} else {
3333
LogMessage("ConvertInvitation: Successfully converted invitation");
3434
}
@@ -84,13 +84,13 @@ extern "C" int common_main(int argc, const char* argv[]) {
8484
LogMessage("Try to initialize Invites");
8585
return ::firebase::invites::Initialize(*app);
8686
});
87-
while (initializer.InitializeLastResult().Status() !=
87+
while (initializer.InitializeLastResult().status() !=
8888
firebase::kFutureStatusComplete) {
8989
if (ProcessEvents(100)) return 1; // exit if requested
9090
}
91-
if (initializer.InitializeLastResult().Error() != 0) {
91+
if (initializer.InitializeLastResult().error() != 0) {
9292
LogMessage("Failed to initialize Firebase Invites: %s",
93-
initializer.InitializeLastResult().ErrorMessage());
93+
initializer.InitializeLastResult().error_message());
9494
ProcessEvents(2000);
9595
return 1;
9696
}
@@ -105,19 +105,19 @@ extern "C" int common_main(int argc, const char* argv[]) {
105105
invite.call_to_action_text = "Download it for FREE";
106106
invite.deep_link_url = "http://google.com/abc";
107107
auto future_result = ::firebase::invites::SendInvite(invite);
108-
while (future_result.Status() == firebase::kFutureStatusPending) {
108+
while (future_result.status() == firebase::kFutureStatusPending) {
109109
if (ProcessEvents(10)) break;
110110
}
111111

112-
if (future_result.Status() == firebase::kFutureStatusInvalid) {
112+
if (future_result.status() == firebase::kFutureStatusInvalid) {
113113
LogMessage("SendInvite: Invalid, sorry!");
114-
} else if (future_result.Status() == firebase::kFutureStatusComplete) {
114+
} else if (future_result.status() == firebase::kFutureStatusComplete) {
115115
LogMessage("SendInvite: Complete!");
116-
if (future_result.Error() != 0) {
117-
LogMessage("SendInvite: Error %d: %s", future_result.Error(),
118-
future_result.ErrorMessage());
116+
if (future_result.error() != 0) {
117+
LogMessage("SendInvite: Error %d: %s", future_result.error(),
118+
future_result.error_message());
119119
} else {
120-
auto result = *future_result.Result();
120+
auto result = *future_result.result();
121121
// error == 0
122122
if (result.invitation_ids.size() == 0) {
123123
LogMessage("SendInvite: Nothing sent, user must have canceled.");

0 commit comments

Comments
 (0)