Feasibility on Launching the HTML & SWF files from temp location using launcher or web view control.


  • Hi, 

    I have done some research and I knew the .swf & .flv files are not supported inside the Metro apps. But I’m looking for an alternative and below.

    My Basic requirement is:

    I need to move some of the content from the SD card to Application Temp folder location while app is running. I could not have these files inside the installation folder as the size of the file will be too large. So file will be always only in SD Card. Also I’m not going to copy all the files at the same time to temp folder. Only the files I needed currently will be moved to temp folder.

    So it is clear that I could not keep the files inside the Installation folder.

    Now my issues are,

    Accessing the HTML files from Temp location.

    1.        My preference is to load the HTML file inside the application. So I tried to open the file using Web View control and it is not loading the HTML files which is in temp folder. I have also make sure the file is correct by opening the HTML file in normal IE browser from desktop. It loads well. Also I have tried in the way coping the HTML file inside the installation folder and tried to open the file. It works perfect now. The file is a simple HTML file without any JS or big controls. So based on the research I see the file which is only inside the Installation folder will be able to load in the Web View Control.  Can anyone suggest me is there any other way to proceed this or my finding is wrong?
    2.        I have also tried to load the HTML files using Launcher to launch in browser. But even the Launcher does not work with other physical path like temp folders.

    Also i don't want to read the HTML file as stream as the content will be huge and might face more problem in handling it. 

    Accessing the SWF File from the Temp Folder:

    1.        I understand the SWF Files will not be played inside the application. But when I try to launch the .SWF files in launcher to open in browser it does not work when the file is in temp folders. But when i try to open from installed location it ask me for relevant app which runs the SWF files. It does not runs inside the browser.         
     var uri = new Uri("ms-appx-web:///Assets/Content/SWF_File.swf");
     var success = await Launcher.LaunchUriAsync(uri);
     var file = await tempFolder.GetFileAsync(decryptedFile.Name);
            var uri = new Uri(file.Path, UriKind.RelativeOrAbsolute);
            var success = await Launcher.LaunchUriAsync(uri);

    Can any suggest me what will be the best way to proceed to resolve this issues.



    -Kamal. If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".

    Tuesday, April 8, 2014 6:00 PM


  • Hi Kamal,

    I replied you with the first question in another thread, and for the second question:

    I consider your "Browser" means "IE" or "Chrome" web browser. You have to decide which application can be used to play swf file before you can play it in browser, system does not know browser is your first choice. You have to set them.

    A really simple way to set the default application is to set in Control Panel ->Default Programs. Once you set browser as your first choice to play swf, you can use your code to play the flash in your Desktop Browser application.


    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Wednesday, April 9, 2014 2:28 AM