As developers, we find mobile platforms (Android, iOS, Win8) are
different from traditional platforms (desktops, servers).
PeerDeviceNet internal design and developer API are native to the
mobile programming model. Its simple intent API allows adding remote
messaging to apps without any library "gluing"; while its IDL
interfaces allow apps fine grained control of messaging and
- Apps are developed as components glued together thru high
level communication / integration mechanisms (intents, custom
urls, contracts), which enables ad-hoc reuse and composition of
features from different apps.
- Cross components API are mostly asynchronous for the
responsiveness of apps.
- Many issues become prominent in mobile environments such as
power conservation, permissions to access device features,
network connectivity, etc..
PeerDeviceNet api exposes the following three functional modules to
support connected mobile apps:
Each modules are normally supported in three levels of APIs:
- Remote intenting. intents and
api to enable remote start of activities and services at peer
devices, send remote broadcasts.
- Group communication. intents and
api to do messaging in simple multicast groups.
- Device connection. intents and api
for peer device connection setup.
- Intent api.
Intent API provides the highest
level of access to PeerDeviceNet's features. To use this API, all
you need is to have PeerDeviceNet (paid or free) installed on
users devices to gain the runtime support. Apps send normal
android intents using PeerDeviceNet specific action names and pack
message data as intent "extra" data items with PeerDeviceNet
specific keys. All the action names and "extra" data keys
supported by PeerDeviceNet have been centralized at this file Router.java
which you can add to your project for easy access.
- IDL api.
PeerDeviceNet's IDL APIs define
purely asynchronous methods and callbacks. To use these apis, you
need to add their aidl definition files to your project. There is
also DeviceInfo class and NetInfo class used at api which defines
information about devices and networks. For your convenience, all
the necessary files to use aidl api are available from github
, which you can unzip and add to your project.
- Messenger api.
Messenger API is also a high level
api for apps using android's standard messaging pattern
"Messenger". This api defines a group of PeerDeviceNet specific
message ids which can be used with android's Message object. Apps
use messengers to send message data as a bundle with data items
using the same key names as Intent api. All the message ids and
bundle data keys are defined in Router.java