{"action":"created","issue":{"url":"https://api.github.com/repos/ekreutz/react-native-barcode-scanner-google/issues/19","repository_url":"https://api.github.com/repos/ekreutz/react-native-barcode-scanner-google","labels_url":"https://api.github.com/repos/ekreutz/react-native-barcode-scanner-google/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/ekreutz/react-native-barcode-scanner-google/issues/19/comments","events_url":"https://api.github.com/repos/ekreutz/react-native-barcode-scanner-google/issues/19/events","html_url":"https://github.com/ekreutz/react-native-barcode-scanner-google/issues/19","id":306778718,"number":19,"title":"Seems like working but onBarcodeRead is not working","user":{"login":"3lhagvaasuren","id":28505501,"avatar_url":"https://avatars1.githubusercontent.com/u/28505501?v=4","gravatar_id":"","url":"https://api.github.com/users/3lhagvaasuren","html_url":"https://github.com/3lhagvaasuren","followers_url":"https://api.github.com/users/3lhagvaasuren/followers","following_url":"https://api.github.com/users/3lhagvaasuren/following{/other_user}","gists_url":"https://api.github.com/users/3lhagvaasuren/gists{/gist_id}","starred_url":"https://api.github.com/users/3lhagvaasuren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3lhagvaasuren/subscriptions","organizations_url":"https://api.github.com/users/3lhagvaasuren/orgs","repos_url":"https://api.github.com/users/3lhagvaasuren/repos","events_url":"https://api.github.com/users/3lhagvaasuren/events{/privacy}","received_events_url":"https://api.github.com/users/3lhagvaasuren/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-20T09:02:45Z","updated_at":"2018-05-09T04:02:06Z","closed_at":"2018-05-09T04:02:06Z","author_association":"NONE","body":"I've created an app named BarcodeApp exactly same as in the doc and copied every line of codes in the doc. But I've not installed 1.2.0 version (called the latest version in the doc, actually the latest version was 1.4.2). But I've installed 1.4.2 by npm install --save react-native-barcode-scanner-google. And the app launched OK. But seems like onBarcodeRead could not triggered just showing the camera only. Here is my package.json:\r\n```\r\n{\r\n  \"name\": \"BarcodeApp\",\r\n  \"version\": \"0.0.1\",\r\n  \"private\": true,\r\n  \"scripts\": {\r\n    \"start\": \"node node_modules/react-native/local-cli/cli.js start\",\r\n    \"test\": \"jest\"\r\n  },\r\n  \"dependencies\": {\r\n    \"react\": \"16.3.0-alpha.1\",\r\n    \"react-native\": \"0.54.2\",\r\n    \"react-native-barcode-scanner-google\": \"^1.4.2\"\r\n  },\r\n  \"devDependencies\": {\r\n    \"babel-jest\": \"23.0.0-alpha.0\",\r\n    \"babel-preset-react-native\": \"4.0.0\",\r\n    \"jest\": \"22.4.2\",\r\n    \"react-test-renderer\": \"16.3.0-alpha.1\"\r\n  },\r\n  \"jest\": {\r\n    \"preset\": \"react-native\"\r\n  }\r\n}\r\n```\r\nHere is my index.js:\r\n```\r\nimport React, { Component } from 'react';\r\nimport { AppRegistry, StyleSheet, Text, View, Alert } from 'react-native';\r\n\r\nimport BarcodeScanner, { Exception, FocusMode, CameraFillMode, BarcodeType, pauseScanner, resumeScanner } from 'react-native-barcode-scanner-google';\r\n\r\nexport default class BarcodeApp extends Component {\r\n    render() {\r\n        return (\r\n            <View style={{ flex: 1 }}>\r\n                <BarcodeScanner\r\n                    style={{ flex: 1 }}\r\n                    onBarcodeRead={({ data, type }) => {\r\n                        alert('HEY');\r\n                        // handle your scanned barcodes here!\r\n                        // as an example, we show an alert:\r\n                        // Alert.alert(`Barcode '${data}' of type '${type}' was scanned.`);\r\n                        // alert(`Barcode '${data}' of type '${type}' was scanned.`);\r\n                    }}\r\n                    onException={exceptionKey => {\r\n                        // check instructions on Github for a more detailed overview of these exceptions.\r\n                        switch (exceptionKey) {\r\n                            case Exception.NO_PLAY_SERVICES:\r\n                            // tell the user they need to update Google Play Services\r\n                            case Exception.LOW_STORAGE:\r\n                            // tell the user their device doesn't have enough storage to fit the barcode scanning magic\r\n                            case Exception.NOT_OPERATIONAL:\r\n                            // Google's barcode magic is being downloaded, but is not yet operational.\r\n                            default: break;\r\n                        }\r\n                    }}\r\n                    focusMode={FocusMode.TAP /* could also be TAP or FIXED */}\r\n                    cameraFillMode={CameraFillMode.COVER /* could also be FIT */}\r\n                    barcodeType={BarcodeType.ALL /* replace with ALL for all alternatives */}\r\n                />\r\n            </View>\r\n        );\r\n    }\r\n}\r\n\r\nAppRegistry.registerComponent('BarcodeApp', () => BarcodeApp);\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/ekreutz/react-native-barcode-scanner-google/issues/comments/387613443","html_url":"https://github.com/ekreutz/react-native-barcode-scanner-google/issues/19#issuecomment-387613443","issue_url":"https://api.github.com/repos/ekreutz/react-native-barcode-scanner-google/issues/19","id":387613443,"user":{"login":"ekreutz","id":9801173,"avatar_url":"https://avatars0.githubusercontent.com/u/9801173?v=4","gravatar_id":"","url":"https://api.github.com/users/ekreutz","html_url":"https://github.com/ekreutz","followers_url":"https://api.github.com/users/ekreutz/followers","following_url":"https://api.github.com/users/ekreutz/following{/other_user}","gists_url":"https://api.github.com/users/ekreutz/gists{/gist_id}","starred_url":"https://api.github.com/users/ekreutz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekreutz/subscriptions","organizations_url":"https://api.github.com/users/ekreutz/orgs","repos_url":"https://api.github.com/users/ekreutz/repos","events_url":"https://api.github.com/users/ekreutz/events{/privacy}","received_events_url":"https://api.github.com/users/ekreutz/received_events","type":"User","site_admin":false},"created_at":"2018-05-09T04:02:06Z","updated_at":"2018-05-09T04:02:06Z","author_association":"OWNER","body":"The latest version is not 1.4.2. Somebody else forked this repo and is maintaining their own repo on npm."}}
{"actor":{"display_login":"ekreutz"}}