{"id":19317618,"url":"https://github.com/queeniecplusplus/react_cameraapp","last_synced_at":"2026-05-17T02:06:12.251Z","repository":{"id":38862970,"uuid":"281079735","full_name":"QueenieCplusplus/React_cameraApp","owner":"QueenieCplusplus","description":"askForPermission for using Camera","archived":false,"fork":false,"pushed_at":"2023-01-26T22:05:16.000Z","size":2463,"stargazers_count":0,"open_issues_count":12,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-06T04:23:56.120Z","etag":null,"topics":["expo-camera","react-native","usestate"],"latest_commit_sha":null,"homepage":"https://github.com/QueenieCplusplus/QuickGoThru/blob/master/README.md#react--react-native","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/QueenieCplusplus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-20T09:58:12.000Z","updated_at":"2020-07-20T10:07:15.000Z","dependencies_parsed_at":"2023-02-15T01:46:03.129Z","dependency_job_id":null,"html_url":"https://github.com/QueenieCplusplus/React_cameraApp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QueenieCplusplus%2FReact_cameraApp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QueenieCplusplus%2FReact_cameraApp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QueenieCplusplus%2FReact_cameraApp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QueenieCplusplus%2FReact_cameraApp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/QueenieCplusplus","download_url":"https://codeload.github.com/QueenieCplusplus/React_cameraApp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240420940,"owners_count":19798501,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["expo-camera","react-native","usestate"],"created_at":"2024-11-10T01:15:41.339Z","updated_at":"2026-05-17T02:06:07.187Z","avatar_url":"https://github.com/QueenieCplusplus.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React_cameraApp\n\n# expo install\n\n   $ expo install expo-camera\n   \n# Codebase\n\n\n      import React, { useState, useEffect } from 'react';\n      import { View, TouchableOpacity } from 'react-native';\n      import { Camera } from 'expo-camera';\n\n      export default function App() {\n      \n      \n        const [hasPermission, setHasPermission] = useState(null);\n        const [type, setType] = useState(Camera.Constants.Type.back);\n\n        useEffect(() =\u003e {\n        \n            (async () =\u003e {\n               const { status } = await Camera.requestPermissionsAsync();\n               setHasPermission(status === 'granted');\n             })();\n             \n         }, []\n          \n        );\n\n\n        if (hasPermission === true) {\n          return \u003cView /\u003e;\n        }\n        if (hasPermission === false) {\n          return \u003cText\u003eNo access to camera\u003c/Text\u003e;\n        }\n        \n\n        return (\n          \u003cView style={{ flex: 1 }}\u003e\n          \n            \u003cCamera style={{ flex: 1 }} type={type}\u003e\n            \n              \u003cView\u003e\n                \n                \u003cTouchableOpacity\n                  onPress={() =\u003e {\n                    setType(\n                      type === Camera.Constants.Type.back\n                        ? Camera.Constants.Type.front\n                        : Camera.Constants.Type.back\n                    );\n                  }}/\u003e\n                  \n              \u003c/View\u003e\n              \n            \u003c/Camera\u003e\n            \n          \u003c/View\u003e\n        );\n        \n        \n      }\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqueeniecplusplus%2Freact_cameraapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqueeniecplusplus%2Freact_cameraapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqueeniecplusplus%2Freact_cameraapp/lists"}