samsung,chord,sdk,an,introduction
Read More..
Pages
Showing posts with label xamarin. Show all posts
Showing posts with label xamarin. Show all posts
Tuesday, December 20, 2016
Monday, November 28, 2016
62"" Se"
samsung,look,package,some,fundamentals
Read More..
Labels:
android,
Android App,
cookbook,
development,
for,
mobile,
xamarin
Monday, July 4, 2016
Samsung Pen Package – Some Fundamentals
This is in continuation from my previous post. Samsungs 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 doesnt provide a great experience. It is not a capacitive stylus that typically phones came with but uses the Wacoms 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:


While the above shows the basics in terms of getting up the first Samsung chord SDK app to work, we need to understand what the Android SDK gives us and what are the classes we have to use to create our own app.
What are the basic classes and interfaces provided by the Chord Android SDK? All of the fundamental ones are described here:
ChordManager This forms the core of the SDK. This is used to create a Node and helps in managing which nodes are connected to which channels. If you want to know more about channels and nodes, please refer the previous article.
This is the class that hides all the network complexity from the developer. These are the basic features provided by this class:
- Tells you the list of available network interfaces like wi-fi or Mobile Access Point etc.
- It gives you an option to start and stop chord
- It gives you an option to leave or join a channel
- Helps you list all the channels the node has joined
- And also provides a way to hook up a network listener to respond to changes in the network status.
Most of the main service or game or whatever your application is aiming to achieve through node interactions should be through using the Chord Manager. However, your app the game or service will also have to provide implementation for 3 listeners:
- INetworkListener- ChordManagerhas to listen on this listener to understand the changes in the network state whether connected or disconnected to the network (of choice wifi, wifi direct etc.)
- IChordChannelListener It is through this listener you will have to implement all actions that need to happen when a node joins the network or leaves a network. Through this you also need to implement what happens when a file/data is received or sent.
- IChordManagerListener is a listener that needs to be implemented when you start your ChordManager. This is required to handle the changes when a ChordManagerstarts. Also, after starting, the ChordManager, if there is an error or a network disconnect, what should the ChordManagerdo is defined in the implementation of this listener.
The above 4 classes/listeners help in implementing your own service that can be used with all your nodes in the network.
However, while you have the entire above service ready, you need to decide which channels are you interested in interacting with? It could be the public channel or a private channel with a specific name or even many at a time.
The specific channel implementations are those classes that a developer needs to develop by implementing the IChordChannelInterface.
The interface provides the methods for sending and receiving data.
So, in summary, you have the crux of what you really want to do in your own implementation of the IChordChannel.
However, the ChordManagerhelps you manage connecting and communicating with various nodes in the private or public channels by using 3 listeners.
It is as simple as that. Hope this clarifies the Samsung Chord SDK a bit in order for you to be able to take part in the Samsung Smart App Challenge.
Sponsored by Samsung
Labels:
android,
Android App,
businesses,
chord,
cloud,
cookbook,
development,
for,
growth,
mobile,
samsung,
sdk,
setting,
small,
supercharged,
the,
up,
xamarin