Expo recommends that if using any sensor it should first be checked that it is available to app. In this PR I Implemented logic to the hook that will check if the accelerometer is already available, if not it will request permission via an alert for the end user to enable access to the accelerometer, and if the app is not allowed to request permission or permission has been previously denied, the end user will be directed to the Settings of their device to enable permissions for the accelerometer in this app.
Expo recommends that if using any sensor it should first be checked that it is available to app. In this PR I Implemented logic to the hook that will check if the accelerometer is already available, if not it will request permission via an alert for the end user to enable access to the accelerometer, and if the app is not allowed to request permission or permission has been previously denied, the end user will be directed to the Settings of their device to enable permissions for the accelerometer in this app.