×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    52

    app kills music playing in background...

    just had my first cert fail!!

    two issues, fixed one, a last min change that caused a crash.

    the other i'd not tested, when music is playing and app starts the music stops

    tracked it down to these two capabilities

    <Capability Name="ID_CAP_MEDIALIB_AUDIO" />
    <Capability Name="ID_CAP_MEDIALIB_PLAYBACK" />

    but if i remove either the music continues.
    BUT i stop having access to the camera - i just get a white screen - its a photo app

    any clues?

    thanks in advance.

    Mac

  2. #2
    Registered User
    Join Date
    Sep 2009
    Posts
    52

    Re: app kills music playing in background...

    mmm just checked the realtime filter demo app - which i used as base code for my app, and that kills any music playing too

  3. #3
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    527

    Re: app kills music playing in background...

    You shouldn't require any of those capabilities to access the Camera. You will have to add ID_CAP_MEDIALIB_PHOTO and ID_CAP_ISV_CAMERA though.

    Just having the capabilities there shouldn't affect the audio playback though. Somewhere in the code it has to be stopped using those capabilities so I'd check for those.

  4. #4
    Registered User
    Join Date
    Sep 2009
    Posts
    52

    Re: app kills music playing in background...

    Quote Originally Posted by SB Dev View Post
    You shouldn't require any of those capabilities to access the Camera. You will have to add ID_CAP_MEDIALIB_PHOTO and ID_CAP_ISV_CAMERA though.

    Just having the capabilities there shouldn't affect the audio playback though. Somewhere in the code it has to be stopped using those capabilities so I'd check for those.
    yep its odd

    i think its becuause its using a video stream and processing that

    MediaStreamSource

  5. #5
    Registered User
    Join Date
    Sep 2009
    Posts
    52

    Re: app kills music playing in background...

    yep its because I'm using a video stream - a future version will output a video clip as well as stills - when theres an easy way to render to video.

    I can't see anyway of using MediaStreamSource without the audio element.

  6. #6
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    527

    Re: app kills music playing in background...

    How hard would it be to do the current version of your App without using the MediaStreamSource. I'm using the AudioVideoCapture-Device to just capture stills from the preview stream right now without any issues due to missing capabilities.

  7. #7
    Registered User
    Join Date
    Sep 2009
    Posts
    52

    Re: app kills music playing in background...

    ok well seems as long as i warn the user it will stop music its ok
    so just need an alert at the beginning.

  8. #8
    Super Contributor
    Join Date
    Feb 2013
    Location
    Dublin, Ireland
    Posts
    585

    Re: app kills music playing in background...

    I was just looking at the guidelines...

    When the user is already playing music on the phone when the app is launched, the app must not pause, resume, or stop the active music in the phone MediaQueue by calling the Microsoft.Xna.Framework.Media.MediaPlayer class.
    If the app plays its own background music or adjusts background music volume, it must ask the user for consent to stop playing/adjust the background music (e.g. message dialog or settings menu). This prompt must occur each time the app launches, unless there is an opt-in setting provided to the user and the user has used this setting to opt-in.
    Whatever is the cause of the music stopping (obviously it must be the initialisation of some media playing XAML element or API), you'll have to conditionally add/remove it based on a) if music is playing when the app starts and b) what the user decides to do.

  9. #9
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,771

    Re: app kills music playing in background...

    For completeness, it may be worth adding that MediaPlayer.State (http://msdn.microsoft.com/en-us/libr...yer.state.aspx) seems to tell you if something is playing.

Similar Threads

  1. Playing music in background of the game.
    By Hesam in forum Mobile Java General
    Replies: 2
    Last Post: 2010-11-15, 21:03
  2. playing music notes with the HW
    By r3bol in forum Symbian
    Replies: 2
    Last Post: 2008-11-08, 17:52
  3. Playing music (mp3/wav) in uplink with APS
    By gailu in forum Symbian
    Replies: 9
    Last Post: 2008-10-08, 09:57
  4. problems about playing music
    By 02060515 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2008-09-26, 02:24
  5. why can't continue playing PCM format music?
    By hz_chenpeng in forum Symbian
    Replies: 1
    Last Post: 2007-07-27, 09:03

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×