{"action":"created","issue":{"url":"https://api.github.com/repos/timmh/react-native-camera/issues/5","labels_url":"https://api.github.com/repos/timmh/react-native-camera/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/timmh/react-native-camera/issues/5/comments","events_url":"https://api.github.com/repos/timmh/react-native-camera/issues/5/events","html_url":"https://github.com/timmh/react-native-camera/issues/5","id":113659658,"number":5,"title":"Example JS code","user":{"login":"joshhornby","id":5455767,"avatar_url":"https://avatars.githubusercontent.com/u/5455767?v=3","gravatar_id":"","url":"https://api.github.com/users/joshhornby","html_url":"https://github.com/joshhornby","followers_url":"https://api.github.com/users/joshhornby/followers","following_url":"https://api.github.com/users/joshhornby/following{/other_user}","gists_url":"https://api.github.com/users/joshhornby/gists{/gist_id}","starred_url":"https://api.github.com/users/joshhornby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshhornby/subscriptions","organizations_url":"https://api.github.com/users/joshhornby/orgs","repos_url":"https://api.github.com/users/joshhornby/repos","events_url":"https://api.github.com/users/joshhornby/events{/privacy}","received_events_url":"https://api.github.com/users/joshhornby/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-10-27T19:12:11Z","updated_at":"2015-10-27T20:08:17Z","closed_at":null,"body":"Do you have an example how we can use this in an `.js` file?\r\n\r\nAfter running the setup outlined in the android folder, I get the following error\r\n\r\n`ReactCameraView has no propType for native prop ReactCameraView.scaleX of native type number`\r\n\r\nWhen trying to `require('react-native-camera')`\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/timmh/react-native-camera/issues/comments/151628014","html_url":"https://github.com/timmh/react-native-camera/issues/5#issuecomment-151628014","issue_url":"https://api.github.com/repos/timmh/react-native-camera/issues/5","id":151628014,"user":{"login":"joshhornby","id":5455767,"avatar_url":"https://avatars.githubusercontent.com/u/5455767?v=3","gravatar_id":"","url":"https://api.github.com/users/joshhornby","html_url":"https://github.com/joshhornby","followers_url":"https://api.github.com/users/joshhornby/followers","following_url":"https://api.github.com/users/joshhornby/following{/other_user}","gists_url":"https://api.github.com/users/joshhornby/gists{/gist_id}","starred_url":"https://api.github.com/users/joshhornby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshhornby/subscriptions","organizations_url":"https://api.github.com/users/joshhornby/orgs","repos_url":"https://api.github.com/users/joshhornby/repos","events_url":"https://api.github.com/users/joshhornby/events{/privacy}","received_events_url":"https://api.github.com/users/joshhornby/received_events","type":"User","site_admin":false},"created_at":"2015-10-27T20:08:17Z","updated_at":"2015-10-27T20:08:17Z","body":"After running the application in the example folder, I got the following error:\r\n\r\n```\r\n                            Process com.reactnativecameraexample created for activity com.reactnativecameraexample/.MainActivi\r\n                            ty\r\n                            PID: 2073   UID:    GIDs: \r\n\r\n                    art  I  Not late-enabling -Xcheck:jni (already on)\r\n         OpenGLRenderer  D  Use EGL_SWAP_BEHAVIOR_PRESERVED: true\r\n                         D  HostConnection::get() New Host Connection established 0xb3eb3e50, tid 2073\r\n                  Atlas  D  Validating map...\r\n                         D  HostConnection::get() New Host Connection established 0xb3eb3f20, tid 2089\r\n         OpenGLRenderer  I  Initialized EGL, version 1.4\r\n                         D  Enabling debug mode 0\r\n          EGL_emulation  W  eglSurfaceAttrib not implemented\r\n         OpenGLRenderer  W  Failed to set EGL_SWAP_BEHAVIOR on surface 0xb3f1dc80, error=EGL_SUCCESS\r\n          Choreographer  I  Skipped 44 frames!  The application may be doing too much work on its main thread.\r\n          unknown:React  W  Unable to dispatch keyboard events in JS as the react instance has not been attached\r\n          EGL_emulation  W  eglSurfaceAttrib not implemented\r\n         OpenGLRenderer  W  Failed to set EGL_SWAP_BEHAVIOR on surface 0xb3f1dca0, error=EGL_SUCCESS\r\n                    art  I  Background partial concurrent mark sweep GC freed 2404(131KB) AllocSpace objects, 0(0B) LOS objects\r\n                            , 51% free, 971KB/1995KB, paused 7.392ms total 163.830ms\r\n                         I  Thread[1,tid=2073,WaitingForJniOnLoad,Thread*=0xb3c25400,peer=0x74cdc000,\"main\"] recursive attempt \r\n                            to load library \"/data/app/com.reactnativecameraexample-2/lib/x86/libreactnativejni.so\"\r\n                         I  Background sticky concurrent mark sweep GC freed 9023(503KB) AllocSpace objects, 0(0B) LOS objects,\r\n                             31% free, 1369KB/1995KB, paused 7.017ms total 18.878ms\r\n          ReactNativeJS  W  'Warning: Native component for \"RCTModalHostView\" does not exist'\r\n                         D  'Running application \"ReactNativeCameraExample\" with appParams: {\"initialProps\":{},\"rootTag\":1}. __\r\n                            DEV__ === true, development-level warning are ON, performance optimizations are OFF'\r\n                         W  'Warning: Failed propType: Invariant Violation: Invalid props.style key `textAlign` supplied to `To\r\n                            uchableHighlight`.\\nBad object: {\\n  \"position\": \"absolute\",\\n  \"height\": 50,\\n  \"left\": 50,\\n  \"bo\r\n                            ttom\": 20,\\n  \"right\": 50,\\n  \"backgroundColor\": \"#FFFFFF\",\\n  \"borderRadius\": 20,\\n  \"textAlign\": \r\n                            \"center\"\\n}\\nValid keys: [\\n  \"width\",\\n  \"height\",\\n  \"top\",\\n  \"left\",\\n  \"right\",\\n  \"bottom\",\\n\r\n                              \"margin\",\\n  \"marginVertical\",\\n  \"marginHorizontal\",\\n  \"marginTop\",\\n  \"marginBottom\",\\n  \"marg\r\n                            inLeft\",\\n  \"marginRight\",\\n  \"padding\",\\n  \"paddingVertical\",\\n  \"paddingHorizontal\",\\n  \"paddingT\r\n                            op\",\\n  \"paddingBottom\",\\n  \"paddingLeft\",\\n  \"paddingRight\",\\n  \"borderWidth\",\\n  \"borderTopWidth\"\r\n                            ,\\n  \"borderRightWidth\",\\n  \"borderBottomWidth\",\\n  \"borderLeftWidth\",\\n  \"position\",\\n  \"flexDirec\r\n                            tion\",\\n  \"flexWrap\",\\n  \"justifyContent\",\\n  \"alignItems\",\\n  \"alignSelf\",\\n  \"flex\",\\n  \"transfor\r\n                            m\",\\n  \"transformMatrix\",\\n  \"backfaceVisibility\",\\n  \"backgroundColor\",\\n  \"borderColor\",\\n  \"bord\r\n                            erTopColor\",\\n  \"borderRightColor\",\\n  \"borderBottomColor\",\\n  \"borderLeftColor\",\\n  \"borderRadius\"\r\n                            ,\\n  \"borderTopLeftRadius\",\\n  \"borderTopRightRadius\",\\n  \"borderBottomLeftRadius\",\\n  \"borderBotto\r\n                            mRightRadius\",\\n  \"borderStyle\",\\n  \"opacity\",\\n  \"overflow\",\\n  \"shadowColor\",\\n  \"shadowOffset\",\\\r\n                            n  \"shadowOpacity\",\\n  \"shadowRadius\"\\n] Check the render method of `ReactNativeCameraExample`.'\r\n                         W  'Warning: Failed propType: Invariant Violation: Invalid props.style key `textAlign` supplied to `Vi\r\n                            ew`.\\nBad object: {\\n  \"backgroundColor\": \"#FFFFFF\",\\n  \"position\": \"absolute\",\\n  \"height\": 50,\\n \r\n                             \"left\": 50,\\n  \"bottom\": 20,\\n  \"right\": 50,\\n  \"borderRadius\": 20,\\n  \"textAlign\": \"center\"\\n}\\nV\r\n                            alid keys: [\\n  \"width\",\\n  \"height\",\\n  \"top\",\\n  \"left\",\\n  \"right\",\\n  \"bottom\",\\n  \"margin\",\\n \r\n                             \"marginVertical\",\\n  \"marginHorizontal\",\\n  \"marginTop\",\\n  \"marginBottom\",\\n  \"marginLeft\",\\n  \"m\r\n                            arginRight\",\\n  \"padding\",\\n  \"paddingVertical\",\\n  \"paddingHorizontal\",\\n  \"paddingTop\",\\n  \"paddi\r\n                            ngBottom\",\\n  \"paddingLeft\",\\n  \"paddingRight\",\\n  \"borderWidth\",\\n  \"borderTopWidth\",\\n  \"borderRi\r\n                            ghtWidth\",\\n  \"borderBottomWidth\",\\n  \"borderLeftWidth\",\\n  \"position\",\\n  \"flexDirection\",\\n  \"fle\r\n                            xWrap\",\\n  \"justifyContent\",\\n  \"alignItems\",\\n  \"alignSelf\",\\n  \"flex\",\\n  \"transform\",\\n  \"transf\r\n                            ormMatrix\",\\n  \"backfaceVisibility\",\\n  \"backgroundColor\",\\n  \"borderColor\",\\n  \"borderTopColor\",\\n\r\n                              \"borderRightColor\",\\n  \"borderBottomColor\",\\n  \"borderLeftColor\",\\n  \"borderRadius\",\\n  \"borderTo\r\n                            pLeftRadius\",\\n  \"borderTopRightRadius\",\\n  \"borderBottomLeftRadius\",\\n  \"borderBottomRightRadius\",\r\n                            \\n  \"borderStyle\",\\n  \"opacity\",\\n  \"overflow\",\\n  \"shadowColor\",\\n  \"shadowOffset\",\\n  \"shadowOpac\r\n                            ity\",\\n  \"shadowRadius\"\\n] Check the render method of `TouchableHighlight`.'\r\n                         W  'Warning: Failed propType: Invariant Violation: Invalid props.style key `textAlign` supplied to `RC\r\n                            TView`.\\nBad object: {\\n  \"backgroundColor\": \"#FFFFFF\",\\n  \"position\": \"absolute\",\\n  \"height\": 50,\r\n                            \\n  \"left\": 50,\\n  \"bottom\": 20,\\n  \"right\": 50,\\n  \"borderRadius\": 20,\\n  \"textAlign\": \"center\"\\n}\r\n                            \\nValid keys: [\\n  \"width\",\\n  \"height\",\\n  \"top\",\\n  \"left\",\\n  \"right\",\\n  \"bottom\",\\n  \"margin\",\r\n                            \\n  \"marginVertical\",\\n  \"marginHorizontal\",\\n  \"marginTop\",\\n  \"marginBottom\",\\n  \"marginLeft\",\\n \r\n                             \"marginRight\",\\n  \"padding\",\\n  \"paddingVertical\",\\n  \"paddingHorizontal\",\\n  \"paddingTop\",\\n  \"pa\r\n                            ddingBottom\",\\n  \"paddingLeft\",\\n  \"paddingRight\",\\n  \"borderWidth\",\\n  \"borderTopWidth\",\\n  \"borde\r\n                            rRightWidth\",\\n  \"borderBottomWidth\",\\n  \"borderLeftWidth\",\\n  \"position\",\\n  \"flexDirection\",\\n  \"\r\n                            flexWrap\",\\n  \"justifyContent\",\\n  \"alignItems\",\\n  \"alignSelf\",\\n  \"flex\",\\n  \"transform\",\\n  \"tra\r\n                            nsformMatrix\",\\n  \"backfaceVisibility\",\\n  \"backgroundColor\",\\n  \"borderColor\",\\n  \"borderTopColor\"\r\n                            ,\\n  \"borderRightColor\",\\n  \"borderBottomColor\",\\n  \"borderLeftColor\",\\n  \"borderRadius\",\\n  \"borde\r\n                            rTopLeftRadius\",\\n  \"borderTopRightRadius\",\\n  \"borderBottomLeftRadius\",\\n  \"borderBottomRightRadiu\r\n                            s\",\\n  \"borderStyle\",\\n  \"opacity\",\\n  \"overflow\",\\n  \"shadowColor\",\\n  \"shadowOffset\",\\n  \"shadowO\r\n                            pacity\",\\n  \"shadowRadius\"\\n] Check the render method of `View`.'\r\n          EGL_emulation  W  eglSurfaceAttrib not implemented\r\n         OpenGLRenderer  W  Failed to set EGL_SWAP_BEHAVIOR on surface 0xb3f1dc80, error=EGL_SUCCESS\r\n         AndroidRuntime  D  Shutting down VM\r\n                         E  FATAL EXCEPTION: main\r\n                         E  Process: com.reactnativecameraexample, PID: 2073\r\n                         E  java.lang.NullPointerException: Attempt to invoke virtual method 'void android.hardware.Camera.setP\r\n                            reviewDisplay(android.view.SurfaceHolder)' on a null object reference\r\n                         E      at com.lwansbrough.ReactCamera.ReactCameraView.surfaceCreated(ReactCameraView.java:38)\r\n                         E      at android.view.SurfaceView.updateWindow(SurfaceView.java:580)\r\n                         E      at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:176)\r\n                         E      at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:944)\r\n                         E      at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1970)\r\n                         E      at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1061)\r\n                         E      at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5885)\r\n                         E      at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)\r\n                         E      at android.view.Choreographer.doCallbacks(Choreographer.java:580)\r\n                         E      at android.view.Choreographer.doFrame(Choreographer.java:550)\r\n                         E      at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)\r\n                         E      at android.os.Handler.handleCallback(Handler.java:739)\r\n                         E      at android.os.Handler.dispatchMessage(Handler.java:95)\r\n                         E      at android.os.Looper.loop(Looper.java:135)\r\n                         E      at android.app.ActivityThread.main(ActivityThread.java:5257)\r\n                         E      at java.lang.reflect.Method.invoke(Native Method)\r\n                         E      at java.lang.reflect.Method.invoke(Method.java:372)\r\n                         E      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)\r\n                         E      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)\r\n```"}}