I am building a expo react native mobile application for my already existing website. In this mobile application I am using the webview component to render my website. This way with less work I can establish my mobile application too.
Now in my website there are multiple places where user can upload documents from galleries and download certain PDFs. Now I want to ask for users permissions like to read and write from their gallery/file systems. For this how should I move forward?
Currently I have to detect the user clicked on the upload button and based on this click I have to render the prompt for user to ask for permission in the mobile application code and then based on what users have set the permission to allow them to upload documents or show them the prompt to give the permissions to upload documents.
How to know if the users have given the permissions by going over the settings for the mobile application?
A little confused with how to go forward with the implementation, can anyone help me get started with how to handle permissions for such a case?
I tried adding a listener in the website code to detect a mobile application request and check for user permissions but it was not working.
Also looked into the injected javascript, postMessage but could not make it work.
I want to handle permissions as most of the important features require users uploading the documents and recording audios
Aashish Singh Bisht is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.