Skip to content

Commit

Permalink
Added recheck permission button
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhishek Jain authored and Abhishek Jain committed Sep 13, 2022
1 parent ed684a3 commit 079d74a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions App.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@ const PermissionStatus = ({
</DataTable.Row>

{(!READ_SMS_PERMISSION_STATUS || !RECEIVE_SMS_PERMISSION_STATUS) && (
<Button
onPress={requestReadSMSPermission}
mode="contained"
title="Request Permission"
>
<Button onPress={requestReadSMSPermission} mode="contained">
Request Permission
</Button>
)}
Expand All @@ -56,6 +52,7 @@ export default function App() {
const {
appState,
buttonClickHandler,
checkPermissions,
errorCallbackStatus,
hasReceiveSMSPermission,
hasReadSMSPermission,
Expand Down Expand Up @@ -104,6 +101,9 @@ export default function App() {
<DataTable.Cell>{smsError + "" || "null"}</DataTable.Cell>
</DataTable.Row>

<Button onPress={checkPermissions} title="start" mode="contained">
Recheck permission state
</Button>
<Button onPress={buttonClickHandler} title="start" mode="contained">
Start
</Button>
Expand Down
1 change: 1 addition & 0 deletions useApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ const useApp = () => {
return {
appState,
buttonClickHandler,
checkPermissions,
errorCallbackStatus,
hasReceiveSMSPermission,
hasReadSMSPermission,
Expand Down

0 comments on commit 079d74a

Please sign in to comment.