Clipboard readtext not working in android webview

Inside our android webview app, we are trying to paste the copied content from another app eg (notes) using navigator.clipboard.readtext function. It works just fine in mobile chrome, but in android webview, which is again based on chromium engine, it just does not work.
We have given all permission in android manifest
<uses-permission android:name="android.permission.READ_CLIPBOARD" />
<uses-permission android:name="android.permission.WRITE_CLIPBOARD" />
<uses-permission android:name="android.webkit.PermissionRequest" />
ClipData clipData = clipboard.getPrimaryClip();
ClipData.Item item1 = clipData.getItemAt(0);
String text = item1.getText().toString();
webView.evaluateJavascript("(function(){document.activeElement.value = '"+text+"'})()",
new ValueCallback<String>() {
@Override
public void onReceiveValue(String value) {
}
});
But we are unable to get the paste menu on long press inside textarea just like whatsapp. Guide us as where we are going wrong.
Popular Android topics

Kevin Brothaler
edited by Susannah Davidson Pfalzer
This book will teach you everything you need to know to create compelling graphics o...
New

The Kotlin Foundation was created by JetBrains and Google with the mission to protect, promote and advance the development of the Kotlin ...
New

I’ve tried signing up for Airnow as I used to do very well when they were Airpush, but i haven’t used them in years. I went through the s...
New

Android studio displayed access is denied during gradle build
C:\Program Files\Java\jdk1.8.0_251\native\68d5fa5c4cc2d200863cafc0d521ce42...
New

Dear Sir,
I am a beginner in Android App development and I am currently trying to establish a connection between my Android Studio Java ...
New

I’m a developer working as a contractor for a company. I’m finding it confusing on how I should answer these questions? Has Google just b...
New

I have an android app whereby notifications will fire and immediately leave the tray. This doesn’t always happen, it’s unpredictable they...
New

I am trying to develop an app which will make your smartphone act as a “keyboard”. I need it to send different symbols to another devices...
New

Hello everyone, I recently started learning Kotlin and downloaded Android Studio, but after writing my first code and trying to run it, I...
New

Hello,
I’m a beginner in Android development and I’m facing an issue with my project setup. In my build.gradle.kts file, I have the foll...
New
Other popular topics

Which, if any, games do you play? On what platform?
I just bought (and completed) Minecraft Dungeons for my Nintendo Switch. Other than ...
New

I know that these benchmarks might not be the exact picture of real-world scenario, but still I expect a Rust web framework performing a ...
New

Please tell us what is your preferred monitor setup for programming(not gaming) and why you have chosen it.
Does your monitor have eye p...
New

I’m thinking of buying a monitor that I can rotate to use as a vertical monitor?
Also, I want to know if someone is using it for program...
New

Why, if your answer is yes?
New

We have a thread about the keyboards we have, but what about nice keyboards we come across that we want? If you have seen any that look n...
New

Continuing the discussion from Thinking about learning Crystal, let’s discuss - I was wondering which languages don’t GC - maybe we can c...
New

Author Spotlight: Jamis Buck (@jamis)
This month, we have the pleasure of spotlighting author Jamis Buck, who has written Mazes for P...
New

If you want a quick and easy way to block any website on your Mac using Little Snitch simply…
File > New Rule:
And select Deny, O...
New

Author Spotlight: Karl Stolley (@karlstolley)
Logic! Rhetoric! Prag! Wow, what a combination. In this spotlight, we sit down with Kar...
New
Latest in Android
Latest (all)
Categories:
My Saved Portals
-
None saved yet
Popular Portals
- /elixir
- /opensuse
- /rust
- /kotlin
- /ruby
- /erlang
- /python
- /clojure
- /react
- /quarkus
- /go
- /vapor
- /v
- /react-native
- /wasm
- /security
- /django
- /nodejs
- /centos
- /haskell
- /rails
- /fable
- /gleam
- /swift
- /js
- /deno
- /assemblyscript
- /tailwind
- /laravel
- /symfony
- /phoenix
- /crystal
- /typescript
- /debian
- /adonisjs
- /julia
- /arch-linux
- /svelte
- /spring
- /c-plus-plus
- /flutter
- /preact
- /actix
- /java
- /angular
- /ocaml
- /zig
- /kubuntu
- /scala
- /zotonic
- /vim
- /rocky
- /lisp
- /html
- /keyboards
- /vuejs
- /nim
- /emacs
- /nerves
- /elm