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?
Asked
Active
Viewed 219 times
0
-
1Is this a programming question or a device support question? – LittleBobbyTables - Au Revoir Jan 29 '15 at 13:58
-
Questions about general computing hardware and software are off-topic for Stack Overflow. – Vivek Jan 29 '15 at 14:02
-
Sorry there is a misunderstanding . My explain is some missing . I m developing a radio stream app. The mediaplayer is android mediaplayer. I use android mediaplayer in my code.I updated. – captainblack Jan 29 '15 at 14:08
-
so You should show what You have done in code.... – Opiatefuchs Jan 29 '15 at 14:10
-
@Opiatefuchs but there is no exception. Only I pressed back button . There is only super.onBackPressed(); – captainblack Jan 29 '15 at 14:15
-
look here, some possible solutions... http://stackoverflow.com/questions/6668298/how-do-android-mediaplayers-continuing-playing-songs-when-app-is-closed – Opiatefuchs Jan 29 '15 at 14:23
2 Answers
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