Skip to content

Commit 64bfb37

Browse files
committed
Merge remote-tracking branch 'firebase/version-2.0.0-dev' into db-callback
2 parents ab613bd + 63df29c commit 64bfb37

File tree

12 files changed

+33
-21
lines changed

12 files changed

+33
-21
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,19 @@ For convenience, here are some examples:
9595

9696
There is a sample app in the `app/` directory that demonstrates most
9797
of the features of FirebaseUI. Load the project in Android Studio and
98-
run it on your Android device to see a demonstration.
98+
run it on your Android device to see a demonstration.
99+
100+
Before you can run the sample app, you must create a project in
101+
the Firebase console. Add an Android app to the project, and copy
102+
the generated google-services.json file into the `app/` directory.
103+
Also enable [anonymous authentication](https://firebase.google.com/docs/auth/android/anonymous-auth)
104+
for the Firebase project, since some components of the sample app
105+
requires it.
106+
107+
If you encounter a version incompatibility error between Android Studio
108+
and Gradle while trying to run the sample app, try disabling the Instant
109+
Run feature of Android Studio. Alternatively, update Android Studio and
110+
Gradle to their latest versions.
99111

100112
## Contributing
101113

app/src/main/java/com/firebase/uidemo/storage/ImageActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ protected void onCreate(Bundle savedInstanceState) {
5959
setContentView(R.layout.activity_image);
6060
ButterKnife.bind(this);
6161

62-
// By default, Firebase Storage files require authentication to read or write.
62+
// By default, Cloud Storage files require authentication to read or write.
6363
// For this sample to function correctly, enable Anonymous Auth in the Firebase console:
6464
// https://console.firebase.google.com/project/_/authentication/providers
6565
FirebaseAuth.getInstance()
@@ -102,7 +102,7 @@ private void uploadPhoto(Uri uri) {
102102
hideDownloadUI();
103103
Toast.makeText(this, "Uploading...", Toast.LENGTH_SHORT).show();
104104

105-
// Upload to Firebase Storage
105+
// Upload to Cloud Storage
106106
String uuid = UUID.randomUUID().toString();
107107
mImageRef = FirebaseStorage.getInstance().getReference(uuid);
108108
mImageRef.putFile(uri)

app/src/main/res/values/strings.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<string name="desc_chat">Demonstrates using a FirebaseRecyclerAdapter to load data from Firebase Database into a RecyclerView for a basic chat app.</string>
99
<string name="desc_auth_ui">Demonstrates the Firebase Auth UI flow, with customization options.</string>
10-
<string name="desc_image">Demonstrates displaying an image from Firebase Storage using Glide.</string>
10+
<string name="desc_image">Demonstrates displaying an image from Cloud Storage using Glide.</string>
1111

1212
<!-- strings for Auth UI demo activities -->
1313
<eat-comment/>
@@ -47,7 +47,7 @@
4747
<string name="configuration_required">Configuration is required - see README.md</string>
4848
<string name="other_options_header">Other Options:</string>
4949
<string name="enable_smartlock">Enable SmartLock for Passwords</string>
50-
<string name="rational_image_perm">This sample will read an image from local storage to upload to Firebase Storage.</string>
50+
<string name="rational_image_perm">This sample will read an image from local storage to upload to Cloud Storage.</string>
5151
<string name="anonymous_auth_failed_msg">Anonymous authentication failed, various components of the demo will not work. Make sure your device is online and that Anonymous Auth is configured in your Firebase project(https://console.firebase.google.com/project/_/authentication/providers)</string>
5252
<string name="extra_google_scopes">Example extra Google scopes</string>
5353
<string name="games">Games</string>

auth/src/main/java/com/firebase/ui/auth/ui/accountlink/WelcomeBackIdpPrompt.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public void onSuccess(AuthResult result) {
158158
result.getUser()
159159
.linkWithCredential(mPrevCredential)
160160
.addOnFailureListener(new TaskFailureLogger(
161-
TAG, "Error signing in with previous credential"))
161+
TAG, "Error signing in with previous credential " + idpResponse.getProviderType()))
162162
.addOnCompleteListener(new FinishListener(idpResponse));
163163
} else {
164164
finish(ResultCodes.OK, IdpResponse.getIntent(idpResponse));
@@ -172,12 +172,12 @@ public void onFailure(@NonNull Exception e) {
172172
}
173173
})
174174
.addOnFailureListener(
175-
new TaskFailureLogger(TAG, "Error signing in with new credential"));
175+
new TaskFailureLogger(TAG, "Error signing in with new credential " + idpResponse.getProviderType()));
176176
} else {
177177
currentUser
178178
.linkWithCredential(newCredential)
179179
.addOnFailureListener(
180-
new TaskFailureLogger(TAG, "Error linking with credential"))
180+
new TaskFailureLogger(TAG, "Error linking with credential " + idpResponse.getProviderType()))
181181
.addOnCompleteListener(new FinishListener(idpResponse));
182182
}
183183
}

auth/src/main/java/com/firebase/ui/auth/ui/accountlink/WelcomeBackPasswordPrompt.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public void onSuccess(AuthResult authResult) {
152152
authResult.getUser()
153153
.linkWithCredential(authCredential)
154154
.addOnFailureListener(new TaskFailureLogger(
155-
TAG, "Error signing in with credential"))
155+
TAG, "Error signing in with credential " + authCredential.getProvider()))
156156
.addOnSuccessListener(new OnSuccessListener<AuthResult>() {
157157
@Override
158158
public void onSuccess(AuthResult authResult) {

auth/src/main/java/com/firebase/ui/auth/ui/idp/AuthMethodPickerActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public void onSuccess(final IdpResponse response) {
167167
mActivityHelper.getFirebaseAuth()
168168
.signInWithCredential(credential)
169169
.addOnFailureListener(
170-
new TaskFailureLogger(TAG, "Firebase sign in with credential unsuccessful"))
170+
new TaskFailureLogger(TAG, "Firebase sign in with credential " + credential.getProvider() + " unsuccessful. Visit https://console.firebase.google.com to enable it."))
171171
.addOnCompleteListener(new CredentialSignInHandler(
172172
this,
173173
mActivityHelper,

auth/src/main/java/com/firebase/ui/auth/ui/idp/CredentialSignInHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public void onFailure(@NonNull Exception e) {
9090
return;
9191
}
9292
} else {
93-
Log.e(TAG, "Unexpected exception when signing in with credential",
93+
Log.e(TAG, "Unexpected exception when signing in with credential " + mResponse.getProviderType() + " unsuccessful. Visit https://console.firebase.google.com to enable it.",
9494
task.getException());
9595
}
9696
mHelper.dismissDialog();

auth/src/main/java/com/firebase/ui/auth/util/signincontainer/IdpSignInContainer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public void onSuccess(final IdpResponse response) {
134134
mHelper.getFirebaseAuth()
135135
.signInWithCredential(credential)
136136
.addOnFailureListener(
137-
new TaskFailureLogger(TAG, "Failure authenticating with credential"))
137+
new TaskFailureLogger(TAG, "Failure authenticating with credential " + credential.getProvider()))
138138
.addOnCompleteListener(new CredentialSignInHandler(
139139
getActivity(),
140140
mHelper,

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ buildscript {
88
}
99

1010
dependencies {
11-
classpath 'com.android.tools.build:gradle:2.3.0-rc1'
11+
classpath 'com.android.tools.build:gradle:2.3.0'
1212
classpath 'com.google.gms:google-services:3.0.0'
1313
classpath 'io.fabric.tools:gradle:1.+'
1414
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'

gradle/wrapper/gradle-wrapper.jar

0 Bytes
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Tue Feb 21 17:40:47 PST 2017
1+
#Sat Mar 04 16:24:17 SGT 2017
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-all.zip

storage/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22

33
## Using FirebaseUI to download and display images
44

5-
[Firebase Storage][firebase-storage] provides secure file uploads and downloads for your Firebase apps,
5+
[Cloud Storage for Firebase][firebase-storage] provides secure file uploads and downloads for your Firebase apps,
66
regardless of network quality. You can use it to store images, audio, video, or other
7-
user-generated content. Firebase Storage is backed by Google Cloud Storage, a powerful, simple,
7+
user-generated content. Cloud Storage is a powerful, simple,
88
and cost-effective object storage service.
99

10-
FirebaseUI provides bindings to download an image file stored in Firebase Storage
10+
FirebaseUI provides bindings to download an image file stored in Cloud Storage
1111
from a [`StorageReference`][storage-reference] and display it using the popular
1212
[Glide][glide] library. This technique allows you to get all of Glide's performance
13-
benefits while leveraging Firebase Storage's authenticated storage capabilities.
13+
benefits while leveraging Cloud Storage's authenticated storage capabilities.
1414

1515
To load an image from a `StorageReference`, simply use the `FirebaseImageLoader` class:
1616

1717
```java
18-
// Reference to an image file in Firebase Storage
18+
// Reference to an image file in Cloud Storage
1919
StorageReference storageReference = ...;
2020

2121
// ImageView in your Activity
@@ -28,7 +28,7 @@ Glide.with(this /* context */)
2828
.into(imageView);
2929
```
3030

31-
Images displayed using `FirebaseImageLoader` are cached by their path in Firebase Storage, so
31+
Images displayed using `FirebaseImageLoader` are cached by their path in Cloud Storage, so
3232
repeated loads will be fast and conserve bandwidth. For more information on caching in Glide,
3333
see [this guide][glide-caching].
3434

0 commit comments

Comments
 (0)