GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Version 0.6.0, FirebaseUI Storage by samtstern · Pull Request #324 · firebase/FirebaseUI-Android

Conversation

@samtstern

@samtstern samtstern commented Sep 23, 2016

Copy link
Copy Markdown
Contributor

Implements FirebaseImageLoader and bumps overall version to 0.6.0.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@samtstern
Version 0.6.0, FirebaseUI Storage
5f075ca
@samtstern
samtstern force-pushed the storage-v1 branch from 37e6c89 to 5f075ca Compare September 23, 2016 22:49
@samtstern

samtstern commented Sep 23, 2016

Copy link
Copy Markdown
Contributor Author

cc: @mcdonamp @morganchen12

Not sure who should review this, likely @puf

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

asciimike
asciimike approved these changes Sep 24, 2016
View reviewed changes

@asciimike asciimike left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few general comments, but otherwise LGTM.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread app/src/main/java/com/firebase/uidemo/storage/ImageActivity.java Outdated
setContentView(R.layout.activity_image);
ButterKnife.bind(this);

// Authenticate so that uploading/downloading works

@asciimike asciimike Sep 23, 2016

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do the other samples work or do we just set rules? I'd consider making auth global (across all sample features--though I guess it doesn't make sense for auth ;), or just getting devs to change their rules?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@samtstern samtstern Sep 24, 2016

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since authenticated downloads is a feature of the lib I'd like to keep auth, but I will add a comment here to explain and log some better resolution steps.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread app/src/main/java/com/firebase/uidemo/storage/ImageActivity.java Outdated
if (!task.isSuccessful()) {
Log.w(TAG, "signInAnonymously", task.getException());
Toast.makeText(ImageActivity.this,
"Authentication failed, uploads and downloads will not work.",

@asciimike asciimike Sep 23, 2016

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should include a resolution step here: enable auth or change your rules (or something strange happened)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@samtstern samtstern Sep 24, 2016

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added log message with detailed instructions.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread storage/README.md Outdated

## Using FirebaseUI to download and display images

FirebaseUI provides bindings to download an image file from a `StorageReference` and display it

@asciimike asciimike Sep 24, 2016

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Include links to StorageReference and Glide.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@asciimike asciimike Sep 24, 2016

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might also mention what Storage is with a brief blurb.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@samtstern samtstern Sep 24, 2016

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread storage/README.md Outdated

FirebaseUI provides bindings to download an image file from a `StorageReference` and display it
using the popular `Glide` library. This technique allows you to get all of Glide's performance
benefits while leveraging Firebase Storage's authenticated hosting capabilities.

@asciimike asciimike Sep 24, 2016

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"authenticated storage..."

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@samtstern samtstern Sep 24, 2016

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread storage/README.md
.into(imageView);
```

Images displayed using `FirebaseImageLoader` are cached by their path in Firebase Storage, so

@asciimike asciimike Sep 24, 2016

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disk or memory?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@samtstern samtstern Sep 24, 2016

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whatever the user sets. Adding link.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread storage/build.gradle Outdated

compile 'com.github.bumptech.glide:glide:3.7.0'

compile "com.google.firebase:firebase-auth:${project.ext.firebase_version}"

@asciimike asciimike Sep 24, 2016

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it actually needs auth, right? It can work without authentication if rules are set.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@samtstern samtstern Sep 24, 2016

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread storage/src/main/java/com/firebase/ui/storage/images/FirebaseImageLoader.java
@Override
public InputStream loadData(Priority priority) throws Exception {
mStreamTask = mRef.getStream();
mInputStream = Tasks.await(mStreamTask).getStream();

@asciimike asciimike Sep 24, 2016

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how are errors propagated?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@samtstern samtstern Sep 24, 2016

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I call .await() that will throw an Exception if something goes wrong. That will be handled by Glide, and the user can attach failure listeners to Glide if they want to know about this.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@samtstern
Address review comments
897f1f2
@samtstern
samtstern merged commit 3ee51f2 into firebase:master Sep 24, 2016
This was referenced Sep 24, 2016
Document Firebase Storage integration #318
Closed
Add Firebase Storage + Glide to sample apps #317
Closed
Extend Glide to support Firebase Storage #314
Closed
amandle pushed a commit to amandle/FirebaseUI-Android that referenced this pull request Oct 6, 2016
@samtstern Aaron Mandle
Version 0.6.0, FirebaseUI Storage (firebase#324)
1cc9815
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@asciimike asciimike asciimike approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@samtstern @asciimike
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.