Monday, July 4, 2016

Samsung Pen Package – Some Fundamentals

This is in continuation from my previous post. Samsung’s latest devices (Samsung Galaxy Note 3 and the Galaxy Note 10.1 (2014 edition) tablet) are unique with the introduction of the S Pen. The focus of the Samsung SmartApp Challenge that is currently open expects developers to use the pen and the look packages that are part of the Samsung Mobile SDK briefed in my earlier two posts.
In this post I would like to dive a bit deeper on the pen package and in a subsequent post on the look package. We will see what are they, as we go along.

S Pen is opening up a new horizon to Smartphones that support it. In fact I would not be surprised if Samsung soon open sources this project for encouraging wider adoption.

First, what is an S Pen?
Note that S Pen is an innovative stylus-type input device that comes with the Galaxy Note range of devices. It seems to have started off with the idea of making drawing or writing easy on smartphone where a finger touch doesn’t provide a great experience. It is not a capacitive stylus that typically phones came with but uses the Wacom’s EMR (Electro-Magnetic Resonance) patented Technology. For more on the technology behind the S Pen, you can read this article on the XDA Developers Forum or the ‘Android Authority’ post.
The tip of an S Pen allows for its usage in apps that need sensitivity to pressure applied and precision. The side buttons provide for press and release events based on which actions can be initiated.

In order to support developers to build apps for the S Pen, a pen package has been introduced as part of the Samsung Mobile SDK.

Next, what is the Pen package?
It is a package that allows developers to write applications that can take hand-written inputs. It allows the use of a pen, finger or any other kind of input tools or virtual pens to aid precise user input in the most natural way possible. It feels like you are actually writing or drawing on the device and would you call that a luxury? I am sure it is an understatement for thos who use their devices extensively for all day to day activities. J

The pen packageenables to
  • ·      Draw using a pen/finger
  • ·      Change user preferences for pens, erasers and text
  • ·      Edit and save the inputs
  • ·      Undo or redo thus managing history of inputs
  • ·      Support both touch and hover events


A few words about the architecture of the pen package before we look at snippets of program using the package: