2

I have developing an android application that needs to play song online. I am using MediaPlayer to play song. But it is working properly in all android version till Lollipop only. In marshmallow, occure problems & app crashes while play song. Is there any permission needed in marshmallow to use MediaPlayer ?

Urvashi Patel
  • 110
  • 1
  • 2
  • 12

2 Answers2

2

Look at the logcat to see what is the error. Have you add the internet and the storage permission at run time? Check here if you have done it right. https://developer.android.com/training/permissions/requesting.html

Erik Minarini
  • 4,795
  • 15
  • 19
1

It Requires Storage Permission at runtime. Open your App from setting and in Permission see the Require Permissions. On the Permission from there and Run Again. Then give the runtime permission for Marshmallow. Else check the Log for more error.

Avinash Verma
  • 2,572
  • 1
  • 18
  • 22