KevinnZou / compose-webview-multiplatform

WebView for JetBrains Compose Multiplatform
https://kevinnzou.github.io/compose-webview-multiplatform/
Apache License 2.0
318 stars 40 forks source link

Media Permission Support #4

Closed savan-ixfi closed 8 months ago

savan-ixfi commented 8 months ago

Please add media selection support using permission

KevinnZou commented 8 months ago

Hi, thanks for your suggestion. However, could you please provide a more detailed explanation of your requirements?

savan-ixfi commented 8 months ago

Hi, thanks for your suggestion. However, could you please provide a more detailed explanation of your requirements?

for example image uploading from device

savan-ixfi commented 8 months ago

Hi, thanks for your suggestion. However, could you please provide a more detailed explanation of your requirements?

for example image uploading from device

And also capture image using camera and upload

KevinnZou commented 8 months ago
image

for this type of requirements from webview

Could you please share the URL of the aforementioned page for testing purposes? Additionally, have you exclusively tested it on the Android platform? In my experience, when a web page requires access to user media within a mobile application, it typically requires the use of a JSBridge to delegate the request to the native application, rather than handling it solely with JavaScript code.

KevinnZou commented 8 months ago

Hello, I have conducted a test on the provided URL. While it functions properly on the desktop platform, it encounters failures on both Android and iOS platforms. This outcome is to be expected as the web page within the mobile application lacks the necessary permissions to access mobile media and file information.

Consequently, for tasks involving files or media, it is advisable to implement them natively rather than relying solely on web solutions. Although it is technically feasible to achieve these tasks through web development, the complexity increases significantly. As previously mentioned, it is essential to establish a JSBridge to delegate requests to the native application.

Alternatively, a more straightforward approach would involve utilizing a third-party Kotlin Multiplatform library that streamlines the entire process. Please let me know if you have any further questions.

savan-ixfi commented 8 months ago

Hello, I have conducted a test on the provided URL. While it functions properly on the desktop platform, it encounters failures on both Android and iOS platforms. This outcome is to be expected as the web page within the mobile application lacks the necessary permissions to access mobile media and file information.

Consequently, for tasks involving files or media, it is advisable to implement them natively rather than relying solely on web solutions. Although it is technically feasible to achieve these tasks through web development, the complexity increases significantly. As previously mentioned, it is essential to establish a JSBridge to delegate requests to the native application.

Alternatively, a more straightforward approach would involve utilizing a third-party Kotlin Multiplatform library that streamlines the entire process. Please let me know if you have any further questions.

if you have any reference or resources please share here

KevinnZou commented 8 months ago

Hello, I have conducted a test on the provided URL. While it functions properly on the desktop platform, it encounters failures on both Android and iOS platforms. This outcome is to be expected as the web page within the mobile application lacks the necessary permissions to access mobile media and file information. Consequently, for tasks involving files or media, it is advisable to implement them natively rather than relying solely on web solutions. Although it is technically feasible to achieve these tasks through web development, the complexity increases significantly. As previously mentioned, it is essential to establish a JSBridge to delegate requests to the native application. Alternatively, a more straightforward approach would involve utilizing a third-party Kotlin Multiplatform library that streamlines the entire process. Please let me know if you have any further questions.

if you have any reference or resources please share here

I made a quick search on GitHub and found this repo that may meet your requirements. https://github.com/Wavesonics/compose-multiplatform-file-picker

savan-ixfi commented 8 months ago

Hello, I have conducted a test on the provided URL. While it functions properly on the desktop platform, it encounters failures on both Android and iOS platforms. This outcome is to be expected as the web page within the mobile application lacks the necessary permissions to access mobile media and file information. Consequently, for tasks involving files or media, it is advisable to implement them natively rather than relying solely on web solutions. Although it is technically feasible to achieve these tasks through web development, the complexity increases significantly. As previously mentioned, it is essential to establish a JSBridge to delegate requests to the native application. Alternatively, a more straightforward approach would involve utilizing a third-party Kotlin Multiplatform library that streamlines the entire process. Please let me know if you have any further questions.

if you have any reference or resources please share here

I made a quick search on GitHub and found this repo that may meet your requirements. https://github.com/Wavesonics/compose-multiplatform-file-picker

if possible i request you to make another repo or provide detailed solution of this requirement with example

KevinnZou commented 8 months ago

Hi, I think the repo I provided above already provided a detailed example. Since this requirement is unrelated to my project, I am afraid that I cannot fulfill your requirement. Thanks for your understanding. I would recommend you have a try with the repo provided above first and submit the issue to that repo if you have further questions related to file uploading.