locked
Certification failed for background audio streaming app RRS feed

  • Question

  • I submitted a background audio app for certification and has failed with two reasons in which I could not figure out why.

    Reason 1:

    This app failed to correctly respond to at least one of the play, pause, or play/pause events.

    I understand that the MediaControl events for PlayPauseStop and PlayPause need to be catered, and have done so (and tested on both tablets and local devices that they are working) in the code. However, due to the reason that stopping a media stream and restarting it requires a longer-than-expected time, I used MediaElement.Pause() for both "Pause" and "Stop".

    I read another post who had similar problem at the certification phase. Somebody recommended to useMediaElement.PlaybackRate = 0; instead. However, this is not ideal for long pauses as the stream will not move on.

    What I wish to know is am I doing this the right way? For all my MediaControl events I have made sure that the MediaControl.IsPlaying property is correctly set as well.

    Also, another reason it failed was this:

    App failed the Perf test in the Windows ACK. See the following links for more information: Test cases ran: http://msdn.microsoft.com/en-us/library/windows/apps/hh920274.aspx

    I have ran my app against the ACK and it all passed. The only thing I can think of is that the app does not enter suspend mode when the hardware (or on-screen) media control pause button is pressed. I have placed a debugger in the App_Suspending event but it never hits there.

    As the description is too vague I am not sure if this is the problem. But if it's the case, can I know how do I force the app to enter suspended mode? I tried looking in the Window.Current class andApplication.Current class, but to no avail.

    Thanks!

    Wednesday, January 23, 2013 6:55 PM

Answers

  • After much hassle, the app has finally passed certification.

    To cut a long story short. My background-capable audio will auto-start as soon as the app is loaded. This actually prevent WACK from passing as the app will never enter suspended mode. (App will remain active in background as the audio is still playing)

    As soon as I switched the app to manual start mode (i.e. user need to click on a play button to start streaming), everything passed and the app is now on the store. Thanks everyone who helped!

    • Marked as answer by VT.CrazyAppy Saturday, January 26, 2013 7:42 AM
    Saturday, January 26, 2013 7:42 AM

All replies

  • Hi,

    Using Pause instead of Stop is not suggested. You could improve the performance in other way. From the reason, it seems that the problem is due to the Play or Pause handler, not Stop handler.

    Here is the blog about media playback:

    http://blogs.msdn.com/b/windowsappdev/archive/2012/08/23/media-playback-what-you-need-to-know-about-playing-media-to-make-your-app-shine-in-windows-8.aspx

    Improve performance:

    http://blogs.msdn.com/b/windowsappdev/archive/2012/04/03/how-to-improve-performance-in-your-metro-style-app.aspx

    Did the WACK tell you the exact reason why your app can not pass the test? When app are running in VS, it won't be suspended automatically. You have to click "Suspend" button to suspend the app.


    Aaron
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, January 25, 2013 10:24 AM
  • Hi,

    I managed to get around with the first reason. I had to release all streaming resources as it enters suspend mode after the pause media control button was pressed.

    Now I'm still stuck at the WACK part. The certification report did not tell me which part it failed. But the URL the tester provided indicate that the following probable reasons:

    1. Startup time nearing 5 seconds on lower capacity devices
    2. Suspend time took more than 2 seconds

    I checked both on Atom devices and the results were as good as my other published apps (well below the threshold), I am not sure what else can I do. :(

    Friday, January 25, 2013 2:06 PM
  • Talked to a Microsoft tech support representative. She recommended that I submit the app under the x86 architecture only, citing reasons that it may crash on ARM-based devices. Will keep an eye on that.

    On the other hand, I am trying to understand how an app's startup time is calculated. I was under the impression that the app will enter "active" state (or IsRunning) as soon as the OnLaunched event has finished processing.

    I have long-running operations (web request calls, image pulling, data downloading etc) that run as long as 3 seconds. I have placed them in async methods and ran without using the await methods from the OnNavigatedTo event, will this time be counted against the launch time as well? Sample:

            protected override void OnNavigatedTo(NavigationEventArgs e)
            {
                InitAllAsync();
            }
    
    async private Task InitAllAsync()
            {
                await HttpHelper.InitAsync();
                await AlbumManager.InitAsync();
                await InfoManager.InitAsync();
                await PSDManager.InitAsync();
            }


    Friday, January 25, 2013 5:20 PM
  • After much hassle, the app has finally passed certification.

    To cut a long story short. My background-capable audio will auto-start as soon as the app is loaded. This actually prevent WACK from passing as the app will never enter suspended mode. (App will remain active in background as the audio is still playing)

    As soon as I switched the app to manual start mode (i.e. user need to click on a play button to start streaming), everything passed and the app is now on the store. Thanks everyone who helped!

    • Marked as answer by VT.CrazyAppy Saturday, January 26, 2013 7:42 AM
    Saturday, January 26, 2013 7:42 AM