User Tools

Site Tools


Serval Mesh State Changes

The Serval Mesh software uses broadcasts to inform third party applications about changes in state of the software. For example states include:

  • starting…
  • stopping…
  • on

An application that wishes to be informed about the state of the Serval Mesh software can use a BroadcastReceiver to receive the “org.servalproject.ACTION_STATE” broadcast. Attached to the Intent associated with this broadcast is an integer that represents that state.

The StateChangeReceiver in the Serval Mesh Sampler application provides sample code that shows how to extract the value from the intent.

The StateChangedActivity in the Serval Mesh Sampler application uses the receiver to display the string representation of the state.

content/servalmesh/api/state_changes.txt · Last modified: 14/05/2013 23:18 (external edit)