Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8078623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:51:12+00:00 2026-06-05T15:51:12+00:00

I have implemented correctly bump’s api, and added this code: – (void) configureBump {

  • 0

I have implemented correctly bump’s api, and added this code:

- (void) configureBump {

[BumpClient configureWithAPIKey:@"your api key" andUserID:[[UIDevice currentDevice] name]];

[[BumpClient sharedClient] setMatchBlock:^(BumpChannelID channel) { 
/* UIAlertView *alert=[[UIAlertView alloc] initWithTitle:@"Matched with user" message:nil delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Ok", nil ];
 [alert show];
 [alert release];*/
NSLog(@"Matched with user: %@", [[BumpClient sharedClient] userIDForChannel:channel]); 
[[BumpClient sharedClient] confirmMatch:YES onChannel:channel];
 }];

[[BumpClient sharedClient] setChannelConfirmedBlock:^(BumpChannelID channel) {
/*  UIAlertView *alert=[[UIAlertView alloc] initWithTitle:@"Channel with" message:nil delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Ok", nil ];
 [alert show];
 [alert release];*/
NSLog(@"Channel with %@ confirmed.", [[BumpClient sharedClient] userIDForChannel:channel]);


    [[BumpClient sharedClient] sendData:[[NSString stringWithFormat:@"hi"] dataUsingEncoding:NSUTF8StringEncoding]
                              toChannel:channel];

}];

[[BumpClient sharedClient] setDataReceivedBlock:^(BumpChannelID channel, NSData *data) {
UIAlertView *alert=[[UIAlertView alloc] initWithTitle:@"Data received" message:[NSString stringWithCString:[data bytes] encoding:NSUTF8StringEncoding] delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Ok", nil ];
[alert show];
[alert release];
NSLog(@"Data received from %@: %@", 
      [[BumpClient sharedClient] userIDForChannel:channel], 
      [NSString stringWithCString:[data bytes] encoding:NSUTF8StringEncoding]);
NSString  *receivedBumpData=[NSString stringWithCString:[data bytes] encoding:NSUTF8StringEncoding];
if(receivedBumpData.length!=0){
    CardAvailableLandscape *cardObject=[[CardAvailableLandscape alloc] init];
    [cardObject bumpInsertFunction:receivedBumpData];
}
}];

[[BumpClient sharedClient] setConnectionStateChangedBlock:^(BOOL connected) {
if (connected) {
    /* UIAlertView *alert=[[UIAlertView alloc] initWithTitle:@"bump Coneected"   message:nil delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Ok", nil ];
     [alert show];
     [alert release];*/
    NSLog(@"Bump connected...");
} else {
    /* UIAlertView *alert=[[UIAlertView alloc] initWithTitle:@"Bump disconnected..." message:nil delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Ok", nil ];
     [alert show];
     [alert release];*/
    NSLog(@"Bump disconnected...");
}
}];

[[BumpClient sharedClient] setBumpEventBlock:^(bump_event event) {
switch(event) {
    case BUMP_EVENT_BUMP:{
        /*UIAlertView *alert=[[UIAlertView alloc] initWithTitle:@"Bump detected." message:nil delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Ok", nil ];
         [alert show];
         [alert release];*/
        NSLog(@"Bump detected.");

        break;
    }
    case BUMP_EVENT_NO_MATCH:
    {
        /*UIAlertView *alert=[[UIAlertView alloc] initWithTitle:@"No match." message:nil   delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Ok", nil ];
         [alert show];
         [alert release];*/
        NSLog(@"No match.");

        break;
    }
}
}];
}

this code has been taken from the example project. the connection is established. but i can’t seem to be able to send a file: I tried this tutorial:

http://appgenor.blogspot.it/2010/02/using-bumps-new-api-to-exchange-data.html

but the Bumb object can not be created. it gives me an error. the bump has not been implemented. so it is not in the sdk, i think…

bumpObject = [[Bump alloc] init];   // Bump *bumpObject;

help please!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T15:51:14+00:00Added an answer on June 5, 2026 at 3:51 pm

    I looked at the link you mention and it seems a bit old. You create bump object using static function: [BumpClient sharedClient], which also calls connect for you. I am trying to play with it as well but having problems where bump is detected but I can send data. I am using an iPod and bu.mp website to test the code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have implemented the following code from this page: http://tympanus.net/codrops/2010/06/02/smooth-vertical-or-horizontal-page-scrolling-with-jquery/ $(document).ready(function() { $('ul.navone li
I must not have implemented the wakelocks correctly. This is how I did it.
I am worried I am not doing this correctly. Currently I have implemented a
I have implemented SyncAdapter to perform sync of items in application. This adapter is
I saw the question posed here: Have I implemented Equals()/GetHashCode() correctly? but my c#
I have implemented SSO authentication using the sourceforge spnego project . This is my
The test code is available here for your comments. 1) Rotation problem: I have
I have implemented this function: static <X,Y> Y castOrNull(X obj) { try { return
I have implemented to following in ember.js. The code works up to a certain
I currently have implemented an overlay item that shows an icon for Geo-point on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.