Adding INTERNET permission to manifest
Updating flushMetrics call to move HTTP call to proper place