Android Question mediaplayer to stay on

Discussion in 'Android Questions' started by a2stepper, Jan 25, 2015.

  1. a2stepper

    a2stepper Member Licensed User

    i'm using the mediaplayer found in the tutorials and works great but when the phone
    power times out the app stop playing.
    how might i get it to keep runing when times out?

    thanks.
    Paul
     
  2. NJDude

    NJDude Expert Licensed User

    You have to prevent the phone for going to "sleep", you can search the forum to learn how to do that (hint: PhoneWakeState).
     
  3. a2stepper

    a2stepper Member Licensed User

    thank you nj dude.....
     
  4. a2stepper

    a2stepper Member Licensed User

    i have used the keep awake and works great but i'm using a media player with mabey an hour audio file playing and would
    want the screen to turn off but keep the app alive and playing.
    is there any way to do this?

    thanks.
    paul
     
  5. NJDude

    NJDude Expert Licensed User

    In that case, move your media player to a service.
     
  6. a2stepper

    a2stepper Member Licensed User

    ok, but what's a player service????
     
  7. NJDude

    NJDude Expert Licensed User

    Your media player sub, move it to a service.
     
  8. a2stepper

    a2stepper Member Licensed User

    ok but still don't know to service?
     
  9. NJDude

    NJDude Expert Licensed User

    You can start by reading THIS, there are plenty of examples too.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice