PeerDeviceNet

Tutorials

Home   |   Features   |   Install   |   User guide   |   Developer API   |   Contact
Introduction   |   Remote intenting   |   Group communication   |   Device connection   |   Tutorials   |   Architecture

The following are simple descriptions of some sample apps which demonstrate how to use PeerDeviceNet APIs to create connected mobile apps. The source code projects of these sample apps are hosted at github. Please follow the links to download them.
  1. Chat (github project)
This app demonstrates how to use PeerDeviceNet group communication APIs to implement a simple chat app which connect peer chatters directly without going thru a central server.
PeerDeviceNet provides three kinds of APIs and this app has a separate chat implementation for each API:
ChatActivity.java defines a main menu to allow you choose a specific chat implementation; and allow you start PeerDeviceNet connection manager to connect your devices.

All three chat implementations will talk to each other.
The README file at github project web site provides more detailed description.

  1. Remote Intents (github project)
This app demonstrates how to use PeerDeviceNet to send remote intents to connected devices. PeerDeviceNet provides both "intenting" API and IDL API for sending remote intents. This app uses "intenting" API.
This app provides GUI to allow you interactively define intents (intent action and data URI) to be sent. You choose intent actions from a drop down list;  and enter the data URI either directly in a text box or pick a picture or video from Gallery and use its content uri. When a media file is chosen, PeerDeviceNet will automatically stream the data to destination devices.
PeerDeviceNet GUI can be reused to choose destination devices.
The README file at github project web site provides more detailed description.
  1. Rotate with peers (github project)
This sample is a slight change of android SDK example TouchRotateActivity.  The original TouchRotateActivity allows you rotate a 3D cube thru touch screen.  This sample add PeerDeviceNet group communication to allow several android devices rotate the cube together, a simple demo of multi-player GUI applications.
Group communication is used here to sync the state of this app at connected peer devices. There are two syncing here:
  1. when a device joins the group, it will send a message requesting the rotation "state" of peers already in the group; after receiving responses, it will start its rotation from that state.
  2. when the user of a device rotates the cube, the app will broadcast the rotation changes to all connected peers and peers will change its cube's orientation accordingly.
Users can be actively rotating cubes at multiple devices simultaneously and apps will broadcast rotation values to each other continuously so all apps/devices will keep synced up.
The README file at github project web site provides more detailed description.