No Basic Camera UI for Windows Phone 8.1 - windows-phone-8.1

OK. Questions.
I know there is no CameraCaptureUI in Windows phone 8.1, so I have to use MediaCapture class. That's fine but what about UI? Do I have to make and position button in my screen from scratch?(like flash button, front camera button etc)
About Nokia Imaging SDK. does it provide any UI? and can I use that API for taking picture instead of working directly with MediaCapture?. I tried to find out some information about initializing and taking picture using nokia imaging sdk, but I couldn't find.
Can you let me know any useful link for implementing MediaCapture in windows phone 8.1? There are lots of links but only for silverlight 8.0 not 8.1.

You can use FileOpenPicker and if you specify .png and .jpg in the list of file types, the picker will have a camera capture button that will open standard camera capture UI:
FileOpenPicker picker = new FileOpenPicker();
picker.FileTypeFilter.Add(".png");
picker.FileTypeFilter.Add(".jpg");
picker.ContinuationData["Data"] = "Something"; // Will be passed back to the app after the picker finishes
picker.PickSingleFileAndContinue();
If you still want to write your own UI, check this link: http://www.romasz.net/how-to-take-a-photo-in-windows-runtime/

Related

PWA html5 open device camera as soon as page is launched

i have a pwa where i am showing a standard input tag like below. this let user tap on it and get access to device camera. However, i want to open the camera as sooon as you open the webpage. is it possible?
current code:
<input type="file" accept="image/x-png,image/jpeg,image/gif" capture="camera"/>
Like Mathias said access to the camera is gated behind user permission.
Instead of an input tag like you are using you should really use the Media Capture API.
You have to get the user's permission to access the camera first. Once you have that permission you can connect to the camera and capture photos and video.
Note: Apple has disabled access to camera from homescreen web apps. No idea when they will turn this on. You can access the camera from regular Safari on iOS, just not from a homescreen web app even though it is the same engine.

How do I show a page modally in a universal Windows Runtime 8.1 app?

I'm making a universal Windows Runtime 8.1 version of our app, originally an iOS app. I'm trying to find out how to display a page modally in the app.
In iOS, I'd use presentViewController:animated:completion: and dismissViewControllerAnimated:completion:, but I can't find an equivalent in WinRT. I've seen the task mapping which only mentions navigation frames (they're the equivalent of using pushViewController:, which isn't what I want) and I've seen this question which talks about a ContentDialog class, but that's only available for phone apps, not universal ones.
How do I show a page modally in a universal app?

Is it possible to use Camera in Background or Hidden Mode in Windows Phone 8?

There are many ways we can access Camera in Windows Phone 8 / 8.1. Most of them launch specific UI for that.
Is there any way we can access camera without displaying anything related to camera in Windows Phone 8/8.1 ?
I want my camera to capture an image when my application opens.

How to adjust ZXing on windows phone store app 8.1 camera (MediaCapture) preview size (full screen)?

My project here:(https://github.com/79144876/ZXingStoreApp)
I have add zxing on my windows phone 8.1 project.The Zxing library here:(https://zxingnet.codeplex.com/SourceControl/latest#trunk/Clients/WindowsRTDemo/MainPage.xaml.cs)
But the preview size does not full screen.So,Anybody who knows how to change the preview size ?
And i have SetResolution,but still not full screen.
Thanks.
In my code I do this
_capture.SetPreviewRotation(VideoRotation.Clockwise90Degrees);
_capture.SetPreviewMirroring(true);
CaptureView.Source = _capture;
CaptureView.Stretch = Stretch.UniformToFill;
In your case replace CaptureView to VideoCapture
But for now zxing for universal apps work terrible. MediaCapture not good choice to get data from camera :(

Open url in system browser windows phon

I am making an html5 app for windows phone 8 and I have a link that is generated by JavaScript and passed into a frame. I would like to put an open in browser button on the application bar. With ios you can do this by adding the _system to the link is there an equivalent in WP? Is there any way to open the browser without using the launcher or is there a way to get the JavaScript variable into the launcher?
You can use Launchers to open and system application
Below is the sample code for the same:
WebBrowserTask webBrowserTask = new WebBrowserTask();
webBrowserTask.Uri = new Uri("http://msdn.microsoft.com", UriKind.Absolute);
webBrowserTask.Show();
MSDN Reference:
How to use the web browser task for Windows Phone