Recent

Author Topic: LAMW - jWebView enabling camera / file access  (Read 2020 times)

Mongkey

  • Full Member
  • ***
  • Posts: 179
LAMW - jWebView enabling camera / file access
« on: August 27, 2021, 01:01:45 pm »
I found this very useful for dealing with hybrid apps for uploading something.

This one is java related modification inside jWebView.java, its very difficult for me.

https://stackoverflow.com/questions/47811428/react-native-webview-getusermedia-not-working-onpermissionrequest-override/49029414#49029414

rsu333

  • Jr. Member
  • **
  • Posts: 59
Re: LAMW - jWebView enabling camera / file access
« Reply #1 on: August 27, 2021, 01:59:36 pm »
Good job

Mongkey

  • Full Member
  • ***
  • Posts: 179
Re: LAMW - jWebView enabling camera / file access
« Reply #2 on: August 27, 2021, 02:33:36 pm »
I'm not doing nothing  :D

jmpessoa

  • Hero Member
  • *****
  • Posts: 1944
Re: LAMW - jWebView enabling camera / file access
« Reply #3 on: August 27, 2021, 06:06:17 pm »
Quote
his one is java related modification inside jWebView.java


what modification/added we need to add?
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

Mongkey

  • Full Member
  • ***
  • Posts: 179
Re: LAMW - jWebView enabling camera / file access
« Reply #4 on: August 27, 2021, 09:23:11 pm »
Jwebview has no granted access to file / camera, ex: sometimes on web app has uploading feature --> need overriding grant on camera, mic , and video. May be you can get it overrided, so we can upload something on web over jwebview.

On java:
MediaDevices.getUserMedia()

This is sample html element with accessing media
Code: Pascal  [Select][+][-]
  1.  <WebView
  2.         style={{flex: 1}}
  3.         mediaPlaybackRequiresUserAction={false}
  4.         domStorageEnabled={true}
  5.         allowsInlineMediaPlayback={true}
  6.         source={{uri: 'https://myurltomyapp.com/index.html'}}
  7.         startInLoadingState={true}
  8.         allowUniversalAccessFromFileURLs={true}
  9.     />

This is the solution link for that problem:

https://stackoverflow.com/questions/47811428/react-native-webview-getusermedia-not-working-onpermissionrequest-override/49029414#49029414

Thank you prof JM.
« Last Edit: August 27, 2021, 10:00:41 pm by Mongkey »

jmpessoa

  • Hero Member
  • *****
  • Posts: 1944
Re: LAMW - jWebView enabling camera / file access
« Reply #5 on: August 28, 2021, 08:56:00 am »
done!

Thank you!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

Mongkey

  • Full Member
  • ***
  • Posts: 179
Re: LAMW - jWebView enabling camera / file access
« Reply #6 on: August 28, 2021, 04:18:04 pm »
Awesome, many r trying hard to this  :D, thank you, if it is possible to catch toast/any text emitted by clicking any html control -> interacting between inside jwebview n native control, it would become a new framework -> LAMW7  :D, ha ha, very fast fixing is not easy job, and again thank you very much for building this really helpful n handy framework.

after test -> still not work, but this one are really huge improvement  8-)
« Last Edit: August 29, 2021, 02:55:42 am by Mongkey »

 

TinyPortal © 2005-2018