Samsung Galaxy S5; Changing ISO-speed settings with camera API - android

I'm trying to set the ISO for the Samsung Galaxy S5 using the Camera API.
The parameters which includes the ISO tag in the Camera Parameters (retreived using camera.getParameters.flatten();) are:
exif_iso=0;
iso=auto;
iso-values=auto,ISO_HJR,100,200,400,800,1600;
I quess that the exif_iso parameter has something to do with the Meta file, so i don't need that. The iso setting is what i need, and i can choose all the values stated under iso-values. If i set one of these parameters, the parameters are accepted (no exception is getting thrown). If i use a parameters which isn't stated under the values, an exception is thrown. So the value of iso are set!
But... the strange thing is that when you take a picture, the iso setting seems to be ignored. Settings like white balance and resolution work like a charm, but i can't get the iso to change. On another phone (galaxy S2) the iso setting does work.
In the official camera app from samsung, the iso value is editable, so somewhere in the api it should be possible! I have tried some camera apps from the play store (including open camera 1.20) but the same thing; you can change the value but it gets ignored.
Has anyone any idea why the value is ignored? is there maybe another parameter which enables or disables this kind of settings?
Thanks a lot :)
Update:
I'am a little bit further. It seems to be caused by OpenCV which i also use in my app. Specifically the class CameraBridgeViewBase seems to cause the iso setting problem. Even i disable the view before taking the picture, the iso settings are getting ignored. I've build a little camera app without the use of OpenCV and the iso is set just like it should.
If an app with CameraBridgeViewBase been running (even if you clear the memory after that) my camera test app iso settings are ignored again. I also tried the app 'open camera', the iso settings are simply ignored again. If i start the official samsung camera app, it seems like it resets the whole camera; My camera test app and 'open camera' iso setting work again after that.
The weird thing of all is that this problem doesn't occur at all on my Samsung Galaxy S2. It only occurs on the Samsung Galaxy S5...
CameraBridgeViewBase: OpenCV class which is used to capture (video)frames from the camera, show it and implements a 'onFrameListener' function.
Parameters =
phase-af-values
focallength-value-denominator=100
brightness-step=1
zoom=0
redeye-reduction-values=enable,disable
exif_iso=0
max-num-detected-faces-hw=10
scene-detect-values=off,on
qc-camera-features=542
face-detection-values=off,on
dynamic-range-control-values=
whitebalance=auto
max-sharpness=36
focallength-value-numerator=480
preview-format-values=yuv420sp,yuv420p
jpeg-thumbnail-quality=85
preview-format=yuv420sp
face-detection=off
auto-exposure-values=matrix,center,spot
iso=auto
fast-fps-mode=0
mce-values=enable,disable
flash-mode-values=off,auto,on,torch
preview-frame-rate=30
jpeg-thumbnail-width=512
video-size=1920x1080
scene-mode-values=auto,hdr
redeye-reduction=disable
preview-fps-range-values=(10000,30000)
histogram=disable
face-recognition=off
camera-mode=0
preview-size-values=1920x1080,1440x1080,1280x720,1056x864,960x720,800x480,720x480,640x480,352x288,320x240,176x144
maxaperture-value-denominator=100
saturation-step=1
touch-af-aec=touch-off
smart-screen-exposure-values=vision-ae-normal,vision-ac-backlight
preview-fps-range=10000,30000
auto-whitebalance-lock=false
min-exposure-compensation=-4
llv_mode=0
antibanding=auto
max-num-focus-areas=1
face-recognition-values=off,on
vertical-view-angle=38
video-stabilization-supported=false
sce-factor-step=10
maxaperture-value-numerator=228
qc-max-num-requested-faces=10
min-saturation=0
max-saturation=10
contrast-step=1
raw-size=5328x3000
max-brightness=6
supported-live-snapshot-sizes=5312x2988,4128x2322,4000x3000,3264x2448,3264x1836,3200x2400,2592x1944,2048x1536,2048x1152,1920x1080,1600x1200,1440x1080,1280x768,1280x720,1024x768,800x600,800x480,800x450,720x480,640x480,352x288,320x240,176x144
max-contrast=10
min-sce-factor=-100
picture-format-values=jpeg,bayer-qcom-10gbrg,bayer-qcom-10grbg,bayer-qcom-10rggb,bayer-qcom-10bggr,bayer-mipi-10gbrg,bayer-mipi-10grbg,bayer-mipi-10rggb,bayer-mipi-10bggr,yuv422sp
video-hfr=off
supported-shot-modes=normal-shot,panorama-burst
exposure-compensation-step=0.5
scene-detect=off
fnumber-value-numerator=220
picture-size=1920x1080
saturation=5
whitebalance-values=auto,incandescent,fluorescent,daylight,cloudy-daylight
picture-format=jpeg
zsl=off
lensshade-values=enable,disable
selectable-zone-af=auto
video-hfr-values=60,90,150
iso-values=auto,ISO_HJR,100,200,400,800,1600
selectable-zone-af-values=
lensshade=enable
preferred-preview-size-for-video=1920x1080
anti-shake=0
min-sharpness=0
intelligent-mode=0
mce=enable
hfr-size-values=2664x1500,1328x748,824x496
snapshot-picture-flip=off
zoom-supported=true
metering=center
denoise-values=denoise-off,denoise-on
zsl-values=off,on
sharpness=36
phase-af=off
contrast=5
scene-mode=auto
jpeg-quality=96
dynamic-range-control=off
histogram-values=enable,disable
exif_exptime=0
metering-areas=(0,0,0,0,0)
min-contrast=0
video-size-values=1920x1080,1440x1080,1280x720,800x450,800x480,720x480,640x480,352x288,320x240,176x144
skinToneEnhancement=0
rt-hdr=off
preview-size=1920x1080
focal-length=4.80
ae-bracket-hdr-values=Off,AE-Bracket
denoise=denoise-on
video-flip=off
max-sce-factor=100
preview-frame-rate-values=15,24,30
max-num-metering-areas=10
preview-flip=off
focus-mode-values=auto,infinity,macro,continuous-video,continuous-picture
vtmode=0
jpeg-thumbnail-size-values=512x288,480x288,256x154,432x288,512x384,352x288,320x240,176x144,0x0
zoom-ratios=100,104,109,114,119,125,129,134,139,144,150,154,159,164,169,175,179,184,189,194,200,204,209,214,219,225,229,234,239,244,250,254,259,264,269,275,279,284,289,294,300,304,309,314,319,325,329,334,339,344,350,354,359,364,369,375,379,384,389,394,400,404,409,414
dis-values=enable,disable
dual_mode=0
picture-size-values=5312x2988,3984x2988,3264x2448,3264x1836,2560x1920,2048x1152,1920x1080,1280x960,1280x720,800x480,640x480
touch-af-aec-values=touch-off,touch-on
smart-screen-exposure=0
luma-adaptation=3
min-brightness=0
horizontal-view-angle=62
firmware-mode=none
imageuniqueid-value=F16QLHF01GB

Related

Trying to use custom shader code in a class inheriting from QMaterial for Android

I'm trying to work around a bug inside a material class in the Extras for the Qt3D module:
https://bugreports.qt.io/browse/QTBUG-109574. I've trying to accomplish this, running on my Nokia G20 smartphone. I'm using Qt 6.2.4.
I believe the problem is that the wrong QTechnique is being used at runtime. Within the implementation for QPhongMaterial, there contains a few different techniques with graphics API filters for OpenGL and OpenGL/ES, versions 2 and 3, as seen here: https://github.com/qt/qt3d/blob/6.2.4/src/extras/defaults/qdiffusespecularmaterial.cpp.
To try and influence the QTechnique choice, I've tried to override the rendering API, and the surface format to be compatible with my smartphone:
QSurfaceFormat surfaceFormat;
surfaceFormat.setMajorVersion(2);
surfaceFormat.setMinorVersion(0);
surfaceFormat.setProfile(QSurfaceFormat::OpenGLContextProfile::NoProfile);
qputenv("QSG_RHI_BACKEND", "gles2");
I've also tried to make my own class derived from QMaterial, but that's another issue, as I'm getting a black screen in my viewport with that, which I can't fix, because the Android GPU Inspector doesn't support my device.

Issue with float.Parse in Unity Android App

I develop an Android app. If I call
float.Parse("51.552058")
in Editor or App on my Mac Book (Language Setting English), it works fine. After publishing to Android (Language Setting German) the result of the Parse operation is not "51.552058" anymore but "5,155211E+09". I understand that this might be related to the device's language but I still don't really understand what is happening and why.
I also tried following with no success:
float.Parse("51.552058", System.Globalization.NumberStyles.Any)
float.Parse("51.552058", System.Globalization.NumberStyles.AllowDecimalPoint)
Did anyone stumble over this before?
float.Parse is culture dependent.
See e.g. from NumberFormatInfo
// '1,034,562.91' --> 1034562.91 (en-US)
// '1,034,562.91': FormatException (fr-FR)
// '1,034,562.91' --> 1034562.91 (Invariant)
Reason here is that in EU cultures the , is usually the decimal separator while the . is used as the group separator. So from the example above the correct format for fr-FR would be 1.034.562,91
You probably rather want to use CultureInfo.InvariantCulture like
float.Parse("51.552058", CultureInfo.InvariantCulture);
or directly NumberFormatInfo.InvariantInfo
float.Parse("51.552058", NumberFormatInfo.InvariantInfo);
which simply has defined
NumberDecimalSeparator .
NumberGroupSeparator ,

Unable to set target temperature to Nest Thermostat from Android SDK

I am writing an Android application to control a Nest thermostat. I was able to connect to it just fine and I can read the correct target temperature (turning the nob on the thermostat updates my TextView).
However, when I try to write the target temperature like this, nothing happens:
String thermostatID = mThermostat.getDeviceId();
mNest.thermostats.setTargetTemperatureF(thermostatID, 70);
I tried setting the HVAC mode first, in case I needed that, but this didn't work either:
String thermostatID = mThermostat.getDeviceId();
mNest.thermostats.setHVACMode(thermostatID, "cool");
mNest.thermostats.setTargetTemperatureF(thermostatID, 70);
The Textview flashes 70 for a brief second, but then shoots back up to 77 which is the target temperature that was set by the actual thermostat. Is this an issue with the SDK code for setTargetTemperatureF, or am I missing something simple here?
The permissions for the Nest thermostat are set on the Nest website. Visit https://developer.nest.com/products and sign in. You will be given a list of your products, all you need to do is select one and scroll down to permissions.
Note that after you change permissions, your mobile (or various platform) application will need to rerun authentication for this change to take place.
Try to modify your code as following, then you can set the target temperature.
mNest.setTargetTemperatureF(thermostatID, 70L, null);

flash air for android touch event DOESN`T WORK

I was trying to make something in Adobe Flash, Air for android. I simply made a square and converted it to an Symbol (called 'hello') and I entered this code.
Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
hello.addEventListener(TouchEvent.TOUCH_TAP, tap);
function tap(event:TouchEvent):void
{
hello.x+=15;
}
but nothing happend. I even used CODE SNIPPERS, and also tested this on my phone(ALCATEL onetouch idol mini), and it also said that there are no errors.What have I done wrong?
You set everything correctly but forget only one important thing: check if the system supports touchevent.
if(Multitouch.supportsTouchEvent)

Why is Nexus 7 2012 Android 4.2.2 (WIFI Only) not finding Media Route Button by Id?

The FIT Radio App uses a MediaRoute.Callback that is initialized in my CommandInterface class, that controls playback for the normal audio as well as the Chromecast audio. The NowPlayingActivity is initially set as the mMediaRouteButtonHandler inside of the MediaRoute.Callback, only if the MediaRouteButton exists.
The now_playing.xml is now in the default layout, with protective measures in the java source code. Our first measure of protection against null pointer exceptions (with the G2) was removing the the MediaRouteButton from the default layout. The second measure that was taken to stop the null pointer exceptions was to add the null check in the NowPlayingActivity.setVisibility(int visibility) code sample below for any other version that may not provide the Button (N7, etc.).
The MediaRouter callback is added in the NowPlayingActvity.onResume(), and removed in the NowPlayingActvity.onPause(). The following sample displays the visibility handling in the MediaRoute.Callback.onRouteAdded:
public void onRouteAdded(MediaRouter router, RouteInfo route) {
if(hasMediaRouteButtonHandler()) mMediaRouteButtonHandler.setVisibility(View.VISIBLE);
++mRouteCount;
}
I have access to a Google G2, a Note 3, a Samsung S III, HTC One M7, and a Nexus 7. After starting the MediaRoute.Callback, the MediaRoute Button shows on all devices [using NowPlayingActivity.setVisibility(int visibility)], except with the Nexus 7 and the Google G2.
public void setVisibility(int visibility) {
if(getMediaRouteButton() != null) getMediaRouteButton().setVisibility(visibility);
}
I am using the findViewById(int) method in the NowPlayingActvity and it returns null in the latter cases (Nexus 7 & G2), but works on the S III, HTC One, and Note 3.
public MediaRouteButton getMediaRouteButton() {
return (MediaRouteButton) findViewById(R.id.media_route_button);
}
I have looked on StackOverflow for similar questions, and there were no real answers for the issue:
With the first question that I found the user figured it out eventually, and posted that he had no clear solution.
android.support.v7.app.MediaRouteButton does not display
Another question was answered by the poster, and the solution came from using a real device instead of the emulator:
Why my MediaRouteButton not available to find any cast devices?
I have debugged this with all the above devices, with Dirk (My Contractee) over my shoulder! So this is a critical issue guys, and we really need your help!
Thanks in advance,
Christopher Miller, posting on behalf of Dirk # Fit Radio.

Categories

Resources