How to launch camera app from my windows 10 app programmatically?

Waqas Ahmed Khan

I am developing a windows 10 app. Please tell me a way to open Camera app from my windows store app. I know we can use LaunchUriAsync function to open different app which has a registered Uri in registry. But the problem is I don't know what is the registered URI for Microsoft windows default camera app. If anyone knows the camera URI please share with me. Or please tell me a way to open windows store app which has no registered URI.

Andrew Pilley

Opening the camera app can fail for various reasons, and the camera app itself may just throw out an error message if the user's PC doesn't have a camera available (ie, no webcam, etc), so I'd strongly recommend NOT doing this. That said...

On Windows 10, at least, the default camera app installs with a protocol URI of microsoft.windows.camera:. (You can find installed protocols under Control Panel\Programs\Default Programs\Set Associations) Edit: Note, turns out that this protocol isn't registered on windows 8.1, so keep that in mind too!

You can use the LaunchUriAsync API to call that URI, and that should open the Camera app:

await Launcher.LaunchUriAsync(new Uri("microsoft.windows.camera:"));

As I said before though, this could fail for a bunch of reasons, so I wouldn't recommend this. I'd recommend using the Camera API and building your own camera controls if you need that functionality, since you can probably test if the user even has a camera to open, with a bit of luck. See the Camera Sample we maintain on GitHub if you want an example of that.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Launch any app from Windows 10 Terminal

From Dev

Launch the default microsoft windows weather app from my UWP App

From Dev

How can I programmatically launch a PDF file from a URI in a Windows Store App on 8.1?

From Dev

How to relaunch a Windows 10 IoT app programmatically

From Dev

How to programmatically launch a chromecast app from command line

From Dev

iOS how to programmatically launch WIFI page from Settings App?

From Dev

How to launch another app from my Ubuntu Touch app?

From Dev

How to launch netflix app with specific movie in windows 10 externally?

From Dev

How to launch Windows 10 Mail app in specific folder?

From Dev

Windows Store App : How to launch an other app?

From Dev

How to launch Telegram app from my own android application?

From Dev

detect first app launch in windows 10

From Dev

How to exit or close an UWP app programmatically? (Windows 10)

From Dev

Launch my Google Action from the Android App

From Dev

Changing Theme in Windows 10 UWP App Programmatically

From Dev

Windows 10 Camera app error - missing camera roll?

From Dev

Change the camera that the Windows 10 camera app uses.

From Dev

How to launch my app via NFC tag?

From Dev

How to launch my app on connecting to USB?

From Dev

Windows 10: What is the Microsoft "App Connector" and why would it want/need access to my camera?

From Dev

Launch Mail app (iOS) from my own app

From Dev

Is there a Windows 10 App to launch a particular keyboard combo when icon is clicked from taskbar?

From Dev

Launch One metro app from other Metro app Windows 8

From Dev

Launching external Camera app from my WP8 app

From Dev

How can I detect if my app is running on Windows 10

From Dev

How can I detect if my app is running on Windows 10

From Dev

Launch app from app in Xamarin

From Dev

How can I launch the Alarms App through a Universal Windows App

From Dev

How to launch the Settings app in a Windows Store app running on a desktop/notebook

Related Related

  1. 1

    Launch any app from Windows 10 Terminal

  2. 2

    Launch the default microsoft windows weather app from my UWP App

  3. 3

    How can I programmatically launch a PDF file from a URI in a Windows Store App on 8.1?

  4. 4

    How to relaunch a Windows 10 IoT app programmatically

  5. 5

    How to programmatically launch a chromecast app from command line

  6. 6

    iOS how to programmatically launch WIFI page from Settings App?

  7. 7

    How to launch another app from my Ubuntu Touch app?

  8. 8

    How to launch netflix app with specific movie in windows 10 externally?

  9. 9

    How to launch Windows 10 Mail app in specific folder?

  10. 10

    Windows Store App : How to launch an other app?

  11. 11

    How to launch Telegram app from my own android application?

  12. 12

    detect first app launch in windows 10

  13. 13

    How to exit or close an UWP app programmatically? (Windows 10)

  14. 14

    Launch my Google Action from the Android App

  15. 15

    Changing Theme in Windows 10 UWP App Programmatically

  16. 16

    Windows 10 Camera app error - missing camera roll?

  17. 17

    Change the camera that the Windows 10 camera app uses.

  18. 18

    How to launch my app via NFC tag?

  19. 19

    How to launch my app on connecting to USB?

  20. 20

    Windows 10: What is the Microsoft "App Connector" and why would it want/need access to my camera?

  21. 21

    Launch Mail app (iOS) from my own app

  22. 22

    Is there a Windows 10 App to launch a particular keyboard combo when icon is clicked from taskbar?

  23. 23

    Launch One metro app from other Metro app Windows 8

  24. 24

    Launching external Camera app from my WP8 app

  25. 25

    How can I detect if my app is running on Windows 10

  26. 26

    How can I detect if my app is running on Windows 10

  27. 27

    Launch app from app in Xamarin

  28. 28

    How can I launch the Alarms App through a Universal Windows App

  29. 29

    How to launch the Settings app in a Windows Store app running on a desktop/notebook

HotTag

Archive