-
Notifications
You must be signed in to change notification settings - Fork 714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.02 firebase storage put file #19
Open
ijann
wants to merge
9
commits into
1.00-starting-point
Choose a base branch
from
2.02-firebase-storage-put-file
base: 1.00-starting-point
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Don't forget to add your own google-services.json file too.
I changed Glide by Picasso, I thought that version 4 of Glide produced me problems but this same, I do not upload the image, some idea please |
Uri downloadUrl = taskSnapshot.getDownloadUrl(); this api not found in new version. so you have to modified code from photoref.putfile following snippet is working in latest firebase config
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Hello, I'm sorry but I have a problem, I do not upload the photo to my store, the rules in my firebase store console is:
service firebase.storage {
match /b/chatfriendly.appspot.com/o {
match /chat_photos/{allPaths=**} {
allow read, write: if request.auth != null && request.resource.size < 3 * 1024 * 1024;
}
}
}
And the rule in the firebase database is:
{
"rules": {
"messages": {
// only authenticated users can read and write the messages node
".read": "auth != null",
".write": "auth != null",
"$id": {
// the read and write rules cascade to the individual messages
// messages should have a 'name' and 'text' key or a 'name' and 'photoUrl' key
".validate": "newData.hasChildren(['name', 'text']) && !newData.hasChildren(['photoUrl']) || newData.hasChildren(['name', 'photoUrl']) && !newData.hasChildren(['text'])"
}
}
}
}
For authentication use the new method:
startActivityForResult(
AuthUI.getInstance()
.createSignInIntentBuilder()
.setIsSmartLockEnabled(false)
.setProviders(Arrays.asList(
new AuthUI.IdpConfig.Builder(AuthUI.EMAIL_PROVIDER).build(),
new AuthUI.IdpConfig.Builder(AuthUI.GOOGLE_PROVIDER).build()))
.build(), RC_SIGN_IN);
I do not know if it's the wrong extensions
build.gradle (app)
dependency {
}
apply plugin: 'com.google.gms.google-services'
build.gradle (project)
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.1.0'
}
}
Well the most important method for the upload is:
`@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
I give it to upload a photo, I select the photo and nothing
06-14 19:24:24.100 7781-17645/com.example.chatfriendly V/FA: Using measurement service 06-14 19:24:24.100 7781-17645/com.example.chatfriendly V/FA: Connection attempt already in progress 06-14 19:24:24.101 7781-17645/com.example.chatfriendly D/FA: Connected to remote service 06-14 19:24:24.102 7781-17645/com.example.chatfriendly V/FA: Processing queued up service tasks: 2 06-14 19:24:24.160 7781-7781/com.example.chatfriendly W/IInputConnectionWrapper: reportFullscreenMode on inexistent InputConnection 06-14 19:24:24.160 7781-7781/com.example.chatfriendly W/IInputConnectionWrapper: finishComposingText on inactive InputConnection 06-14 19:24:29.498 7781-17645/com.example.chatfriendly V/FA: Inactivity, disconnecting from the service 06-14 19:24:30.114 7781-17645/com.example.chatfriendly V/FA: Using measurement service 06-14 19:24:30.114 7781-17645/com.example.chatfriendly V/FA: Connecting to remote service 06-14 19:24:30.117 7781-17645/com.example.chatfriendly V/FA: Activity resumed, time: 20019705 06-14 19:24:30.206 7781-7869/com.example.chatfriendly E/EGL_emulation: tid 7869: eglSurfaceAttrib(1178): error 0x3009 (EGL_BAD_MATCH) 06-14 19:24:30.206 7781-7869/com.example.chatfriendly W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0x8a15d340, error=EGL_BAD_MATCH 06-14 19:24:30.299 7781-17645/com.example.chatfriendly D/FA: Connected to remote service 06-14 19:24:30.300 7781-17645/com.example.chatwithfriendly V/FA: Processing queued up service tasks: 1 06-14 19:24:35.301 7781-17645/com.example.chatfriendly V/FA: Inactivity, disconnecting from the service