TWSViewPermissionsExample

fun TWSViewPermissionsExample(twsPermissionsViewModel: TWSPermissionsViewModel = hiltViewModel())

Demonstrates how to handle web permissions and file upload/download natively within TWSView.

Include the necessary permissions in AndroidManifest.xml based on your web page's requirements: For opening Camera from your web page:

<uses-permission android:name="android.permission.CAMERA"/>
<uses-feature android:name="android.hardware.camera" android:required="false"/>

For requesting Location permission:

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>

In this example, a snippet with all mentioned functionalities is prepared, where you can test permissions, gallery and file upload/download. Include/exclude permissions from AndroidManifest.xml and see, how behavior changes.

You can see a working example here. Download the Sample app from our web page to explore this functionality interactively.