Challenge 2011 Android API

Quick Links >

Challenge Home
Simulated Data

"Android SDK" has translated this page into Ukrainian here.

PhysioNet/CinC Challenge 2011 Android API

If you are interested in competing in Events 2 and 3 of the challenge, you can download the latest version of the API from the link below. This package includes a sample implementation of a very simple ECG quality algorithm within a file named, for purposes of testing the installation and to serve as a developer's starting point. A small dataset (the simulated dataset) is bundled with the API, allowing it to run as a standalone Android app. Competitors are welcome to improve the algorithm or create their own. Only basic programming knowledge is required to start modifying the code.

Latest API


* Please make sure your entry is backed up at a different location before installing the new API.

New features

Standalone Java development framework

An optional alternative framework can be used to develop and test your code for events 2 and 3. This framework allows to be run within a standalone Java application instead of within an Android application. If your code runs in the standalone Java framework, it should also run in the Android API framework used for scoring event 2 and 3 entries. The standalone framework simplifies the process of collecting a log file to be submitted with your code in order to document its performance.

See the standalone Java development framework page for details.

API Compatible Data

The first two zip files contain batches of 50 ECGs, a convenient size (unzipped, about 6 MB per batch) for use in an Android phone or emulator. Each batch consists of two directories named raw and xml, which contain the binary ECGs and the XML metadata respectively.

The third zip file contains all of the same binary ECGs and XML metadata as in the first two, but arranged in a single batch. This is suitable for use with the standalone Java development framework in environments with sufficient available storage (unzipped, it requires 182 MB).

Running a new batch in the API

You project should now be able to run with a new set of data.

Getting the Output file with the results

To get the output log file with the simulation results, follow these steps (assuming you are running batch 6 from Set B, set-b-p6, for this example):

  1. Replace the appropriate /raw and xml directories as mentioned above
  2. Run the simulation to completion. This will generate a file log file called ECG_LOG_ecgheader_set-X_pZ, where X is the set name and Z is the batch number (starting with 0). So that in our example the file will be called ECG_LOG_ecgheader_set-b_p6.txt
  3. Save the file to your computer using Eclipse: go to the DDMS perspective in Eclipse. Using the File Browser window in that perspective, the ECG_LOG_ecgheader_set-b_p6.txt file should be located on top of the /sdcard root directory.
  4. Select the file and use the Get File (Floppy Disk) icon on the top right) to save the text file to your computer.
Alternatively, if you are running on a cell phone, you can also connect the phone via USB to the computer and access the file through a standard file browser after the simulation has been completed.


*The new API writes a log file with the results in the root /sdcard directory, so the Android Application requests a WRITE_EXTERNAL_STORAGE permission.

Older APIs

Setting Up API for Development and Deployment

To install the API as a standalone Android package in an Android Emulator in your machine or in a cell phone do the following steps:

  1. From Sana's Installing Tools [page opens in another tab or window] follow the instructions for installing Eclipse and Android Tools (Steps 1.1, 4.1-4.5 only).
  2. Download the latest version of the PhysioNet/CINC 2011 API from the top of this page (do not unzip it)
  3. From Eclipse do the following steps:
    1. Select File → Import → Existing Projects into Workspace and hit Next
    2. Check Select archive file and browse for the downloaded PhysioNet/CINC 2011 API zip file and hit Select All
    3. Press the Finish button on the bottom and this will create the Eclipse project named PhysioNet2011_Challenge
  4. Verify that everything is complete by running the project as an Android application on the emulator: Run → Run As → Android Application (select the emulator VM if prompted). The emulator and the app will take a few minutes to launch. Please be patient.

Modifying and Submitting Your Entry

Competitors should only modify and submit the file located in your project at: PhysioNet2011_Challenge → src → org.physionet.challenge2011. Notice that already implements a very simple peak detection algorithm. You will have to either improve on the algorithm or create a new one with under the following rules:

Please include your name and those of your team members and contact information for the week of 5-12 August in a comment near the beginning of your file.

When you are ready to submit your code, follow the procedure outlined above to obtain an output log file. (If you wish, you can make a complete set of output log files, and concatenate them in order to obtain a complete results file in the same format as used for event 1 entries.) The log file (or complete results file) must be submitted together with your file. We will compare the results we obtain while running your code with those that you submit, to verify that your code is working as you intended on our reference phone. If there is a mismatch, or if your code doesn't run, we will attempt to contact you using the contact information in your code.

On your Challenge participant page (accessible by logging into PhysioNetWorks and clicking on the Review button to the right of the PhysioNet/CinC Challenge 2011 project) are instructions and a form for submitting your code and results files. You may submit and revise your event 2 and 3 entry at any time until the final deadline of noon GMT on Friday, 5 August 2011. Note, however, that each submission replaces any previous submission, and only the final submission made before the deadline will be scored. Your scores and rank in each of events 2 and 3 will be posted on that page once they are available (a few days after the final deadline of noon GMT on Friday, 5 August 2011).

Patient Metadata

The following patient metadata is available at runtime through the ECG_MetaData object:

For the purposes of this challenge you can assume that sampling_frequency, number_of_leads, and ch_labels are fixed.

NOTE: The default values defined above are provided in the ECG_MetaData object whenever the respective metadata is unavailable for a given record.