I am developing an Android application that utilizes a webview to display my web app. I have a specific requirement to retrieve the device's IMEI as soon as the application opens, and then send it via JavaScript from MainActivity.java (through the webview) to my remote web app hosted on a server.
Within the web app, there is a hidden input field where I intend to store the IMEI value. How can I achieve this? Is there a method to pass the IMEI through JS in MainActivity.java and access it in the HTML file?