anantshri / premotedroid

Github fork of premotedroid to work on issues pending in google code as developer is non responsive.
9 stars 3 forks source link

Multi-touch gestures #6

Open rpseng opened 10 years ago

rpseng commented 10 years ago

Hi All,

This is a very interesting project, congrats on keeping it running. It should be nice to have support for multi-touch commands.

I can program in Java very well and already have the server side code running under eclipse over here. However I've never compiled code for android. Unfortunately, this will need changes in the client side. Any good (fast) tutorial on how to compile the client side code?

All the best.

Tsaukpaetra commented 10 years ago

The first and most important step is to download the android sdk. After installing that, it should be a simple matter of importing the project in eclipse (as an android app). After that, you should be able to debug the application. On Aug 1, 2013 3:46 PM, "rpseng" notifications@github.com wrote:

Hi All,

This is a very interesting project, congrats on keeping it running. It should be nice to have support for multi-touch commands.

I can program in Java very well and already have the server side code running under eclipse over here. However I've never compiled code for android. Unfortunately, this will need changes in the client side. Any good (fast) tutorial on how to compile the client side code?

All the best.

— Reply to this email directly or view it on GitHubhttps://github.com/anantshri/premotedroid/issues/6 .

Tsaukpaetra commented 10 years ago

Any luck/trouble? If you need better instruction, I can probably put together a (very) short walkthrough, although existing youtube videos should suffice.

rpseng commented 10 years ago

Dear Tsaukpaetra,

Actually I manage to build the code (client and server) and successfully added support for two finger scrolling. You will need just to edit the ControlView.onTouchMove as follows:

private void onTouchMove(MotionEvent event){
    if (this.mouseMoveOrWheel){
        if(event.getPointerCount()==2){
        // a new pointer, start a wheel event
            this.mouseMoveOrWheel = false;
            onTouchDownMouseWheel(event);
            this.holdPossible = false;
        }
        else
        this.onTouchMoveMouseMove(event);
    }
    else{
        this.onTouchMoveMouseWheel(event);
    }
}

I'm not used to Github (I'm a subversion user) and I'm not sure how to send a patch. Further, I have played with the code in several points...

All the best!

Tsaukpaetra commented 10 years ago

If you make a patch and drop it somewhere I could probably apply it. I'll test the code snippet you posted above. ;)

Tsaukpaetra commented 10 years ago

Added your code above in commit afdbac87da2a73c279e335ea7c2b126fe5e435c9