I was inspired by the WILL SDK and the many use cases proposed. And since I had a Galaxy Note in hand, I decided it was time that I made an ink based mind mapping app, something I was always looking for but never found.

What it does

Quite simply, Collaborative Mind lets you create mind maps easily, with some well thought gestures. It also allows you to collaborate as a team on a same map, in real time.

How I built it

Collaborative Mind is based on WILL SDK, and uses every bit of this powerful SDK, such as:

  • PathBuilder: to build paths from motion events,
  • Smoothener: to smoothen the path,
  • StokeRenderer: to render the built paths into layers,
  • Layers: I used one for strokes, one for shapes, one for connectors...
  • Intersectors: to erase strokes,
  • Encoding / decoding: to save the instance state of the activity, and to send serialized strokes through the network for collaboration,
  • WILL file format: to save and read the map.

Challenges I ran into

  • I had to use my imagination extensively to determine the proper gestures in order to avoid cluttering the interface with buttons.
  • I had to think everything in term of matrices, to allow seamless zooming and scrolling, across multiple devices with different screen sizes.
  • I had to deal with some performance issues: zooming requires transforming path coordinates which is CPU intensive, so I came up with the idea to zoom the layer instead:
    inkCanvas.drawLayer(currentFrameLayer, matrix, BlendMode.BLENDMODE_NORMAL);
    In case of a zoom out, I needed parts of the map which were outside of the current frame layer. So I used a miniature layer that contains the whole map. When the zoom gesture ends, I can then do the real path transformation. Some methods included in the SDK were ready to be used:
    PathUtils.transformPathCoordinates(stroke.getPoints(), stroke.getSize(), stroke.getStride(), matrix);
    That way, you can zoom indefinitely and still have crystal clear strokes.
  • I had to find a correct way to implement collaboration, but once I figured it out, serializing the strokes was done easily through the WILL encoder:
    InkEncoder encoder = new InkEncoder(); encoder.encodePath(2, nativeFloatBuffer, pathSize, pathStride, Float.NaN, 0, 0.0f, 1.0f, BlendMode.BLENDMODE_ERASE);

Accomplishments that I'm proud of

I was very enthusiastic about the idea, but I sometimes thought I was in lack of time to master all the aspects of the project. I had quite a few sleepless nights but I am proud of the results.

What I learned

Trusting WACOM with its experience and long standing expertise in inking was key to attaining my objective. I am confident that I can reuse WILL SDK on other platforms just as conveniently.

What's next for Collaborative Mind

Since WILL SDK is a cross platform tool, I have in mind to develop an iOS and Web version of the app. I also have a clear vision of many features to add in the future.

Built With

Share this project: