question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AutoFocus and Torch problems

See original GitHub issue

Hi, I just finish playing with scanner version 2.4.1 and 3.0.0-beta5. What are the final conclusions:

  • finally I succesfully run into autofocus working in version 2.4.1.
  • in latest beta version the same setup is not working in Xam.Forms with Prism
  • torch working only in newly created and updated nugets sample xamarin forms project.(maybe it is related to project type?)
  • so I cannot enable torch in my production project. -autofocus not work first time when permission dialog shows. next time it works fine.

I using Samsung Galaxsy S6.

Here is my page xaml: `

<?xml version="1.0" encoding="utf-8" ?>

<zxing:ZXingScannerPage xmlns=“http://xamarin.com/schemas/2014/forms” xmlns:x=“http://schemas.microsoft.com/winfx/2009/xaml” xmlns:d=“http://xamarin.com/schemas/2014/forms/design” xmlns:mc=“http://schemas.openxmlformats.org/markup-compatibility/2006” mc:Ignorable=“d” xmlns:prism=“clr-namespace:Prism.Mvvm;assembly=Prism.Forms” prism:ViewModelLocator.AutowireViewModel=“True” xmlns:zxing=“clr-namespace:ZXing.Net.Mobile.Forms;assembly=ZXing.Net.Mobile.Forms” x:Class=“xxx.Views.MAG.MAGScanPage” Title=“Scanning” DefaultOverlayTopText=“Skanowanie” DefaultOverlayBottomText=“Skanowanie działa automatycznie” DefaultOverlayShowFlashButton=“True”> </zxing:ZXingScannerPage> `

DefaultOverlayTopText=“Skanowanie” - Not working. Is here any documentation how to setup module in xaml ? When I setup scanner in *.cs overlay shows text but autofocus is not working.

Torch also not enables in production app… ` protected override void OnAppearing() { base.OnAppearing();

        ToggleTorch();

        AutoFocus();
    }

`

Permissions added: <uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.FLASHLIGHT" />

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:2
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
onurhazarcommented, Jul 17, 2020

Same problem here, zxing’s torch is not working on iOS 13 (package beta 5). Scanner is already initialized, I put a torch button on the custom overlay view which doesn’t work right now.

1reaction
universaldata-eucommented, Oct 31, 2020

any news on this? just tried the forms samples and on android autofocus isn’t working. as mentioned by RhomGit after rotating the device autofocus works.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resolving Camera Not Focusing: Tips And Tricks
One way to help your camera focus in low light is to use a torch or flashlight to illuminate your subject. This can...
Read more >
your camera is refusing to autofocus or images are blurry
try shining a torch or activating the AF assist beam. the subject is too small. many cameras will have trouble with locking focus...
Read more >
How to Make Autofocus Work in Extremely Low Light
Turn speedlight on (ON position on the switch) Press and hold the “OK” button for a couple of seconds until the Menu comes...
Read more >
Autofocus issues - BlackBerry Classic
Anyone been struggling with their Classic's camera focus? For some reason mine is unable to auto-focus. I'm on the latest 10.3.3.
Read more >
Autofocus is Betraying You? Here's How to Resolve
Here, the problem is not to show the 'torch light' in the shot. You can proceed as follows : light the area you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found