4
如果我想允許用戶從設備上傳自己的照片:UserProfileChangeRequest setPhotoUri - 它是如何完成的?
需要哪些圖像格式?
圖片文件大小?
圖片尺寸大小?
我在哪裏上傳它?
代碼:
UserProfileChangeRequest profileUpdates = new UserProfileChangeRequest.Builder()
.setDisplayName("Jane Q. User")
.setPhotoUri(Uri.parse("https://example.com/jane-q-user/profile.jpg"))
.build();
正如你可能已經注意到它是一個圖像** URI **。所以這是您存儲個人資料圖片的網址。 Firebase身份驗證沒有規定特定的大小要求。如果您想上傳自己的個人資料圖片,可以考慮使用[Firebase Storage](https://firebase.google.com/docs/storage/web/upload-files)。 –