Commit Graph

127 Commits

Author SHA1 Message Date
Roman Volosovskyi 115b82b714
_ 2023-07-05 14:05:56 +02:00
Roman Volosovskyi 9e11b162cb
_ 2023-07-05 13:47:49 +02:00
Roman Volosovskyi 07bd00e4e1
_ 2023-07-05 12:46:58 +02:00
Roman Volosovskyi df493332a0
Fix for android 13 2023-07-05 12:34:24 +02:00
Roman Volosovskyi ded5475692
Don't allow camera and mic permissions by default.
Notify user about permission request
2022-01-10 14:57:09 +03:00
theofournier a12e231121
feat(android): add minimum font size (#2279) 2022-01-07 18:48:23 -08:00
Jacob Müller 9b14584b78
fix(android): add null-pointer check for `activity` before creating `RNCWebChromeClient` (closes #1406, #2190) (#2240)
* fix(android): add null-pointer check for activity before creating web chrome client with full-screen video support

* fix(android): reference error

* fix(android): add null-pointer check for activity before creating web chrome client with full-screen video support

* fix(android): reference error
2021-11-26 13:50:04 +01:00
iwashi1t 0c42a9812e
feat(auth): Basic Authentication Support (#1467)
Some people prefer using this new prop over the http://username:password@example.com syntax, now webview supports both
2021-09-30 18:03:34 +02:00
Kirill 283c18b379
fix(jcenter): remove jcenter (#2178)
Builds will no longer be able to resolve artifacts from JCenter after February 1st, 2022 because jcenter servers shut down

so, i remove jcenter and update react-native (since 0.65.1 they don't use jcenter)

Co-authored-by: bibazavr <lebedevki@lad24.ru>
2021-09-27 13:50:52 +02:00
Cloud Zhang 19980d888d
feat(android): force dark mode (#2063)
Co-authored-by: 张 云 <zhangyun@sidechef.com>
Co-authored-by: Thibault Malbranche <thibault.malbranche@epitech.eu>
2021-08-09 19:57:33 +02:00
Dulmandakh 998b211b94
feat(android): remove unnecessary buildToolsVersion (#2023)
buildToolsVersion is no longer necessary, it'll default to Android Gradle Plugin version specification
2021-08-09 19:41:18 +02:00
Stanciu Bogdan Mircea b92b98637c
feat(android): add props to control pinch to zoom and internal zoom controls (#2113)
Co-authored-by: Mircea Bogdan Stanciu <mirceabogdanstanciu@gmail.com>
Co-authored-by: Thibault Malbranche <thibault.malbranche@epitech.eu>
2021-08-09 19:37:44 +02:00
Rodolphe Lemasquerier 6bac272a5f
feat: add prop to allow nested scroll on android (#2056)
* feat: add prop to allow nested scroll on android

When set to true, this prop allow to scroll inside the webview when the webview is inside a scrollview on android

* docs: nestedScrollEnabled prop usage
2021-08-09 19:14:26 +02:00
Thibaud Michel bba5907906
fix(android): onPermissionRequest duplicate (#2002) 2021-05-24 14:36:07 +02:00
Thibault Malbranche 8a45fcf7f9 fix(android): revert change ThemedReactContext to ReactContext 2021-05-21 01:26:56 +02:00
Thibaud Michel 9f6037e4b2
feat(android): Enhanced camera/audio and geolocation permissions (#1239) 2021-05-21 00:15:22 +02:00
Gaurav Gupta 7b71364a9c
fix(android): Changing ThemedReactContext to ReactContext to allow custom stuff (#1994)
* changing ThemedReactContext to ReactContext

* updating documentation

Co-authored-by: Gaurav Gupta <gaurkum@microsoft.com>
2021-05-20 10:20:42 +02:00
Sampo Juustila 768092bba7
fix(android): read minSdkVersion from root project (#1960) 2021-04-21 01:03:41 +02:00
Mrinal Maheshwari 015054c2f5
fix(android): Adding mavenCentral() as jcenter() is shutting down (#1961)
Adding mavenCentral() as jcenter() is shutting down
2021-04-20 16:25:27 +02:00
Gaurav Gupta 344ccce3ee
fix(refactor): Converting dispatchEvent static method to non static method (#1939)
* converting static method dispatch event to non static

* removing typo

* removing typo

Co-authored-by: Gaurav Gupta <gaurkum@microsoft.com>
2021-03-24 21:28:20 +01:00
crasyboy42 65cc83c21a
fix(android:) enable DRM protected content (#1862) 2021-03-17 00:32:14 +01:00
Cristiano Coelho 4f469ee9aa
fix(android): Fix full=screen video when in modals (#1748 by @cristianoccazinsp)
Co-authored-by: Cristiano Coelho <cristianocca@hotmail.com>
Co-authored-by: Thibault Malbranche <thibault.malbranche@epitech.eu>
2021-02-10 21:09:09 -08:00
Christian Nilsson 53c0382cd0
fix(android): changed initial value of nextLockIdentifier from 0 to 1 (#1689)
Co-authored-by: Jamon Holmgren <jamonholmgren@gmail.com>
2020-12-08 04:56:28 +01:00
Lorenzo Sciandra 194c6a2335
feat(android): Introduce setSupportMultipleWindows to mitigate CVE-2020-6506 (#1747 by @mrcoinbase and @kelset -- THANK YOU!)
BREAKING CHANGE:

This release introduces the `setSupportMultipleWindows` prop for Android. This sets the underlying Android WebView setting `setSupportMultipleWindows`. This prop defaults to `true` (previously `false`), and serves to mitigate the security advisory [CVE-2020-6506](https://github.com/react-native-webview/react-native-webview/security/advisories/GHSA-36j3-xxf7-4pqg).

The primary way this new behavior changes existing React Native WebView implementations on Android is that links that open in new tabs/windows (such as `<a target="_blank">`) will now prompt to open in the system browser, rather than re-using the current WebView.

If this behavior is not desirable, you can set this new prop to `false`, but be aware that this exposes your app to the security vulnerability listed above. Make sure you have read and understand the whole advisory and relevant links.

iOS & Windows are unaffected.

```jsx
<WebView
  // ...
  setSupportMultipleWindows={true} // default: true
/>
```

Thanks to @mrcoinbase, @kelset, and @Titozzz for their work on this.
2020-11-24 09:15:19 -08:00
Harsh Chokshi c95c0ea923
fix(android): Unset mWebChromeClient on WebViewManager rather than WebView (#1720) 2020-11-07 00:05:18 +01:00
Alesandro Ortiz ef48d35e95
fix(android): Update SSL error handling (#1466)
* Update SSL error handling for Android WebView

Update SSL error handling to call onReceivedError() only on top-level navigations. This prevents iframes and other subresources from causing user-visible SSL error messages. The desired behavior is only to have top-level navigations show user-visible error messages. All other requests should be cancelled automatically with no user-visible error message.

* Update RNCWebViewManager.java

Clarify comments and add warning on blocked subresource

Co-authored-by: Thibault Malbranche <thibault.malbranche@epitech.eu>
2020-10-22 09:35:31 +02:00
Daniel Vicory 4d4b5e2387
Synchronously decide if Android WebView should load a URL or not. (#1590)
This solves a class of issues when the WebView loses "context"
that a subsequent page load is the same as what was attempted
to be loaded previously. This solves a bug where a HTTP redirect
in combination with history manipulations causes a user to be
stuck and prevented from going back. Since WebView requests are
allowed to happen normally, debugging the WebView and tracking
redirects and page load initiators is more accurate and easier.
This will also bypass bridge latency and provide a faster navigation.

To do this, we must lock in the shouldOverrideUrlLoading callback
and send an event to JS. Currently, this callback is ran on
the main UI thread, of which we have no control over. This is
problematic as using the bridge in most ways seems to require
the main UI thread, which will cause a deadlock. However, using
BatchedBridge for Java->JS and a synchronous method for JS->Java
doesn't cause any problems. Additionally, it's been designed so
that if WebView suddenly runs the callback on a different thread
allowing for concurrency, it will continue to work.
2020-08-26 08:59:51 +02:00
oliviacaraiman 9ffca8f9db
feat(android): Add androidLayerType as prop (#1588)
* Add androidLayerType as a prop

* Deprecate "androidHardwareAccelerationDisabled" prop

* Update reference

Co-authored-by: Olivia Caraiman <olcaraim@microsoft.com>
2020-08-24 14:23:38 +02:00
Caleb Clarke 6a9116f2d1
feat(events): Add isTopFrame to shouldStartLoadForRequest (#1537)
* Add isTopFrame to shouldStartLoadForRequest on iOS

onLoadingStart is not raised for inner frames, but onShouldStartLoadWithRequest still is. This keeps that behavior but adds isTopFrame to onShouldStartLoadWithRequest so that apps can perform their own filtering if desired.

* Update docs

Co-authored-by: Jamon Holmgren <jamonholmgren@gmail.com>
2020-08-15 11:21:38 +02:00
Jason Kelly 63c584c647
fix(incognito): Ensures that incognito doesn't clear cookies when not enabled (#1447 by @jasonkellydk)
Co-authored-by: Jason Kelly <jason.kelly@isobar.com>
Co-authored-by: Jamon Holmgren <jamonholmgren@gmail.com>
Co-authored-by: Jason Safaiyeh <safaiyeh@protonmail.com>
2020-08-14 20:04:20 -07:00
cristianoccazinsp 8a8b7ceb98
feat(android): WebView crash handling (#1480)
Co-authored-by: Cristiano Coelho <cristianocca@hotmail.com>
2020-08-06 22:21:01 +02:00
Rinku Kumari 5f823bb77b
fix(android sdk 28): build issue (#1469)
Co-authored-by: Rinku Kumari <rinku@ideaboard.xyz>
2020-06-26 16:04:44 +02:00
Alesandro Ortiz 1bd5961255
fix(android): Add SSL error handling for Android WebView (#1450 by @thephpjedi)
Based on PR #668. Fixes #259.
2020-06-13 14:24:56 -07:00
Salvatore Randazzo ac4e05e0f2
feat(android): Add support for injectedJavaScriptBeforeContentLoaded on Android (#1099 by @SRandazzo and @ @shirakaba) 2020-06-13 13:54:48 -07:00
Jacob Müller 2f8c4c5067
fix(android): duplicate `setWebChromeClient()` overwrite (#1417) 2020-05-29 11:21:24 -05:00
michael hancock 0317a4b4a5
fix(android): Fixes black screen on back button press (#1298 by @michan85)
Co-authored-by: michael hancock <michael.hancock@24.com>
Co-authored-by: Jamon Holmgren <jamonholmgren@gmail.com>
2020-05-28 18:05:53 -07:00
Jason Chia-Hsien Ho b97d16c23d
fix(android): Improve onLoadProgress consistency (#1373 by @hojason117)
[skip ci]

Co-authored-by: Tyler Coffman <tyler.coffman@appfolio.com>
Co-authored-by: Jamon Holmgren <jamonholmgren@gmail.com>
2020-05-28 17:21:20 -07:00
Karthik Subramaniam 03dbcb870e
fix(android): Updated permissions for Android Q and above (#1384 by @Karthz) 2020-05-28 16:47:26 -07:00
trcoffman 91df544fae
feat(webview): Allow javascript to open windows automatically (#1409 by @trcoffman)
[skip ci]
2020-05-28 09:54:20 -07:00
Thibault Malbranche 7ab2afbab7
fix(android): Broken build due to conditional import of kotlin (#1412) 2020-05-28 13:18:13 +02:00
Jason Chia-Hsien Ho 89886c820d
fix(android): Fix several Android file upload issues (#1302 by @hojason117)
[skip ci]
2020-05-26 19:59:08 -07:00
Benjamin Rau 4f0f0afe70
fix(android): add missing null check for fileTypes (#1368 by @bengy) 2020-05-26 14:59:18 -07:00
SaeedZhiany 2639d523e9
fix(gradle): Load Android Gradle Plugin conditionally (#1230 by @SaeedZhiany)
BREAKING CHANGE:

The Android Gradle plugin is only required when opening the project stand-alone, not when it is included as a dependency. By doing this, the project opens correctly in Android Studio, and it can also be consumed as a native module dependency from an application project without affecting the app project (avoiding unnecessary downloads/conflicts/etc).

Also moved getExtOrDefault to buildScript block to able to use everywhere in the file

This change shouldn't break any apps, but we are marking it as a breaking change in case there are some use cases we've missed.

[skip ci]
2020-05-26 14:57:40 -07:00
trcoffman 5d88af44fa
fix(Android): Workaround for chromium bugs 1023678 and 1050635. (#1221)
There is a bug in the WebView that causes a spurious call to onReceivedError
whenever you download a file.

This commit is a workaround for that bug. The idea here is to try and detect
these spurious errors and drop them before they cause problems.

This commit should be reverted once those chromium bugs are fixed.
2020-04-10 13:41:53 -07:00
ivari 04f9fb23ba
fix(Android): Ensure each mounted WebView binds their personal onMessage handler (#1301)
* Ensure each mounted WebView binds their personal onMessage handler

* Changed unique ref generation to uuid

Uses `uuid` npm package.
Dashes are removed from the ref for sanity.
2020-04-09 08:05:44 -07:00
ivari c88e380762
feat(Android): Implement direct communication between Android code and JS (#1203) 2020-04-06 10:25:28 -07:00
trcoffman 24702450f3
fix(Android): Don't log the cookie when downloading file. (#1224) 2020-02-21 11:02:50 -08:00
Daniel Vicory 4093682e08
fix(Android): Don't show camera options for a file upload when they can not be used (#1210)
* Don't show camera options for a file upload that would result in nothing happening for the user.

On Android, if the application declares the camera permission, then even intents
that use the camera require permission to be granted. This is a problem for apps
that combine an in-app camera with a WebView that has file uploading and the user
has not given permission for the camera.

Note, this will not request permission for camera. This will simply prevent
showing the camera options that would be a no-op action for users. It does this
by checking if the camera permission is declared, and if so, checks that the
user has granted permission.

More information: https://blog.egorand.me/taking-photos-not-so-simply-how-i-got-bitten-by-action_image_capture/

* Add example and documentation about camera option availability in file uploads for Android.
2020-02-18 18:40:30 -08:00
Dulmandakh e6241cbb6a
chore(Android): Convert RNCWebViewPackage to Kotlin (#1194)
* RN is implementation dependency

* renamed:    RNCWebViewPackage.java -> RNCWebViewPackage.kt

* migrate RNCWebViewPackage to Kotlin

Co-authored-by: Jason Safaiyeh <safaiyeh@protonmail.com>
2020-02-12 17:12:24 -08:00
Daniel Vicory 344aab591a
fix(Android): Revert "Redirected URLs now redirect correctly. (#991)" (#1177)
This reverts commit acf1ad7560.
2020-01-29 19:18:35 -08:00