title: BUS_BLOCKING_CALL_NOT_ALLOWED error in AllJoyn
body: <p>I'm trying to use AllJoyn for my app, but when I'm trying to use code from sample (<a href="https://www.alljoyn.org/docs-and-downloads/documentation/guide-alljoyn-development-using-java-sdk-rev-h#unique_33" rel="nofollow">sample 13</a>), I can't join to session and get error BUS_BLOCKING_CALL_NOT_ALLOWED.</p>
  
  <pre><code>    bus.registerBusListener(new BusListener() {
          @Override
          public void foundAdvertisedName(String name,
                                          short transport,
                                          String namePrefix) {
              short contactPort = CONTACT_PORT;
              SessionOpts sessionOpts = new SessionOpts();
              Mutable.IntegerValue sessionId = new Mutable.IntegerValue();
  
              Status status = bus.joinSession("com.my.well.known.name", //here's error: status = BUS_BLOCKING_CALL_NOT_ALLOWED 
                      contactPort,
                      sessionId,
                      sessionOpts,
                      new SessionListener());
              bus.cancelAdvertiseName("com.my.well.known.name",SessionOpts.TRANSPORT_ANY);
          }
      });
  </code></pre>
  
  <p>This code is from sample and I have no idea what's wrong with it. Can you help me?</p>
  
  <p>If necessary, here's full code: <a href="http://pastebin.com/f1sD7RtK" rel="nofollow">http://pastebin.com/f1sD7RtK</a></p>
  
  <p>I'm trying to create new channel and connect to it automatically, without user's participation. </p>
  
  <p>Also I'll be very grateful for any good advices or samples.</p>