Why MediaExtractor getTrackCount returns 0 in andr

2019-09-02 19:29发布

I ran exactly the same code on:

  • Android 4.1.2
  • Android 4.2.2
  • Android 4.4.2.

It works well on 4.1.2 and 4.2.2, but NOT on 4.4.2.

The problem is MediaExtractor.getTrackCount returns 0 on 4.4.2 (while it returns the right number on other devices)

Any idea?

I am also facing the very same issue. Did you got the solution ?

1条回答
啃猪蹄的小仙女
2楼-- · 2019-09-02 20:07

I finally figured out where the problem is. For 4.4.2, u got to add permission in the AndroidManifest.xml about write external storage if you play local file. here is the code

查看更多
登录 后发表回答