locked
Connected standby app playing sound periodically

    Question

  • Gentlemen,

    I need to do a very simple thing and since I find all the stuff around programming metro apps very complicated, I need a simple straightforward advice. I believe that what I need to achieve involves a few lines of code any experienced dev would write in a few minutes.

    I have a problem with my bluetooth headset that causes the headset to disconnect when I pause the playback when in connected standby. I believe that having a different application playing a sound periodically (some inaudible sound) would prevent the headset from disconnecting. So...

    I need those few lines of code that will periodically play a sound in connected standby, and that's all.

    I will be grateful if there is someone either telling me those few lines, or pointing me to some how-to for dummies, or telling me it won't be easy and I should give it up.

    Thank you for reading and, possibly, replying.

    Mike

    Wednesday, July 16, 2014 2:18 PM

All replies

  • I am not sure that your analysis of your problem is correct. That said, there is no application that will periodically play a sound in connected standby.  There is the concept of background audio, but it is not the same as having a scheduled background task. Additionally, scheduled background tasks cannot play audio as there is no UI thread, which is necessary for UI elements such as MediaElement.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Wednesday, July 16, 2014 7:28 PM
    Moderator
  • Thank you for your response. As I say, I am complete noob in this. So, instead of repeating, is there an option to just loop something continuously (wav, preferably)? That would also do.
    Thursday, July 17, 2014 6:56 AM
  • Well, you can actually have an audio track that is completely silent playing. But you're starting to get into the weird part of this - you're trying to solve one problem by causing other problems. You can find all kinds of documentation and samples for doing this but I feel you're going to cause other unforeseen problems. 

    What exactly is the behavior you're encountering?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, July 17, 2014 11:36 AM
    Moderator
  • Hello,

    the problem I try to solve is described in this post:

    "Bluetooth headset disconnects when stopping playback" at eightforums. Unfortunately, I am not allowed to insert links, so here's the quote, so far no one replied.

    ,,I have Lenovo Miix 2 10 tablet and Creative WP-300 headset. When I listen to music and put the device into Connected Standby it keeps playing nice. But when I pause the playback using controls on the headset, the headphones disconnect and are unable to reconnect automatically. So I have to "wake up" the tablet and manually reconnect the headphones. This make it unusable for listening to music on the way. I also unchecked the option to allow the system to turn off bluetooth to save power.

    Please, suggest how to troubleshoot this, some log where I can see bluetooth was turned of although it isn't supposed to. Microsoft technical support left me dead in the water. Thank you.

    EDIT: when i pause the playback, the headphones disconnect, then reconnect for like a second and then disconnect again. Everytime I push pause/play button it connects/disconnects, without a chance of working."

    As you can see, nobody could help me, so this might be the last chance to make it working.

    Friday, July 18, 2014 7:33 AM
  • "Microsoft technical support left me dead in the water."

    You opened a support case for this? If so, what was your case number? 


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Friday, July 18, 2014 2:27 PM
    Moderator
  • I tried to solve this with chat support. I was told that Microsoft doesn't provide FREE support for third party devices (Tablet by Lenovo, Bluetooth adapter). Although this might be caused by a Bluetooth driver, I'm pretty sure there is another solution possible than searching for another driver and possibly messing it all up. If you think I should contact someone else, please, let me know.
    Saturday, July 19, 2014 7:01 AM