How does punch technology work?

Any good documentation or articles on transferring data between devices to device?

+43
objective-c iphone bump
Aug 01 '10 at 19:36
source share
3 answers

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

Q: How does bump work?

A: There are two parts to Bump: an application running on your device, and an intelligent matching algorithm that runs on our servers in the cloud. The application on your phone uses telephone sensors to literally "feel" the blow, and it sends this information to the cloud. The matching algorithm listens for hits on phones around the world and connects phones that feel the same way. Then we simply send information between the two phones in each pair.

Q: No way. What if someone else collides at the same time?

A: The way. We use various methods to limit the pool of potential matches, including location information and characteristics of the relief event. If you come across a particularly dense area (for example, a conference), and we cannot solve a unique match after one hit, we will ask you to pounce again. Our CTO has a PhD in quantum mechanics and can show the math behind this, but we suggest downloading Bump and trying it out yourself!

Q: Why does Bump want to use my location?

A: We now have millions of users around the world. We use location information as one way to limit the number of other phones that we need to check in order to determine the correct match. Basically, if you are in Chicago, we use this information, so we donโ€™t need to compare your strike with blows coming from Japan, Europe, New York, etc. For this reason, we require the inclusion of location services and users are allowed to use their location data. If you do not allow the use of location information, Bump will not work, sorry.

Q: Does Bump also need to activate my Bluetooth?

A: No! Bump does not use Bluetooth to work at all; all you need is an internet connection via Wi-Fi, 3G or Edge.

+54
Aug 01 '10 at 19:46
source share

You might be confused about how the Bump functions work. I understand that accelerometer and geolocation data are used to identify candidate โ€œhitsโ€ or pairs of devices. The contact data itself is transmitted over the Internet, and not locally via Bluetooth or Wi-Fi.

+9
Aug 01 '10 at 19:45
source share

Full example from https://github.com/bumptech/bump-api-ios

- (void) configureBump { // userID is a string that you could use as the user 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; } }]; 

}

+5
Aug 12 2018-12-12T00:
source share



All Articles