Camera stays blank on Oxygen4 (Android Nougat) with an OnePlus 3 - java

I've the problem that some users with an Oneplus3 and the most recent Oxygen 4 version (Android Nougat) don't see any camera preview image anymore (it stays blank/black). The UI elements are still visible.
They also said in previous versions of oxygen OS the app was working correctly. I found out, that other apps got the same behaviour and fixed it, recently (i.e. Google's Cardboard Camera). But I don't know how to fix it and don't have a test device like the OP3.
I'm using the min SDK version 14 and the Camera API v1 with a SurfaceView to show the camera preview. On my phone (LG G4 with Marshmallow) the app works as expected.
Is somebody of you familiar with that issue and know how to fix it? What else can I try to solve that problem? Can you reproduce that issue on others phones with Android N, too?
You can find the source here: https://github.com/kloener/visor-android
For testing you can directly download it from Google Play (https://play.google.com/store/apps/details?id=de.visorapp.visor) or on github-releases (https://github.com/kloener/visor-android/releases)
kind regards and thanks

They need to give camera permission from application settings. I know they accept it while setting up app. But for Nougat user need to give an extra permission.

Related

I have developed a Flash Light app. but it does not turn on on high Android version

I have developed a Flash Light app. but it does not turn on on high Android version. This app works perfectly on E5 Android 4.4.4 but dont turn on J7 Android 5.1.1 "Lollipop"
There can be many issues like till api 19 or 4.4.4 you dont need to ask for permissions or you did not have to worry too much about the device's battery but from the above that version google has fixed some criteria for some functionalities and you need to explicitly ask those permission to user in order to get them working.
So, If you havent already solved it put some code or give some error or log so i can help you more with it.

Problems with turning off the autofocus on Android phone

Working on my Samsung S6 camera calibration as a first step for further app development.
One of the perquisites for correctly working app is that the autofocus is disabled.
I used something like this:
mCamera.cancelAutoFocus();
Camera.Parameters mParam = mCamera.getParameters();
mParam.setFocusMode(Camera.Parameters.FOCUS_MODE_INFINITY);
mCamera.setParameters(mParam);
Previously, I checked that the "infinity" focus mode is available on my device.
Still, when running the app, I can clearly see that the focus is changing depending on the distance of the object in frame. "Fixed" mode is not available.
Am I doing something wrong?
I just want to have focus that will not change while running app.
I'm using OpenCV3.1 with Android Studio.
Olivier's answer helped me alot.
Did it as it is described.
Had to edit layout a bit.
Put the setInfinityFocusMode under the onCameraViewStarted.
Thanks Olivier ! ;)

Webview showing issue Android

So I have a Webview in my activity and it runs fine on one tablet but when I install the app on another tablet it just show a blank screen.
One possible problem that I could think of is the differences in android version.. the one that works the version is 5.0.2 and the one that doesn't work version is 6.0.1.. But there could be other problems too, I don't have any clues.
Does anybody know of this problem? Please help!!
Picture of the problem

Opening default google maps crashing program in all API's except 8

I am not sure what I am doing wrong. The following code I use in an on click listener for a button and it works great in API8, now that I am checking compatibility its crashing everywhere else. What am I doing wrong?
startActivity(getPackageManager().getLaunchIntentForPackage("com.google.android.apps.maps"));
I figured out the issue. The emulator used with the AVD manager must be the google API version not the android version. The latter does not have the maps app installed.

How to use Computer Camera in Android Emulator

I want to use my laptop camera in the Android Emulator, but the app crashes when I try to do so. Moreover, the emulator itself can't use the camera. Is there any software or SDK version that supports webcams. Currently I am using the Android Froyo 2.2 SDK.
Thanks!
I haven't tried that yet, although it sounds rather useful. You might wann check this
How to use web camera in android emulator to capture a live image?
and
Using Camera in the Android emulator
One answer says, this is only supported in the emulator starting with android ICS (4.0), but no further information is provided, so you might want to invest a little more research on this version.

Categories

Resources