The h5 page written by vue is embedded with android

how to adjust the camera of android, and the problem of passing value?
for example: for a page I wrote in vue, click on the camera that needs to be tuned to android, and android will send me the value. How can I accept it in vue? -sharp-sharp-sharp problem description

Apr.05,2021

android has JSBridge available,
if only the camera is called, HTML5 navigator.mediaDevices; You can
https://developer.mozilla.org.


if you want to call the method of the android client, you need to develop jointly with the client. The client development provides the native method, and our page uses js call. The principle is that using JSBridge, roughly means that the client writes the method to an object. For example, if we name it JavaScriptHandler, and mount the object to the window object, we can use it by calling window.JavaScriptHandler.XXX.


Thank you. The answer has been found
template @ click= "jsFormNavtive ('')"
at methods jsFormNavtive (data) {

            window.android.getCamera('00000')
            alert(data)
        }
         data android
         

add window.jsFormNavtive = this.jsFormNavtive; in mounted

Menu