Is there a more accurate Android method for 35mm focal length?

I am using exift data with “ExifInterface.TAG_FOCAL_LENGTH_IN_35MM_FILM” to get Focal Length in 35mm on Android. However, TAG_FOCAL_LENGTH_IN_35MM_FILM data cannot be received for every android device in the exift data. In cases where I can get it (for example: on the s22 Ultra Wide Angle camera), the 35mm value comes as 13 data. And the people who commented on it say it was wrong.

val exifInterface = ExifInterface("file")
 exifInterface.getAttribute(ExifInterface.TAG_FOCAL_LENGTH_IN_35MM_FILM

Is 35mm focal length correct and is there a method that I can get for every device? Thanks

To address this issue, you can consider Fallback to Other Exif Data.
If the TAG_FOCAL_LENGTH_IN_35MM_FILM is not available or is unreliable on a particular device, you can try using other available Exif tags to determine the focal length. For example, you can use ExifInterface.TAG_FOCAL_LENGTH to retrieve the focal length in millimeters directly. While this value might not be in 35mm equivalent, it can still provide valuable information about the focal length of the image.

Kotlin

val exifInterface = ExifInterface("file")
val focalLength = exifInterface.getAttribute(ExifInterface.TAG_FOCAL_LENGTH)

Thanks