99 Commits

Author SHA1 Message Date
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 acf1ad7560aac450615703b3c8410919dbddecd1.
2020-01-29 19:18:35 -08:00
hanlh1
acf1ad7560 fix(Android): Redirected URLs now redirect correctly. (#991)
Co-authored-by: Jamon Holmgren <jamon@infinite.red>
Co-authored-by: Jason Safaiyeh <safaiyeh@protonmail.com>
2020-01-26 00:25:24 -08:00
Conner Owen
5b0c634f15 fix(build): Android build errors when using Gradle 6.0 (#1037)
* Fix Android build errors when using Gradle 6.0

* Update gradle.properties

* Remove newline at end of file

* newline
2019-11-26 10:41:16 +01:00
Vladimir
d8acd9086c fix(android): Added fallback poster image to prevent crashes (#1036) 2019-11-26 10:40:38 +01:00
Andrei Pfeiffer
71a375f898 chore(cleaning): Remove old comments (#1019) 2019-11-14 10:48:58 +01:00
Nikhil Chitlur Navakiran
7e68da4ffe fix(android): Fix ClassCastException when doing native things(#987) 2019-11-13 10:36:08 +01:00
Stanislav Shakirov
4a4f4a2c45 feat(android): add clearHistory, clearCache and clearFormData (#450)
* add clearHistory, clearCache and clearFormData android webview api.

* remove pointless `async`

* add docs for new android webview methods

* Update Reference.md

* update commands types

* add more strict type for RNCWebViewUIManager `Commands` property
2019-11-12 10:09:16 +01:00
thanakij
fab77dc82f fix(android): possible NullPointerException (#965) 2019-10-22 09:56:50 +02:00
Tom Targosz
0b783da0a4 fix(lint android): Add TargetAPI to onPermissionRequest (#940) 2019-10-11 10:45:22 +02:00
Borut Balazek
4db3d84dda feat(android): allowFileAccessFromFileURLs prop added (#831)
* add allowFileAccessFromFileURLs propery to do the expected on android

* Added types

* Update WebViewTypes.ts
2019-09-29 15:50:39 +02:00
Andres Castano
5da59251ce feat(android): Expose cacheMode property (#895) 2019-09-29 15:45:20 +02:00
Thibault Malbranche
8f2ddf4542
fix(android): Revert scroll update from #281 (#889)
fixes #878
2019-09-23 15:40:40 +02:00
Tyler Alves
fc59cae4bf fix(android): Filter extra onLoadProgress & add url event (#643)
* Filter out extra onLoadProgress calls; add url to onLoadProgress

* remove note about onLoadProgress not having the url property in docs

* Update Reference.md
2019-09-23 10:35:49 +02:00
thanakij
9e25e42cee fix(Android): hardware acceleration issue (#854)
* Fix https://github.com/react-native-community/react-native-webview/issues/575

* Check if hardware acceleration is available also

* Alternative way to check isHarewareAccelerated
2019-09-23 00:03:42 +02:00
Jason Chia-Hsien Ho
552472c414 feat(new prop): onHttpError callback (#885) 2019-09-21 02:43:28 +02:00
masako-yamada
a5cb7ba65c fix(android): Allow scrolling inside ScrollView (#281) 2019-09-18 11:33:08 +02:00
Greg Price
b2cd6b54fa fix(android): Move noisy debug logging out of "quiet" log level. (#844)
Each time building our app, this library causes a message like this
one to be printed, sometimes twice:

  > Configure project :react-native-webview
  :react-native-webview:reactNativeAndroidRoot /home/greg/z/mobile/node_modules/react-native/android

Worse, the message comes through even if I silence all normal
progress messages and warnings, with `./gradlew --quiet`.

It turns out that the `logger.quiet` method which these log lines are
using has a confusing name.  It doesn't mean "log quietly", but more
like the opposite: "log even when asked to keep things quiet".  See
documentation on Gradle log levels:
  https://docs.gradle.org/current/userguide/logging.html

So, remove the noise by switching to `logger.info`.  This avoids
bothering the user by default, and keeps the information readily
available if desired by passing `--info` to Gradle.
2019-09-04 09:22:23 +02:00
tekmin
47e9a0b97d fix(android): webview crash with incognito in Android Lollipop (#799) 2019-08-29 16:47:48 +02:00
MAHAVIR VATALIYA
39e5373d3e Update RNCWebViewModule.java (#509)
In Devices moto e5 play and Samsung Galaxy Note 9 Video Capture via camera return data as null.
2019-08-29 16:46:42 +02:00
Akeem McLennon
1ea05d3115 fix(android): Allow user to rotate fullscreen video (Android X) (#816)
* Allow user to rotate fullscreen video on Android

* Update RNCWebViewManager.java

* Update RNCWebViewManager.java
2019-08-29 16:38:25 +02:00
Roc
12db6956a9 fix(android): add null reference check for onMessage on android (#770) 2019-08-09 10:53:00 +02:00
DemMarcupan
6f053bad7b feat(focus): Add functionality to imperatively focus webview (#567)
*  - add focus functionality for devices without touch screen
 (faced problem while developing for android TV, cause there only remote controller for device)

* Reimplement as a ref method.

*  - remove redundant requestFocus
2019-08-06 10:56:59 +02:00
Eze
bb79ae80ee feat(Android): webrtc permission request - conflicts fixed (#719)
* fix(Android): WebRTC permission request (#231)

* fix(Android):  Avoid unintentionally granting requests for new permissions (#231)

* ContextCompat import migrated to androidx new artifact

* RNCWebViewManager.java original format restored
2019-08-02 17:23:59 +02:00
Raphael Eidus
9c592d621c feat(android): polyfill applicationNameForUserAgent on Android (#707) 2019-08-02 10:46:03 +02:00
SiDevesh
282f81dcdd fix(android): onMessage on android to return baseEvent(#755) 2019-08-02 10:06:11 +02:00
José Luis Pereira
25bc5a55c6 feat(android props): Add incognito to Android (#524) 2019-08-02 09:48:54 +02:00
ifsnow
d8743eeed2 fix(performance): Improved onScroll to work efficiently on Android (#609) 2019-06-02 20:19:39 +02:00
Thibault Malbranche
585ac7a243
fix(AndroidX support): Fixed broken import + added instructions (#583)
Hello, in order to use react-native-webview > 6.0.2 please make your android/gradle.properties contains:
```
android.useAndroidX=true
android.enableJetifier=true
```
This enables AndroidX libraries which are the new standard.

fixes #580 
fixes #581 
fixes #582
2019-05-20 00:36:51 +02:00
liminjie
cbbff21ea8 fix(Android): on scroll syntax error (#577)
getJSEventName() needs a ScrollEventType parameter
2019-05-17 09:25:53 +02:00