{"action":"created","issue":{"url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/issues/741","repository_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile","labels_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/issues/741/labels{/name}","comments_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/issues/741/comments","events_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/issues/741/events","html_url":"https://github.com/Redth/ZXing.Net.Mobile/issues/741","id":330031312,"node_id":"MDU6SXNzdWUzMzAwMzEzMTI=","number":741,"title":"Android - first scan never works, works only after permissions are given.","user":{"login":"Nixon-Joseph","id":10250222,"node_id":"MDQ6VXNlcjEwMjUwMjIy","avatar_url":"https://avatars3.githubusercontent.com/u/10250222?v=4","gravatar_id":"","url":"https://api.github.com/users/Nixon-Joseph","html_url":"https://github.com/Nixon-Joseph","followers_url":"https://api.github.com/users/Nixon-Joseph/followers","following_url":"https://api.github.com/users/Nixon-Joseph/following{/other_user}","gists_url":"https://api.github.com/users/Nixon-Joseph/gists{/gist_id}","starred_url":"https://api.github.com/users/Nixon-Joseph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nixon-Joseph/subscriptions","organizations_url":"https://api.github.com/users/Nixon-Joseph/orgs","repos_url":"https://api.github.com/users/Nixon-Joseph/repos","events_url":"https://api.github.com/users/Nixon-Joseph/events{/privacy}","received_events_url":"https://api.github.com/users/Nixon-Joseph/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-06-06T21:01:42Z","updated_at":"2018-07-20T15:37:45Z","closed_at":null,"author_association":"NONE","body":"I'm running into this exact same issue as [this](https://github.com/Redth/ZXing.Net.Mobile/issues/297) on 2.4.1.\r\n\r\nHere's my scanning page\r\n```\r\npublic class BarcodeScanningPage : ContentPage\r\n    {\r\n        ZXingScannerView ZXingView { get; set; }\r\n        ZXingDefaultOverlay Overlay { get; set; }\r\n\r\n        public BarcodeScanningPage() : base()\r\n        {\r\n            Title = \"Scanning...\";\r\n\r\n            ZXingView = new ZXingScannerView\r\n            {\r\n                HorizontalOptions = LayoutOptions.FillAndExpand,\r\n                VerticalOptions = LayoutOptions.FillAndExpand,\r\n                AutomationId = \"zxingScannerView\",\r\n                Options = new ZXing.Mobile.MobileBarcodeScanningOptions()\r\n                {\r\n                    PossibleFormats = new List<ZXing.BarcodeFormat>() {\r\n                        ZXing.BarcodeFormat.CODE_39, ZXing.BarcodeFormat.QR_CODE\r\n                    }\r\n                }\r\n            };\r\n            ZXingView.OnScanResult += (result) => Device.BeginInvokeOnMainThread(async () =>\r\n            {\r\n                // Stop analysis until we navigate away so we don't keep reading barcodes\r\n                ZXingView.IsAnalyzing = false;\r\n\r\n                await NavigationHelper.PushAsync(new SearchResultsPage(new ApiModels.SearchItemsParams()\r\n                {\r\n                    Keyword = result.Text,\r\n                    ResultsPerPage = App.AppConfig.SearchResultsPerPage\r\n                }, result.Text, true));\r\n\r\n                //await NavigationHelper.PopAsync();\r\n            });\r\n\r\n            Overlay = new ZXingDefaultOverlay()\r\n            {\r\n                BottomText = \"Scan Barcodes or QR Codes\",\r\n                ShowFlashButton = ZXingView.HasTorch,\r\n                AutomationId = \"zxingDefaultOverlay\",\r\n            };\r\n            Overlay.FlashButtonClicked += (sender, e) =>\r\n            {\r\n                ZXingView.IsTorchOn = !ZXingView.IsTorchOn;\r\n            };\r\n            var grid = new Grid()\r\n            {\r\n                VerticalOptions = LayoutOptions.FillAndExpand,\r\n                HorizontalOptions = LayoutOptions.FillAndExpand,\r\n            };\r\n            grid.Children.Add(ZXingView);\r\n            grid.Children.Add(Overlay);\r\n\r\n            // The root page of your application\r\n            Content = grid;\r\n        }\r\n\r\n        protected override void OnAppearing()\r\n        {\r\n            base.OnAppearing();\r\n\r\n            ZXingView.IsScanning = true;\r\n        }\r\n\r\n        protected override void OnDisappearing()\r\n        {\r\n            ZXingView.IsScanning = false;\r\n\r\n            base.OnDisappearing();\r\n        }\r\n}\r\n```\r\nAny ideas how I might get around this? Thanks! Great plugin."},"comment":{"url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/issues/comments/406638487","html_url":"https://github.com/Redth/ZXing.Net.Mobile/issues/741#issuecomment-406638487","issue_url":"https://api.github.com/repos/Redth/ZXing.Net.Mobile/issues/741","id":406638487,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNjYzODQ4Nw==","user":{"login":"Axemasta","id":33064621,"node_id":"MDQ6VXNlcjMzMDY0NjIx","avatar_url":"https://avatars0.githubusercontent.com/u/33064621?v=4","gravatar_id":"","url":"https://api.github.com/users/Axemasta","html_url":"https://github.com/Axemasta","followers_url":"https://api.github.com/users/Axemasta/followers","following_url":"https://api.github.com/users/Axemasta/following{/other_user}","gists_url":"https://api.github.com/users/Axemasta/gists{/gist_id}","starred_url":"https://api.github.com/users/Axemasta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Axemasta/subscriptions","organizations_url":"https://api.github.com/users/Axemasta/orgs","repos_url":"https://api.github.com/users/Axemasta/repos","events_url":"https://api.github.com/users/Axemasta/events{/privacy}","received_events_url":"https://api.github.com/users/Axemasta/received_events","type":"User","site_admin":false},"created_at":"2018-07-20T15:37:45Z","updated_at":"2018-07-20T15:37:45Z","author_association":"NONE","body":"Hi guys, this isn't a fix but instead a work around.\r\n\r\nIf you use [James Montemagno's permission library](https://github.com/jamesmontemagno/PermissionsPlugin) to check for permissions before you present your scanner, the android device will scan on first time load."}}
{"actor":{"display_login":"Axemasta"}}