先上個圖:android
大概原理就是在應用端開啓一個 http server,而後讓 pc 訪問這個 server。獲取到輸入界面。而後在網頁端設置onKeyUp監聽,讓每次有頁面上有東西輸入的時候都往 android 上發送一個 post 請求。在 android 端受到 post 請求以後,更新EditText的界面。git
onKeyUp
EditText
項目地址:Github 歡迎 star 和 forkgithub