Click here to Skip to main content
15,881,173 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Im having trouble with a customer request. We are developing an app for a mobile service provider, the app is showing the devices characteristics and prices on different packgages (devices that are on display in different stores). The request was to show the application (browser page with phone characteristics) when user puts the phone in a docking position. I can tell when the device is in docking position using accelerometer and a background task, I also fire a toast message when device docks. I found some answers saying it cant be done, but still Im a bit sceptical, that nothing can be done to redisplay the app if its not visible (set in AppSettings as a bool flag).

So my question is, can I activate/resume/redisplay the application if it is not in foreground mode from the background task?



Thank you for your answers.
B

What I have tried:

C#
I tried using Launcher.LaunchUriAsync(new Uri("ms-app://Page.xaml", UriKind.Absolute)); but it does not navigate to page.
Posted
Updated 19-Sep-17 14:48pm

1 solution

The best thing you can do is send a toast notification telling the user to tap it so they can get back to the app because it's currently not possible to directly launch an app using a background task.
 
Share this answer
 
Comments
Graeme_Grant 19-Sep-17 21:39pm    
Please be careful answering old questions, it can be seen as rep farming. Try and stay with current ones.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900