[Q] Hello, I have an issue with the media player on rotation

All your problems with Audio, Video and Images.

[Q] Hello, I have an issue with the media player on rotation

Postby xsxbluexsx » Sat Mar 19, 2011 6:25 pm

I have a media file playing in the oncreate, and everytime i switch over to landscape it replays the audio file, i cannot restrict it from turning to land scape because thats the purpose of the app, is there any way i can possible pause the player and start it up again once its on landscape?

i tried

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. if(alert.isPlaying() == true){
  2. alert.stop;
  3. }else{
  4. alert.start;
  5. }
  6.  
Parsed in 0.030 seconds, using GeSHi 1.0.8.4

I just typed this out in this post so i know i made an error, im still new to android programming.

Please and thank you,
Alexander Napoles
xsxbluexsx
Freshman
Freshman
 
Posts: 8
Joined: Sun Aug 22, 2010 3:34 am

Top

Re: [Q] Hello, I have an issue with the media player on rota

Postby strider2023 » Fri Apr 01, 2011 8:36 am

Whenever there is an orientation change or change in the device's power mode the services restart. This is what is causing your mediaplayer to restart. This is a known issue (refer android's documentation).
strider2023
Senior Developer
Senior Developer
 
Posts: 126
Joined: Tue Mar 02, 2010 6:34 am
Location: Chennai, India

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 16 guests