Hi everybody,
I am trying to implement a solution that would start playing some music when it downloads something and proceed in 5 seconds in the next activity automatically (the music lasts about 20 seconds). Here is what is happening:
I am trying to play the music with the with MediaPlayer object. Sometimes the music starts and continues playing when changing to the second activity and sometimes stops immediately when I call the StartActivity method. I tried moving the playing of the music to a service and make the service play it in the Service_Start method. I tried it but the same thing happens again. What is the meaning of all this? Why does Android decide by itself what to do (play continuesly or stop immediately the music)? Is there any way to manipulate this? I tried it in Android 7.
Thanks
I am trying to implement a solution that would start playing some music when it downloads something and proceed in 5 seconds in the next activity automatically (the music lasts about 20 seconds). Here is what is happening:
I am trying to play the music with the with MediaPlayer object. Sometimes the music starts and continues playing when changing to the second activity and sometimes stops immediately when I call the StartActivity method. I tried moving the playing of the music to a service and make the service play it in the Service_Start method. I tried it but the same thing happens again. What is the meaning of all this? Why does Android decide by itself what to do (play continuesly or stop immediately the music)? Is there any way to manipulate this? I tried it in Android 7.
Thanks