Samsung wants developers to put its S Pen stylus for the Galaxy Note9 to work. The company recently released an SDK that gives developers access to the S Pen, allowing them to remotely trigger actions and controls with their apps via the stylus. This may let your app stand out.
Samsung debuted the Galaxy Note9 earlier this year. It is the company's flagship phone and most important device heading into the holiday season. Samsung uses the Note series to showcase new technology. For example, the Note series were the first from Samsung to introduce NFC-based mobile payments, to offer enormous screens, and to include a stylus for interacting with the UI. The Note9's stylus takes on new capabilities this year. Samsung added a Bluetooth radio to the stylus. This allows the styls to interact with the Note9 from afar. The native actions of the stylus, as set by Samsung, allow the S Pen to launch and trigger the camera shutter, or to play, pause, and skip through tracks in the music player. Fairly simple stuff.
Why offer an SDK? The Note series is Samsung's most expensive. The Note9 costs a whopping $999. People who buy the Note9 clearly have enough money to also pay for apps. What better way to call attention to your app than via the Note9's fancy new Bluetooth-equipped S Pen?
Samsung explains that the SDK and accompanying guide "enables you to know how to map the functionality of the S Pen button in order to use the S Pen Remote. The S Pen button can be set to respond to a single or double button press in the S Pen Settings. It is possible to add this functionality to as many app features as you want."
The SDK contains three main tools: Sending S Pen Remote Events to Apps; Implementation of KeyEvent-Callback; and Implementation of Remote Actions. Each offers doccumentation clearly explaining how each of these three functions hooks into your app and allows it to interact with the S Pen.
The S Pen relies on Bluetooth Low Energy and the connection is managed by the S Pen Framework. Samsung says Bluetooth Low Energy events are not directly sent to the app, but the S Pen Framework converts them to KeyEvents before sending them to the app. This is what allows the app to handle an S Pen event, through recycling the existing KeyEvent-Callback without the need to add other interfaces.