A module supporting Bump(TM) functionality for your app. This allows devices to communicate when they are tapped together.
You MUST copy the contents of the "Resources" in the bump module's zip to your project's "Resources" folder manually before running this demo!
To access this module from JavaScript, you would do the following:
Titanium.Bump = Ti.Bump = require("ti.bump");
Opens up the bump dialog, asking the user to bump two devices together.
Takes one argument, a dictionary with keys:
Fires the event "ready" after the dialog shows up, and "connected" after connecting to another device.
Stop listening for connections.
Sends a message via Bump(TM). Only utilize this after the "connected" event fires, and before the "disconnected" event fires.
Takes one argument, a string. If the message fails to send, the "error" event fires.
Event indicating that Bump(TM) is ready for connections.
Event indicating an error occurred. Has one property, "message", which is the error message.
Event indicating that there is a connection to another device. Has one property, "username", which is the username of the other device.
Event indicating that the connection ended. Has one property, "message", which is one of:
Event indicating there was an error with the connection. Has one property, "message", which is one of:
Event indicating the user cancelled the connection. Has one property, "message", which always has the value "FAILUSERCANCELED".
A message was transmitted between devices over the connection. Has one property, "data", which is a blob of type "text/plain" that holds text.
See example.js
Jeff Haynie jhaynie@appcelerator.com, Appcelerator Inc.
Copyright(c) 2010-2011 by Appcelerator, Inc. All Rights Reserved. Please see the LICENSE file included in the distribution for further details.