Search form


Android - Core Sample Apps

Running Android SimpleClient, SimpleService Apps

The Android SimpleClient and SimpleService provide a simple example of how a client app and a service app could be implemented. The SimpleService listens for connections, the SimpleClient joins the SimpleService session, and text sent from the SimpleClient to the SimpleService via a BusMethod invoked on a SimpleService BusObject is displayed in both apps.

  1. Connect device A and device B to the same network.

  2. Load SimpleClient.apk onto device A, and start app "Simple Client".

  3. Load SimpleService.apk onto device B, and start app "Simple Service". A blank screen appears when the "Simple Service" is started.

  4. The SimpleClient joins the session of the SimpleService, after which the following screen appears on the SimpleClient.

  5. Enter text in the "Simple Client" and hit Enter to have the text sent and returned by the "Simple Service", and displayed on-screen for both apps.

Running Android Chat App

The Android Chat app shows how a chat room can be implemented using the AllJoyn™ framework, where an app first creates a nd joins a session, after which one or more other apps later join the same session.

  1. Connect all devices to the same network.

  2. Load Chat.apk onto devices, and start app "AllJoyn Chat Sample for Android".

  3. Create and start a channel on the first device.

    • Select the right tab (with a "+" on it).

    • Create a channel via the Set Channel Name button - enter a channel name when prompted.

    • Press the "Start Channel" button.

  4. Join the channel on the first device.

    • Press the left tab.
    • Press the Join Channel button, and choose the channel that was created above.

  5. Join the channel on other device(s).

    • Press the left tab.
    • Press the Join Channel button, and choose the channel that was created above.
  6. Enter text in the "Enter message here" text box, and hit enter to chat between devices. In the message history, the Bus Attachment's Unique name will be displayed alongside text from the "other" device(s), or "Me" will displayed alongside text from "this" device.

For future news and updates, please follow or visit
1 year 1 week ago