question

Lettuce-3031 avatar image
0 Votes"
Lettuce-3031 asked Lettuce-3031 commented

UWP LaunchFileAsync launches in background

Hello all,

My app generates PDF files, puts them in the Windows.Storage.ApplicationData.Current.TemporaryFolder and launches the files using Windows.System.Launcher.LaunchFileAsync.

The problem is that my PDF reader (I use Foxit reader) only goes to the foreground when I am debugging the application. If I am running the application normally, the PDF reader doesn't go to the foreground.

Hope someone has a solution to this.

windows-uwp
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I am also facing the same issue, where sometimes the file is opening in Background.
I will appreciate if you could explain your Scenario briefly

0 Votes 0 ·

I am also facing the same issue, where sometimes the file is opening in Background.
I will appreciate if you could explain your Scenario briefly

0 Votes 0 ·

Hello @Amulya-2036

It appears to be working better now with the latest version of Foxit Reader. Not sure what exactly is causing it now.

This is what the issue was (see comments below answer):
It goes to the foreground when I am debugging (running the app from Visual Studio).
It stays in the background when I am running the app without Visual Studio (from start menu). But I want it go to the foreground.

I logged a ticket with foxit and they seemed to improve it somewhat. I replied to the ticket just now, maybe they will fix it better.

0 Votes 0 ·

1 Answer

AryaDing-MSFT avatar image
0 Votes"
AryaDing-MSFT answered AryaDing-MSFT commented

Hi,

Welcome to Microsoft Q&A!

I don’t understand well what “my PDF reader (I use Foxit reader) only goes to the foreground” means.
My understandings is that your pdf reader can’t go to foreground when you run the project, right?

I have tested LaunchFileAsync() method locally, the code works well. When I run the project, it opens the Foxit reader to read the pdf file, and the Foxit reader displays in the foreground successfully. Could you please provide your code snippet to us?



If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

· 8
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello,

It goes to the foreground when I am debugging (running the app from Visual Studio).

It stays in the background when I am running the app without Visual Studio. But I want it go to the foreground.

Were you able to replicate both of those scenarios?

0 Votes 0 ·

@Lettuce-3031 I can’t reproduce your issue. When I run the app from Start menu, the Foxit reader also goes to the foreground.
I will appreciate it if you could provide us your code snnipet.


0 Votes 0 ·

@AryaDing-MSFT Here is a sample app: https://drive.google.com/file/d/18P1iOWk3zhXrCgnxsagv0P00AjbH9e3W/view?usp=sharing

Make sure foxit reader is open but the file you want to open is closed.

Let me know if you can reproduce the issue.

0 Votes 0 ·
Show more comments