Autofocus in Samsung S8+ - java

A wrote an application using a camera (Camera2) some time ago. And it worked with Samsung S5 (Android 6). But with S8+ (Android 8) camera doesn't focus anymore. It's going from CONTROL_AF_STATE_INACTIVE to CONTROL_AF_STATE_ACTIVE_SCAN to CONTROL_AF_STATE_FOCUSED_LOCKED (and then cycles through last two states) but the camera doesn't focus.
But when for the first time I postpone autofocus start (for example for 1 - 2 seconds after opening camera device) camera focuses - but only this time. And then it backs to cycling through these states without focusing.
The only thing that helps is reopening camera device but it's unacceptable because of delay.
I was trying to use CONTROL_AF_MODE_CONTINUOUS_PICTURE instead of CONTROL_AF_MODE_MACRO and this works for S8 but doesn't work for S5 :/
Does anybody have an issue like this? I'll try to prepare SSCE but maybe somebody knows what to do?

this is a know glitch ...the Samsung forums have a possible solution:
https://us.community.samsung.com/t5/Galaxy-S8-Questions-and-Answers/Camera-Not-Focusing-and-Blurry-Photos/td-p/103058 - which appears to be a manufacturing / mechanical issue.
tapping the back might loosen the stuck lens (eg. while it switches the modes back and forth). I'd still check for the occasion, that it may still behave alike that when running on some other S8+ device. it's not exactly what one would expect from a brand-new smartphone, but there seems to be too little precision at the lens clearance. maybe try to RMA that device?

Related

Get the number of "tap" on a locked smartwatch screen

I'm doing a school project as a team, but none of us have never developed or even worn smartwatches.
We want to get the number of "tap" on a smartwatch's locked screen but we don't find out if that's possible.
Do you know a way to get the number of "tap" on a locked smartwatch screen?
If this is not possible, can we display a constant notification and retrieve the number of "tap" on this notification?
I'm using a Moto 360 with Android 6.0.1 and Android Wear 1.4.0.
Thank you in advance.
I would advise everyone on the team get a chance to the use watch just to understand the user experience. Watches are very battery limited devices and will always try to go into low power mode as often as possible.
Do you know a way to get the number of "tap" on a locked smartwatch screen?
Tapping normally wakes up watch, either from full screen off or lower power ambient mode. If you want to capture taps/button press you can create a watch app which when active will receive taps/button presses. I'm not quite sure if watch face can capture taps, and if it did it my guess would be after the watch face is fully on, but that would be another place to look.
If this is not possible, can we display a constant notification and retrieve the number of "tap" on this notification?
Custom watch face can allow display of custom content. Alternatively as a watch app you can show what you want.
Additional Comments
The Moto 360 came out in 2014 and was one of first Android Wear watches available. The latest code samples & codelabs from Google are for Wear OS 2.0. You can look back in the commit history for old versions of samples which may be more compatible with Android Wear 1.4
Also from this Android Wear Notice May 2015 always on apps became possible so that might work for your project/use case.

How to programmatically clear the Camera cache in Android?

I have an issue with Samsung Galaxy tablets. When my application triggers the camera flash, the image gets dark. I never noticed this issue since I was doing testing with other brands. But, recently, I just stared testing with Samsung Galaxy and I found out that issue.
After several days doing research I found that one way to temporally solve it could be clearing the camera cache. Effectively, that works if you do it through the device camera setting, but I need to do it now by code, since I would like to trigger that event before the user uses the camera flash.
How can I accomplish that programmatically ?

GPS Tracking - MIN_TIME_BW_UPDATES "hint" issue in android 2.3 (Gingerbread)

I have a problem in my GPS Tracking app.
I'm sending a sms message to users predefined contact every MIN_TIME_BW_UPDATES with his location.
It works really well, but when I tried it on Samsung Galaxy running on Android 2.3.5 platform it started updating every meter, (MIN_DISTANCE_CHANGE_FOR_UPDATES was 1 meter) when the user was walking (about 200 messages :)), I't works really well on ICS and JB, I couldn't find any documentation on these "hints".
As far as I understand MIN_DISTANCE_CHANGE_FOR_UPDATES = 1 by default means that I wish to update every MIN_TIME_BW_UPDATES even if the user hasn't moved. And as I said it worked exactly in this logic on other platforms.
I can include some of my code but for now don't see any point in that, I tested it for a while and it works just fine, but a few days ago I installed it on Gingerbread and it's acting really weird.
Some know anything about that issue? Or maybe a way to solving it?

Issues on Android Screen Sizes

I am still trying to figure out a solution for this. Ive created a multiple layout on my res folder namely: layout, layout-sw480dp, layout-sw600dp, layout-sw720dp. Now testing it to real device which is (Samsung galaxy (7 inches) and Alcatel T10(7 inches)) they both go to layout-sw600dp but samsung seems much bigger than alcatel. Most of 7 inches tablet works fine except Samsung. Ive read this link Screen sizes and found out that
The original Samsung Galaxy Tab is an interesting case. Physically it is a 1024x600 7” screen and thus classified as “large”. However the device configures its screen as hdpi, which means after applying the appropriate ⅔ scaling factor the actual space on the screen is 682dp x 400dp. This actually moves it out of the “large” bucket and into a “normal” screen size. The Tab actually reports that it is “large”; this was a mistake in the framework’s computation of the size for that device that we made. Today no devices should ship like this.
My Samsung galaxy is 3.2 so I am sure that it fits on my requirements.
Does someone know how to handle this kind of problem?Like can I create a new folder for Samsung Galaxy only?
Sorry for my english, it is not my native language.
I struggled with the above issue for sometime and found that thr was no alternative for this in xml.
You must handle this during run-time, if you only want it for this specific model then u can get the model make during runtime here and then handle the scenario.
I dont see anyway u can have a special folder for samsung, if you find out,please do let me know :)

libGDX Causing Multitouch Problems

I am working on a game with a virtual joystick in the bottom right corner of the screen and a "move" button in the bottom left. So you use the joystick to point the character in the right direction and press the "move" button to go forward in that direction. This was all working great until today and now when I press on the screen to go forward my joystick is being affected. I know it is not a coding problem because I haven't opened the file that handles touches for 8 days and it has been working fine. Also after I close my app and then use another app that is completely separate from libGDX the multitouch is having the same issue. So do you guys think this is a problem with libGDX, my device, or am I just not coding the multitouch correctly for libGDX? I am using a Stage and the controls are Actors on the Stage I should note that after I restart my phone, the other app that is not using libGDX works correctly. It is only after I open my libGDX based game. So frustrated with this that I am about to give up on libGDX. I am happy to post any code that is requested.
EDIT: Please see comments below. This seems to be a specific issue with the Galaxy Nexus and probably some other Samsung devices as well. This libGDX based app has had no issues on other devices such as original droid, and ASUS Transformer tablet.
Turns out this is not a libGDX problem at all... Nor was it a problem with any of my code. There seems to be a bug in the way the Galaxy Nexus handles multitouch. You can view the bug report at this link. Seems that as of 4.0.4 there still is no fix for this bug. I am still currently running a VZW Galaxy Nexus with 4.0.2, I guess all we can do is wait and put a disclaimer in our games until (if ever) it is fixed.
By locking and unlocking the device, the problem does go away (sometimes), but will quickly come back if I go to my homescreen and re-open the app.

Categories

Resources