Making firebase storage public for reading and writing on android

Just Removing

if request.auth != null;

service firebase.storage {
  match /b/image-view-b1cf5.appspot.com/o {
    match /{allPaths=**} {
      // Allow access by all users
      allow read, write;
    }
  }
}

Happy Coding


The documentation explains that if no rule expression is provided, the rule evaluates to true:

service firebase.storage {
  match /b/image-view-b1cf5.appspot.com/o {
    match /{allPaths=**} {
      // Allow access by all users
      allow read, write;
    }
  }
}

FYI: if you want public read only.

service firebase.storage {
  match /b/image-view-b1cf5.appspot.com/o {
    match /{allPaths=**} {
        allow read;
        allow write: if request.auth != null;
    }
  }
} 

// Anyone can read or write to the bucket, even non-users of your app.
// Because it is shared with Google App Engine, this will also make
// files uploaded via GAE public.
service firebase.storage {
  match /b/{bucket}/o {
    match /{allPaths=**} {
      allow read, write;
    }
  }
}