Problem adding "pro mode" for Huawei Camera Kit - camera

I followed the sample code on their developer page, and I'm not sure how to add the pro mode camera feature into my app after initializing the Huawei Camera Kit instance.
private CameraKit mCameraKit;
mCameraKit = CameraKit.getInstance(getApplicationContext());
//If the current mobile phone does not support the kit or the SDK version is incompatible, NULL is returned. Compatibility processing is required.
if (mCameraKit == null) {
return;
}
Based on the Huawei Developer guides section, pro mode should be one of the supported camera modes, but I did not find pro mode in the Camera Kit API reference. Does anyone know how to enable pro mode?

There is no specific mode definition for Pro mode. Pro mode is defined by the open keys. You only need to:
Set mCurrentModeType to PRO_PHOTO_MODE or PRO_VIDEO_MODE.
Use mCurrentModeType to create a Mode object.
Call the setParameter method of the Mode object to enable the corresponding capability.
Use the takePicture, startRecording, and stopRecording methods of the Mode object to take photos and record videos. Refer to details.
After the preview function is enabled, you can configure the capability values of Pro mode, such as the ISO, exposure time, and white balance. Below are some sample code.
// Query the functions supported by the mode.
List<CaptureRequest.Key<?>> parameters = mModeCharacteristics.getSupportedParameters();
// Query the supported ISO range.
List<Integer> values = mModeCharacteristics.getParameterRange(RequestKey.HW_PRO_SENSOR_ISO_VALUE);
// Set the ISO value. The first value is used as an example.
mMode.setParameter(RequestKey.HW_ PRO_SENSOR_ISO_VALUE, values.get(0));

Currently, Pro Mode is supported only on devices with Kirin 990 and Kirin 9000.
The following code is provided for your reference on how to add a mode to your app. Currently, only the rear camera supports Pro Mode.
// Query the camera list of the device.
String[] cameraLists = mCameraKit.getCameraIdList();
// Query the modes supported by the current camera.
int[] modes = mCameraKit.getSupportedModes(cameraLists[0]);
// Create a mode.
mCameraKit.createMode(cameraLists[0], mCurrentModeType, mModeStateCallback, mCameraKitHandler);

Related

How do I detect that the Windows Mobile transitioned to continuum mode?

Is there a way to detect that Windows Mobile 10 transitioned into continuum mode?
The message-box on Windows Phone does not look anything like the one on Desktop and our designers want parity. I want to write our own version, but I only want it to work on Phone - I want the default one on desktop or when the app transitions to continuum on phone.
Any ideas?
I could not find anything on the web nor find any API that allows me to detect it.
I may be wrong but I don't think there is an API for Continuum. The idea of Continuum for Phone is that you're going from a fixed display size to something that is variable. The best way to detect this would be using the Visual State Triggers or checking if the size of the window has changed.
By also checking that the device family, AnalyticsInfo.VersionInfo.DeviceFamily, is Windows.Mobile, you'll know that you're using a phone device which is currently in the Continuum mode.
To detect if app is running in Continuum mode you'll need to check two things: DeviceFamily and UserInteractionMode.
public static bool IsInContinuum()
{
if (DeviceFamily() == DeviceFamilyType.Mobile && UIViewSettings.GetForCurrentView().UserInteractionMode == UserInteractionMode.Mouse)
return true;
else
return false;
}
Quote from this post:
"With Continuum, “touch” will always be returned when your app is on the mobile device, and “mouse” will always be returned when your app is on the connected display."
So you'll need to check if app runs in Continuum in SizeChanged event.
Due to MSDN Documentation Below,
There's no spesific trigger for Windows 10 Mobile continuum feature detection.
Continuum for Universal Apps
In order to find a solution on Mobile Apps, you can benefit from adaptive UI, you can check the app via screen resolution change Window.Current.SizeChanged, then you can combine with Device family AnalyticsInfo.VersionInfo.DeviceFamily to check if device is in Continuum mode.

Liveview on Android/QX1 Sony Camera API 2.01 fails

Using the supplied Android demo from
https://developer.sony.com/downloads/all/sony-camera-remote-api-beta-sdk/
Connected up to the WIFI connection on a Sony QX1. The sample application finds the camera device and is able to connect to it.
The liveview is not displaying correctly. At most, one frame is shown and the code hits an exception in SimpleLiveViewSlicer.java
if (commonHeader[0] != (byte) 0xFF) {
throw new IOException("Unexpected data format. (Start byte)");
}
Shooting a photo does not seem to work. Zooming does work - lens is moving. Camera is working fine when using the PlayMemories app directly, so no hardware issue.
Hoping from advice from Sony on this one - standard hardware and demo application should work.
Can you provide some details of your setup?
What version of Android SDK are you compiling with?
What IDE and OS are you using?
Have you installed the latest firmware? (http://www.sony.co.uk/support/en/product/ILCE-QX1#SoftwareAndDownloads)
Edit:
We tested the sample code using a QX1 lens and the same setup as you and were able to run the sample code just fine.
One thing to check is whether the liveview is ready to transfer images. To confirm whether the camera is ready to transfer liveview images, the client can check “liveviewStatus” status of “getEvent” API (see API specification for details). Perhaps there is some timing issue due to connection speed that is causing the crash.

Google Map Integration in OS X Application

I would like to use use Google Map in my MAC application.
I found the iOS SDK of Google Maps but not for OS X.
I want to show two annotation and a line connecting them on Google Map. Coordinate of both annotation are dynamic as per user selection.
Below is the way I find out that can work:
Call a API and pass the location coordinate for both annotation.
Now Server side a html form is generate using javascript and create a page which is showing the 2 annotation and line connecting them.
In Api Response I will get the URL of that html page.
I will show this page in UIWebView.
I want to know is there any other way I can achieve this.
I want to distribute application outside the mac app store and to distribute outside mac store I need to sign app with Developer ID which does not support the MAPs.
I didn't find anything related to this that's why I created this thread.
Thanks in advance.
I recently ported the Mapbox iOS SDK over to OS X. It has a lot of the features of MapKit, but it’s open source and should also work in a developer-signed application such as yours. To use the Mapbox OS X SDK, download the latest release from the GitHub repository (look for releases beginning with “osx-”) and follow the instructions in README.md. An API reference is included.
I want to show two annotation and a line connecting them on Google Map. Coordinate of both annotation are dynamic as per user selection.
To display the annotations on-screen, you’ll need the MGLPointAnnotation and MGLPolyline classes. You can move the point annotations dynamically by setting their coordinate properties. The polyline, however, is immutable; to change its path, remove the existing polyline and add a new one with the new coordinates.
You will have to make it with WebKit and the Google Maps API.
MapKit is available in OS X 10.9 Mavericks: https://developer.apple.com/library/mac/documentation/MapKit/Reference/MapKit_Framework_Reference/index.html
There are of course many ways of hiding the fact that you're using WebKit but if they violate Apple's or Google's TOS then submission to the App Store won't be possible.
Hope this will be helpful!

RGBDToolKit calibrate correspondence cannot display the live view by my canon digital camera

Hi~ I am trying to calibrate my depth camera with my digital camera.. but I meet some problem using the RGBDKinectCapture...
1、why the calibrate correspondence cannot show the RGB view from my digital camera?? (canon EOS 600D)
I have set it the live view mode..
2、it cannot recognize my kinect(1414) on Win7 By the example application (download from the RGBToolKit.com),
and I cannot run the source on Windows,just say the error 'enable_if' also mean the std::tr1::enable_if...
3、What is the methods of taking live preview for (all) the HD camera in RGBToolKit ??
is it without the SDK of camera??
which methods it based on??
which class? and I want to debug it...
I'm so sorry ... I see now...
1、the RGBDToolkit doesnot display the live preview of the HD camera.... it just load its video....
2、I cannot run the example on windows because it run with the different sdk for kinect ...(the source has give the sdk..)

What happened to FM Radio in Windows Phone 8?

FM Radio was a mandatory HW requirement in Windows Phone 7, but it's not present on any current Windows Phone 8 device.
Why there is no FM radio in Music Hub in WP8? Can we at least use the FMRadio API?
According to MSDN:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj206947(v=vs.105).aspx
Windows Phone 8 does not support the FM radio feature. If you use the
FM radio API in a Windows Phone 8 app, a RadioDisabledException will
occur.
Also from what I heard:
...the FM radio feature was planned to be included but got cut from this
release due to stability vs. time constraints.
(... I don't know if
there are any plans to re-enable this feature in a future update.)
You can use this test to safely determine if FMRadio can be used on current phone:
/// <summary>
/// Flag is radio device is available in this phone.
/// </summary>
public bool IsRadioAvailable
{
get
{
if (!radioInitialized)
{
radioInitialized = true;
try
{
radio = FMRadio.Instance;
isRadioAvailable = true;
}
catch (RadioDisabledException e)
{
isRadioAvailable = false;
}
}
return isRadioAvailable;
}
}
private bool radioInitialized;
private bool isRadioAvailable;
private FMRadio radio;
Update:
According to various sources FM radio will be enabled in upcoming Windows Phone 8 update that should arrive in Summer 2013.
I read that the Lumia 920 has FMRX and just needs to be "utilised". Not sure if they helps in any way
FM Radio returns, on supported hardware, in Windows Phone 8 'GDR2' (8.0.10327.77/78).
It's not clear whether the API support also returns and how it behaves:
Caution:
FM radio is supported only in apps that target Windows Phone OS 7.1.
If you use the FMRadio class in apps that target Windows Phone OS 8.0
or later, a RadioDisabledException indicates that the FM radio feature
is not available. On Windows Phone 8 devices with a build of 8.0.10322
or greater, the run-time exception may not occur if you use the
FMRadio API. However, the FMRadio API is not supported for apps that
target Windows Phone OS 8.0.
http://msdn.microsoft.com/en-us/library/windowsphone/develop/microsoft.devices.radio.fmradio.frequency(v=vs.105).aspx
In other words, there is no Windows Phone Runtime API to control the radio.
I've just tried out an FM Radio app from the store, which does work.