Dear Friends,
Once your app is complete and you have some background music you try to run it on simulator and you think everything working.
When you submit the app in app store you get error test case 6.5 failed.
Which Says
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” So next question arises how to pass this test. so its fairly simple Just follow below steps assuming that your page has a media player control with name mplayer. Step 1:- Add reference of Microsoft.Xna.Framework & Microsoft.Xna.Framework.Media on your page Step 2: You need to write following line
1: FrameworkDispatcher.Update();
2:
3: f(MediaPlayer.GameHasControl)
4: mplayer.play()}else if(MessageBox.Show("Isitoktostopcurrentlyplayingmusicandplaychant?")==MessageBoxResult.OK)
5:
6:
7: player.play();}
Now your issue is resolved.
to test this just play music in your app then run your app. It will give you popup. which we wrote above.
I hope you can submit your app now.
Thanks
Rajat Jaiswal
No comments:
Post a Comment