I have made an social app for image and video sharing.However,its taking too much time for loading the image.I am using the glide library.Please, tell me how can I reduce the size of image picked up from gallery without considerable change in quality of image (like Instagram do) and then upload it to firebase storage.Please help!
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
Here i am using this code to upload compressed image on
firebase storeage
I have done the same for uploading image to firebase using bitmap.compress
bitmap.compress(Bitmap.CompressFormat format, int quality, OutputStream stream)
you can change the quality of the bitmap and compress it.
just go ahead and do above steps it will reduce your image size and upload it on firebase it reduce the image size upto 1 to 2 mb like on my experience 4mb file became 304kb .
filepath
is andFile
object of your selected image. :)