locked
Whats the difference between "AutoPlay Content" and "AutoPlay Device" RRS feed

  • Question

  • Its not mentioned in the docs. If I want import document files from a thumb drive to which should I use?

    Furthermore: It seems when I choose "AutoPlay Content" Windows remembers my choice and opens my app which each thumb drive instead of asking me again. Can I prevent Windows from remembering the chosen handler without manually setting "Always ask" in the "Default programs" dialogue?

    Wednesday, September 26, 2012 3:16 PM

Answers

  • For an app that imports documents from a thumb drive, you use the "StorageOnArrival" AutoPlay Content event.  

    Here's the list of events: http://msdn.microsoft.com/en-us/library/windows/apps/hh452731.aspx

    The list covers both AutoPlay Content and Device events. As a general rule:

    • AutoPlay Content => triggered by USB mass storage devices (such as thumb drives, some USB camera storages). 
    • AutoPlay Device => triggered by Windows Portable Devices running Media Transfer Protocol (MTP).  These are the WPD\XXX events. 

    AutoPlay respects the user's choice of app, which means instead of showing a toast and the list of apps registered for AutoPlay every time you connect the thumb drive, the app that the user selected will launch. One exception is if the user installs a new app that registers for the same AutoPlay event, where AutoPlay will again present a choice to the user (with the new app added to the list).  

    To override AutoPlay behavior, you manually set "Always Ask" or reset to the default AutoPlay settings using the AutoPlay Control Panel. There's no programmatic way to override this because the user choice is honored.



    Thursday, September 27, 2012 5:26 AM