0

I'm developing a radio stream app.I use android - mediaplayer class which plays radiostream. I m trying to run app in two devices . When I pressed back button in Samsung galaxy S3 mini(4.2.2) radio stream continues to playing. And I controls media player with notification bar. But when I pressed back button in Samsung galaxy S3(4.3) mediaplayer stopping to play. Why is stopping media player? How can I prevent stop when pressed back?

captainblack
  • 903
  • 3
  • 9
  • 20

2 Answers2

1

I don't use service but still I have not understood why s3 kills activity. But I found a solution . I change my super.onBackPressed() to moveTaskToBack(true);. And I added this option to manifest file in activity tag(Main) android:noHistory="true". Anymore when I pressed back key MediaPlayer isn't stopping stream. Maybe this solution may be useful to someone else. And I thanks for all of you for the answers.

captainblack
  • 903
  • 3
  • 9
  • 20
0

Without some code i doubt anyone will be able to help.

How are you playing the radio stream? Are you using a service? If not the back button on S3 could be killing your app thus terminating the stream.

Evripidis Drakos
  • 872
  • 1
  • 7
  • 15