File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
android/src/main/java/com/reactnativecommunity/webview Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -179,8 +179,10 @@ public void onPermissionRequest(final PermissionRequest request) {
179179 */
180180 androidPermission = PermissionRequest .RESOURCE_PROTECTED_MEDIA_ID ;
181181 } }
182+ Uri originUri = request .getOrigin ();
183+ String host = originUri .getHost ();
182184 // TODO: RESOURCE_MIDI_SYSEX, RESOURCE_PROTECTED_MEDIA_ID.
183- String alertMessage = String .format ("Allow this app to use your " + requestPermissionIdentifier + "?" );
185+ String alertMessage = String .format ("Allow this " + host + " to use your " + requestPermissionIdentifier + "?" );
184186 if (androidPermission != null ) {
185187 if (ContextCompat .checkSelfPermission (this .mWebView .getThemedReactContext (), androidPermission ) == PackageManager .PERMISSION_GRANTED ) {
186188 AlertDialog .Builder builder = new AlertDialog .Builder (this .mWebView .getContext ());
You can’t perform that action at this time.
0 commit comments