I am getting the duration of a media file in ExoPlayer and writing it to an SQL d/b. Originally I put the duration in an Int variable before writing it to the d/b via a Map (using DBUtils). It worked fine. Then I noticed that "duration" in class SimpleExoPlayer is defined as "Long" (as is...
I read somewhere that a negative value is returned for Exoplayer duration if it is yet unset (kind of). I put a Wait For exoplayer ready event (Ex. Wait For Exoplayer1_Ready) before reading the duration value and I think the problem was solved.