Implementing Performance Monitoring For Android Apps

If you would like to generate statistical reports on the performance of your application, you can use the PerformanceMonitor API.

  1. Add the following import statement to the code for your class:
    import com.ooyala.android.performance.PerformanceMonitor;
  2. Add a PerformanceMonitor field to your class:
    private PerformanceMonitor performanceMonitor
  3. Instantiate your PerformanceMonitor using the getStandardMonitor API:
    performanceMonitor = PerformanceMonitor.getStandardMonitor( player )
  4. To generate a report after having set embed codes and played assets, build a statistics snapshot and call the generateReport API:
    Log.d( TAG, performanceMonitor.buildStatisticsSnapshot().generateReport() );
See the PerformanceStatisticsSnapshot API for information about the statistics you can retrieve.

Was this article helpful?