{"id":19900109,"url":"https://github.com/m-lab/ndt7-client-android-java","last_synced_at":"2025-06-25T00:02:49.896Z","repository":{"id":42966605,"uuid":"450161457","full_name":"m-lab/ndt7-client-android-java","owner":"m-lab","description":"Java NDT7 client for Android OS","archived":false,"fork":false,"pushed_at":"2022-03-28T20:10:14.000Z","size":258,"stargazers_count":1,"open_issues_count":3,"forks_count":1,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-06-12T17:25:12.749Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m-lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-20T15:55:49.000Z","updated_at":"2022-07-27T05:31:17.000Z","dependencies_parsed_at":"2022-09-10T13:41:52.546Z","dependency_job_id":null,"html_url":"https://github.com/m-lab/ndt7-client-android-java","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/m-lab/ndt7-client-android-java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-lab%2Fndt7-client-android-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-lab%2Fndt7-client-android-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-lab%2Fndt7-client-android-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-lab%2Fndt7-client-android-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m-lab","download_url":"https://codeload.github.com/m-lab/ndt7-client-android-java/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-lab%2Fndt7-client-android-java/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261135734,"owners_count":23114617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T20:11:12.595Z","updated_at":"2025-06-25T00:02:49.579Z","avatar_url":"https://github.com/m-lab.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ndt7-java\n\nJava community-supported implementation of the\n[NDT7 protocol by M-Lab](https://github.com/m-lab/ndt-server/blob/master/spec/ndt7-protocol.md).\n\n# How it works\n\nConsumers wishing to use the NDT7 speed test should:\n- Build this project running `./gradlew assemble`\n- Copy the AAR files generated in `libdnt7/build/outputs/aar` into their `libs`\n  app folder\n- Add the following dependencies in the consumer app's `build.gradle` file:\n  - `debugImplementation\n    \"net.measurementlab.ndt7.android:libndt7-debug:$libndt7_version@aar\"`\n  - `releaseImplementation\n    \"net.measurementlab.ndt7.android:libndt7-release:$libndt7_version@aar\"`\n- Create a subclass of type `NDTTest` and override the functions that it exposes\n\nInstrumented tests can be ran using the following Gradle task `./gradlew\nconnectedAndroidTest`. For running instrumented tests on a Docker image, the\nfollowing commands can be used:\n```\ndocker build -t local-android .\ndocker run --rm  -it local-android bash -c \"adb start-server \u0026 sleep 15 ; \\\n     emulator -avd first_avd -no-audio -no-boot-anim -gpu off -no-window \u0026 sleep 90; \\\n    ./gradlew build; sleep 10; \\\n    ./gradlew connectedAndroidTest\"\n```\n\n--------------------------------------------------------------------------------\n\n```\n    public void onMeasurementDownloadProgress(Measurement measurement) {\n    }\n```\n\nReturns Measurement information during the download speed test. You can look at\nthe Measurement data class to understand what this will provide. If you are\npurely interested in download speed, you don't need to override this.\n\n--------------------------------------------------------------------------------\n\n```\n    public void onMeasurementUploadProgress(Measurement measurement) {\n    }\n```\n\nReturns Measurement information during the upload speed test. You can look at\nthe Measurement data class to understand what this will provide. If you are\npurely interested in upload speed, you don't need to override this\n\n--------------------------------------------------------------------------------\n\n```\n    public void onDownloadProgress(ClientResponse clientResponse) {\n    }\n```\n\nThis returns the ElapsedTime and NumBytes during the download test. ElapsedTime\nis in *microseconds*. To ease data transformation into the commonly used `mbps`,\nwe expose a static class that assists with the calculations\n`DataConverter.convertToMbps(clientResponse) will generate a String that\nrepresents the speed in mbps. Note this is mega*BITS* per second.\n\n--------------------------------------------------------------------------------\n\n```\n    public void onUploadProgress(ClientResponse clientResponse) {\n    }\n```\n\nThis returns the ElapsedTime and NumBytes during the upload test. ElapsedTime is\nin *microseconds*. To ease data transformation into the commonly used `mbps`, we\nexpose a static class that assists with the calculations\n`DataConverter.convertToMbps(clientResponse) will generate a String that\nrepresents the speed in mbps. Note this is mega*BITS* per second.\n\n--------------------------------------------------------------------------------\n\n```\n    public void onFinished(\n        ClientResponse clientResponse, \n        Throwable error, \n        TestType testType\n    ) {\n    }\n```\n\nThis will be called when a speed test is finished. It includes the type of test.\nIf you run both an upload and download test, this will be fired twice. Once with\ndownload results and once with the upload results. You should also check the\n`error` is null. The reason for this is to allow the consumer to determine if\nthey wish to use the results. The test may run for 9/10 seconds and then error.\nThe consumer may believe that the results are accurate enough to use. Error will\nbe null if the test completed successfully. Otherwise, it is up to the consumer\nto determine if they wish to run another scan or if they believe the partial\nresults are acceptable\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-lab%2Fndt7-client-android-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm-lab%2Fndt7-client-android-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-lab%2Fndt7-client-android-java/lists"}