Again, based on the fact that the Samsung SmartApp Challenge that has already begun on the 5th of September and is going on currently with the last date of submission being 30thNov 2013, which expects the use of the pen package and the look package, this is the promised article on the look package. Let us start from some fundamentals.
First, What is Look?
From the last 3 articles, we have seen that Samsung Mobile SDK is a SDK that brings 10 different small packages together into one SDK to ease the developers world. Look is a java package available as part of that same Samsung Mobile SDK. It is a package that provides specialized widgets for additional functions beyond what the Android Views already provide. And of course it builds on what the pen package already provides. In fact, Look requires that S Pen be used to access its features.
Next, then, what are the functions Look provides?
It supports
- · WritingBuddy This basically helps by giving an editor when a S Pen comes closer to an area that can take an input from the pen. The user can write in this editor, which would then by recognized by the WritingBuddy and converted into a digital format for further usage!
Quite a useful feature considering that the S Pen would lead to a lot of apps that would take a written input but the UI should still be compact with out having large canvases occupying the UI for pen inputs.
This can be used with on any view layouts and in TextEdit. WritingBuddy recognizes numbers and alpahabets and even handwriting images which would lead to usages like signature recognition etc.
- · AirButton I see this feature as an advanced context sensitive menu! A set of items or images or what ever may be relevant to a particular context can be shown using an air button.
The wow factor in this is you can creatively define the gravity, the direction and the display type making it look like a feature that was always needed but not invented till now!
Based on the user selection of a menu item / a recent item display there, the next set of actions can be invoked.
- · SmartClip As the name says, SmartClip is indeed a smart clipboard, which does not just capture the selected content, but also the metadata related to the content! This metadata is converted to text that can be searched on or sent to other applications for further use.
This is certainly an interesting feature that can be used very imaginatively to provide seamless copy and paste options between various apps and also help in capturing related content.
This feature would look more magical especially when there is metadata available with the content captured. For example, if there are URLs that are part of the content that is captured, the SmartClip can capture data from the URL too and send it to the destination app.
- · PointerIcon This is a good to have feature something that is taken for granted in many desktop apps but has found its way into a mobile through this package!
This allows you to modify the look of the pointer when you place an S Pen on a view.
The Look Package Architecture
This diagram is taken from the Samsung documentation.
Lot of custom apps can be developed using the look package and as you see the look package is mainly an extension to the Android View package.
The Development environment
In order to develop an app that uses the look package and support all of the above-mentioned features, you need to download the complete Samsung Mobile SDKwhich can be downloaded independently or through an eclipse. Both ways of downloading the SDK and setting up the Development environment are described here.
1. It is a framework developed by Samsung for networking between devices making it easy for people without network programming skills.
2. It is not physical network connection that is created. It is application layer messaging protocol that uses the underlying TCP/IP network. i.e it is different from wi-fi or Bluetooth which work on a physical network protocol.
3. Samsung also provides an add-in emulator to the standard eclipse development environment to test the networking of your apps.
4. The Chord SDK allows creating a network of devices allowing for an n:n communication. It supports
a. Synchronized content sharing
b. Broadcast of messages to near by devices
c. Data transfer between devices
d. Multi-player games
5. The Security features need improvement as any mobile with the same app on it can join the group or leave the group
6. Chord supports only Android 4.0 and above
A bit about the architecture of the Chord SDK:
(This diagram is from Samsung SDK documentation.)
The application layer is where our imagination can be used to build innovative apps.
There are a few other basic aspects we need to understand in order to be able to use the Chord SDK.
1. Channel Manager This is the part of the software that manages all the mobiles in a network. The various devices are called nodes
2. Messaging protocol This is the part of the SDk that helps in exchanging of messages between the nodes
3. File Transfer Protocol This is the protocol used for file transfers between the nodes
4. Discovery protocol - This is the component that helps in discovering the various devices within range to for the logical group of nodes
5. ZeroMQ This is the underlying layer that helps with all the messaging and file transfers
A little bit more about Channels before we get into coding J
Chord has the concept of 2 types of channels for communication:
1. Public Channel
2. Private Channel
The Public channel is one one, which any device running the Chord SDk can join.
A private channel is one, which is created by nodes having the same chord SDK based application.
So, if my mobile has Chord SDK app, I am part of a public channel. If I have an app A and an app B, I can be part of Channel A and Channel B respectively.
In the next article, I will talk about setting up the environment for developing using Chord SDK and later we will develop a simple app using Chord SDK.