The repository contains an Android application which serves as the reference design for our Score protocol
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.




Score is a library which implements the Simple Coded Reliable protocol for reliable unicast and multicast communication over UDP.

This repository contains reference which illustrates how to use the score-android library.


The score-android library is a dependency of this project. The library is deployed at Steinwurf's private maven repository.

You need to be an authorized user to accessing this. To become authorized you need a commercial license, please contact

If you have a commercial license please contact Steinwurf at to have us make you a user for our maven repository.

Once you have a user you need to put the following lines in your global gradle file (This is located in $HOME/.gradle/

artifactory_username=[YOUR USERNAME HERE]
artifactory_password=[YOUR PASSWORD HERE]

For security reasons it's recommended to use an encrypted password. You can get that on your user's page on our Artifactory web interface.

After this you should be able to build the project using Android Studio, or by running the following gradle command:

./gradlew assembleDebug


The examples in this project are split into two modules - server and client. In these modules each activity is contains a separate examples. The example can either be audio or video related.

Each example will be described in this section.


This section describes the audio related examples.

Score Audio

Score Audio


This example is the client side of the audio examples.

Score Microphone

Score Microphone


This example is the server side of the audio examples. It streams the audio recorded from the device's microphone.

The audio encoding is uncompressed linear PCM with a sample size of 16 bits.

Streaming audio differs from streaming video because the data rate is somewhat lower. To combat this the symbol size should be lowered so that even though very little data is generated, data packets are still produced by the Score Source in a timely manner.


This seconds describes the Apps related to video streaming.

Score Video

Score Video


This example is the client side of the video examples. It uses Steinwurf's mediaplayer library for playback of the incoming video data. The before the video player can start the playback of video, it needs the SPS and PPS buffers. For this reason these buffers are provided as messages injected to the stream before each I-frame (NaluType.IdrSlice) in the stream. Additionally the last 8 bytes of the received message is a long representing the time stamp of the received video sample.

Score Camera

Score Camera


This example is one of the server sides of the video example. This app creates a score video stream from the device's first camera. This is usually the back camera.

Score Screen Capture

Score Screen Capture


This example is another server side example of the video example. This app creates a score video stream based on the screen of the device. It uses the same encoder and encoding configuration as the Score Camera example.


Note, these apps are simple reference designs which means they have several limitations would likely need to be addressed in a real application.

Some of these are listed here:

  1. The media encoding configuration is hard-coded.
  2. If only a small amount of data is being transmitted it can take a long time before enough data is available in the score source for it to create data packets. This can lead to dropped frames on the client. To prevent this issue, one need to configure the score source properly and use the source's flush method.
  3. The clients are not notified when the server has stopped. And when restarting the server all clients must be restarted as well.