I have uploaded few images in firebase storage, now i need the public http link of an image, not the download link which is like: com.google.android.gms.tasks.zzw@13xxxxx
I actually want a link that can pasted in the google search and show me that image like: https://firebasestorage.googleapis.com/v0/b/pay-a6698.appspot.com/o/images%2Fname%2Fprofile?alt=media&token=b0745cdc-3078-42a9-a574-03539fa64e1f
how to do this?
I did it like this but this, it link in the form : com.google.android.gms.tasks.zzw@13xxxxx
private fun getImageUrl(filename: String)=CoroutineScope(Dispatchers.IO).launch{
var downloadUrl=imageRef.child("images/name/$filename").downloadUrl
imageUrl=downloadUrl.toString()
Log.d("url", imageUrl!!)
//saving url in sharedPref
val editor=sharedPrefCam.edit()
editor.apply {
putString("profileImgUrl", imageUrl)
apply()
}
}