This year we have teamed up with that same Software team from Intel to bring
in-proximity device discovery to their Common Connectivity Framework (called
CCF to those in the know) which debuts at
the WIPJam hackathon from the 24th through 26th.
NewAer is a
great addition to Intel's latest CCF framework for peer-to-peer
communication. By leveraging the power of the NewAer Proximity Platform
for discovery, and the new CCF communication node API you can easily build
applications to leverage both proximity discovery and peer-to-peer
communication. It is a snap to wire the NewAer API to the CCF discovery node
system and unlock use cases like proximity based messaging or file transfer.
Just a few lines of code are required to tie these two frameworks together to
great result. An example of the simplicity of this on Android is at the end of
this post.
In addition to the WIPJam event with Intel, we are
presenting some of our applications like Share at the Four Years From Now (4YFN) SWELL Startup
competition on February 25th. Our good friends at WearableWorld.co are also having a Wearable Wednesday event on, you guessed it, Wednesday.
Additionally, we want to make sure you know about Intel’s
Code for Good campaign to help connect and enrich the lives of every person on
earth. Even if they do not have access
to the Internet. http://software.intel.com/codeforgood
All week we will be tweeting what we are up to at www.twitter.com/newaer and Intel
Events http://twitter.com/intelevents
will be at their handle.
Before we sign off, Wired Magazine UK published our story on
how the Internet began and how it has now evolved. We follow that with the world moving towards
devices as beacons, from Bluetooth 2.0 to modern BTLE, WiFi, cellular tower or
even the upcoming LTE Direct, nicknamed LTE-D.
Our favorite quote from the story is “Why couldn't we create valuable experiences
from discovery of devices nearby, without the need to connect to them?” That is how NewAer was born!
You can read it online here.
http://www.wired.co.uk/magazine/archive/2014/02/ideas-bank/yes-your-wireless-devices-shall-connect-seamlessly
And now that snippet of code that I promised you!
Here is how you enable in-proximity
connections in Android between CCF and companion nodes via NewAer… This could enable “AirDrop” functionality on
Android, so cut, paste and hack away!
private void initializeNewAer() {
// Wire device status to
discovery node creation
NAPlatform.get(this).registerDeviceStatusListener(new
NADeviceStatusListener() {
@Override
public void
onInRange(NADevice device) {
if
(device.getType() == NADeviceType.NEWAREA) {
try
{
createOrJoinDN(device.getId());
}
catch (StcException e) {
Log.e(TAG, e);
}
}
}
@Override
public void
onOutOfRange(NADevice device) {
if
(device.getType() == NADeviceType.NEWAREA) {
leaveDN(device.getId());
}
}
@Override
public void
onUnknown(NADevice device) {
//
Do nothing.
}
});
// Join any areas we are in range for
already.
for (NADevice device :
NADevice.getAllUntaggedByType(this, NADeviceType.NEWAREA)) {
try {
if
(device.getStatus() == NADeviceStatus.IN_RANGE) {
createOrJoinDN(device.getId());
}
} catch
(StcException e) {
Log.e(TAG,
e);
}
}
}
private void createDN(String
nodeName) throws StcException {
if(validateCloudServerStatus()){
ccfService.getSTCLib().createDiscoveryNode(nodeName, EnumSet.of(NodeFlags.PUBLISH));
}
}
private void createOrJoinDN(String
id) throws StcException {
try {
createDN(id);
} catch (StcException e)
{
joinDN(id);
}
}
private void joinDN(String nodeName)
throws StcException {
if(validateCloudServerStatus()){
ccfService.getSTCLib().joinDiscoveryNode(nodeName, EnumSet.of(NodeFlags.PUBLISH));
}
}
private void leaveDN(String value)
{
try {
if(validateCloudServerStatus()){
ccfService.getSTCLib().leaveDiscoveryNode(value, EnumSet.of(NodeFlags.PUBLISH));
}
}
catch (StcException e)
{
Log.e(TAG,
e);
}
}
Finally, our blog makes a move to Word Press, from Blogger. We thank Google for years of hosted content,
and look forward to this new platform!
All of our old blog entries are cloned and searchable, so head over
there now! http://blog.newaer.com
No comments:
Post a Comment