How to get the path of removable storage (removable SD Card) on Android 10, especially samsung phones. As the location of the removable storage is now of the format /storage/???? ???? I found it hard to get the path as it changes with each phone.
I am posting the solution as well, it has worked well on Samsung and Mi phones.
I would like to share a solution which took me days to find and hopefully shall help others as well. The removable sd card storage on latest android versions is like "/storage/???? ????", this location is quite hard to get. I found the following code from here: This code helps get the correct location even on Samsung phones. I have tried it on Samsung and Mi phones.
Get external sd card path using reflection
@param mContext
@param is_removable is external storage removable
@return */
}