It depends on how you want to use the S Pen.
If you're looking for basic detection of touch and draw, the S Pen generates the same events as your finger, but obviously with more accuracy.
If you're looking for hover effects, the
AirView library by
@barx works well.
My
Quick Proto app works best with a stylus, and uses hovers for extra things like tooltips. I can share the code if that's useful.
If you want access to S-Pen-specific features like the pop-up tools and the Samsung drawing engine, then you'll need a library wrapper for that, probably like the one posted above. I assume these features only work on Note phones and tablets - that's why I haven't pursued them further.