hoccer / scrum

General software management
0 stars 0 forks source link

Near-by - Implement throw gesture #158

Closed jkrumow closed 10 years ago

jkrumow commented 10 years ago
patrickjuchli commented 10 years ago

See evaluation on iOS side #102, if helpful.

jkrumow commented 10 years ago

Checked out Android client implementation and found what is necessary:

package com.hoccer.android.gesture;

Dependencies:

The android client uses toxic library 2D and 3D vectors. But they can be replaced.

Looks similar to iOS implementation.

jkrumow commented 10 years ago

Next steps:

jkrumow commented 10 years ago

Corrected usage of deprecated APIs. Added replacement for Vec2D and Vec3D classes.

jkrumow commented 10 years ago

Motion detection works.

How to use it:

// implement MotionGestureListener interface
@Override
public void onMotionGesture(int pType) {
    String gestureName = Gestures.GESTURE_NAMES.get(pType);
    LOG.debug("Received gesture of type: " + gestureName);
}
// instantiate MotionInterpreter with gesture type, context and MotionGestureListener
// for gesture type you can choose:
// SHARE = throw detection
// RECEIVE = catch detection
// SHARE_AND_RECEIVE = throw and catch detection
mMotionInterpreter = new MotionInterpreter(Gestures.Transaction.SHARE, this, myMotionGestureListener);
// activate the MotionInterpreter when you want to receive gesture events
mMotionInterpreter.activate();
JacobZ commented 10 years ago

Is it already coupled to the send button in ChatView? If so make a test apk and upload it to Hockey APP for the testers

jkrumow commented 10 years ago

Didn't know this was part of the task. But no problem, I can do that tomorrow.

ChristianeMussmacher commented 10 years ago

ok I will put it on the test sheet for the next version!