varunon9 / Remote-Control-PC

Control Laptop using Android. Remote control PC consists of android as well as desktop app written in Java to control laptop using phone.
MIT License
194 stars 97 forks source link

live screen can't show mouse pointer #22

Open FrankLove opened 6 years ago

FrankLove commented 6 years ago

hi,this project is usefull for me ,but when i use live screen has two problems first:the mouse pointer can't show in the android devices ,do you know the reason? second:the Screen picture of live screen can't change when the pc screen is changing thanks

varunon9 commented 6 years ago
  1. live screen is nothing but taking screenshot of PC and displaying it in Android. Since mouse pointer is not captured in screenshot so it is not fetched in Android.
  2. Currently auto refresh of live screen is not there for performance reason. If you click on Android screen (Screenshot) then screenshot will be updated. However you can always have auto refresh functionality by adding a few lines of code :D .
FrankLove commented 6 years ago

@varunon9 thanks for your reply,i have already modified the source code and make it auto refresh.but even so,i find the live screen of android device slower than the pc screen picture,do you know the reanson or have some good idea to improve it. i want to the live screen have a little delay,but now the delay is too big.thanks

varunon9 commented 6 years ago

how much delay are you facing? Is your laptop and device directly connected using device hotspot or both are connected to some router?

FrankLove commented 6 years ago

about 2s,the connect has nothing problem,because i use The product of another company is very fluency in the same internet environment,so i think the Image transmission should need improve , i am thinking how to improve from pc send screen picture to android device,how do you think so?

varunon9 commented 6 years ago

I am not sure how you modified the code for auto-refresh. Here are my observations regarding current code (this repo)-

  1. Screenshot of size roughly 300 KB is taking around 0.8s. [Click on live screen and notice updation time]
  2. Current code calls delayedUpdateScreenshot method to update screenshot on user click action. This method executes updateScreenshot after 0.5s. This means that actual transfer time is 0.3s.
  3. I think 0.3s is okay for screen refresh. I tested it after connecting my lappy to phone hotspot. Please see https://github.com/varunon9/Remote-Control-PC/blob/master/RemoteControlPC-Studio/app/src/main/java/me/varunon9/remotecontrolpc/livescreen/LiveScreenFragment.java file for screenshot updation logic. Since you mentioned delay of 2s, you must be doing something bad in auto-refresh logic. PS: Live Screen feature is just prototype. It's upto developers to make this robust and efficient. Maybe I'll work on this in near future.