简体   繁体   中英

Android Studio upload image to firebase storage from drawable

有没有一种方法可以将PNG文件从Drawable文件夹上载到Firebase存储中,并获取URL并将其放入FireStore数据库中?

Yes, you would convert your drawable resource to a bitmap and save it to a file , then upload that file to Firebase Storage, during which you will determine the image URL. You can then store that value in your Firestore database.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM