How does "bump" technology work?
Asked Answered
P

3

43

Any good documentation or articles out there about doing device-to-device data transfer?

Prenatal answered 1/8, 2010 at 19:36 Comment(4)
When two people really like each other...Housekeeping
"grind" technology is the really important one.Sequacious
Oops, must've posted to ComedianOverflow on accident!Prenatal
you need to be a bit more specific.Locomobile
S
57

Pretty non-technical, but their FAQ gives some information on the technology:

Q: How does Bump work?

A: There are two parts to Bump: the app running on your device and a smart matching algorithm running on our servers in the cloud. The app on your phone uses the phone's sensors to literally "feel" the bump, and it sends that info up to the cloud. The matching algorithm listens to the bumps from phones around the world and pairs up phones that felt the same bump. Then we just route information between the two phones in each pair.

Q: No way. What if somebody else bumps at the same time?

A: Way. We use various techniques to limit the pool of potential matches, including location information and characteristics of the bump event. If you are bumping in a particularly dense area (ex, at a conference), and we cannot resolve a unique match after a single bump, we'll just ask you to bump again. Our CTO has a PhD in Quantum Mechanics and can show the math behind that, but we suggest downloading Bump and trying it yourself!

Q: Why does Bump want to use my location?

A: We've got millions of users worldwide now. We use location information as one of the ways we limit the number of other phones we have to check to determine the correct match. Basically, if you are in Chicago, we use that info so we don't have to compare your bump with bumps coming in from Japan, Europe, New York, etc. For this reason, we require that location services be turned on and that users authorize the use of their location information. If you do not authorize use of location information, Bump won't work, sorry.

Q: Does Bump require that my Bluetooth is activated also?

A: Nope! Bump doesn't use Bluetooth to work at all; all you need is an Internet connection through wifi, 3G or Edge.

Sequacious answered 1/8, 2010 at 19:46 Comment(6)
Can you shed some light on why Bump uses a cloud based approach over Bluetooth to initiate a transfer?Fronde
Cause in iphone bluetooth framework is open in only jail broken iphones.Ikhnaton
@Ikhnaton you can always use GameKit.Hocuspocus
@daknøk, I tried to use game kit as an alternative for bump in one of my clients application, but found a lot of problems while developing the app and then have to switch to bump.Ikhnaton
Is data transferred using p2p after the connection established?Viviparous
Please help Can anyone Please tell me how to bound bump with in 2 meters. Actually my bump works even when two users are not near to each other.Raleighraley
G
9

You may be confusing how Bump functions. My understanding is that accelerometer and geolocation data is used to identify candidate "bumps," or device pairs. The contact data, itself, is transferred over the Internet, not locally via Bluetooth or wifi.

Gazzo answered 1/8, 2010 at 19:45 Comment(0)
F
4

Complete Example from https://github.com/bumptech/bump-api-ios

- (void) configureBump {
// userID is a string that you could use as the user's name, or an ID that is semantic within your environment
[BumpClient configureWithAPIKey:@"your_api_key" andUserID:[[UIDevice currentDevice] name]];

[[BumpClient sharedClient] setMatchBlock:^(BumpChannelID channel) { 
    NSLog(@"Matched with user: %@", [[BumpClient sharedClient] userIDForChannel:channel]); 
    [[BumpClient sharedClient] confirmMatch:YES onChannel:channel];
}];

[[BumpClient sharedClient] setChannelConfirmedBlock:^(BumpChannelID channel) {
    NSLog(@"Channel with %@ confirmed.", [[BumpClient sharedClient] userIDForChannel:channel]);
    [[BumpClient sharedClient] sendData:[[NSString stringWithFormat:@"Hello, world!"] dataUsingEncoding:NSUTF8StringEncoding]
                              toChannel:channel];
}];

[[BumpClient sharedClient] setDataReceivedBlock:^(BumpChannelID channel, NSData *data) {
    NSLog(@"Data received from %@: %@", 
    [[BumpClient sharedClient] userIDForChannel:channel], 
    [NSString stringWithCString:[data bytes] encoding:NSUTF8StringEncoding]);
}];


// optional callback
[[BumpClient sharedClient] setConnectionStateChangedBlock:^(BOOL connected) {
    if (connected) {
        NSLog(@"Bump connected...");
    } else {
        NSLog(@"Bump disconnected...");
    }
}];

// optional callback
[[BumpClient sharedClient] setBumpEventBlock:^(bump_event event) {
    switch(event) {
        case BUMP_EVENT_BUMP:
            NSLog(@"Bump detected.");
            break;
        case BUMP_EVENT_NO_MATCH:
            NSLog(@"No match.");
            break;
    }
}];

}

Floatable answered 12/8, 2012 at 3:5 Comment(1)
This answer is outdated, the mentioned library has a proprietary part that doesn't work on modern architecturesErlond

© 2022 - 2024 — McMap. All rights reserved.