{"id":18330364,"url":"https://github.com/mbientlab/bletoolbox","last_synced_at":"2025-08-13T21:36:14.282Z","repository":{"id":33142439,"uuid":"36782187","full_name":"mbientlab/BleToolbox","owner":"mbientlab","description":"MetaWear Java SDK - Android - Utility library for Bluetooth LE operations","archived":false,"fork":false,"pushed_at":"2022-05-19T19:44:28.000Z","size":442,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-15T10:32:48.981Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mbientlab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-03T05:33:15.000Z","updated_at":"2022-05-29T18:08:17.000Z","dependencies_parsed_at":"2022-06-27T06:43:24.648Z","dependency_job_id":null,"html_url":"https://github.com/mbientlab/BleToolbox","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbientlab%2FBleToolbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbientlab%2FBleToolbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbientlab%2FBleToolbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbientlab%2FBleToolbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbientlab","download_url":"https://codeload.github.com/mbientlab/BleToolbox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248080343,"owners_count":21044486,"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-05T19:22:09.082Z","updated_at":"2025-04-09T17:44:14.844Z","avatar_url":"https://github.com/mbientlab.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BleToolbox\nThis project is a utility library that implements general Bluetooth LE operations on the Android platform.  The library will only be updated sporadically to address bugs or add features as they are needed.\n\n# Adding Gradle Dependency\nTo add the library to your project, first, update the repositories closure to include the MbientLab Ivy Repo in the \nproject's build.gradle file.\n\n```groovy\nrepositories {\n    ivy {\n        url \"http://ivyrep.mbientlab.com\"\n        layout \"gradle\"\n    }\n}\n```\n\nThen, add the compile element to the dependencies closure in the module's build.gradle file.\n```groovy\ndependencies {\n    compile 'com.mbientlab.bletoolbox:scanner:0.2.3'\n}\n```\n\n# Bluetooth LE Scan\nThe classes in the scanner package scans for Bluetooth LE devices and displays the results in a ListView.  The scanner filters results to only return devices that advertise a valid service UUID and automatically stops scanning after a set duration.\n\n## Embedded Fragment\nYou can embed the fragment in a layout file.  The activity containing the fragment will need to implement the BleScannerFragment.ScannerCommunicationBus interface, which is used to configure the scan.\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\n\u003c!-- Embedding the scanner fragment in a layout --\u003e\n\u003cfragment xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:tools=\"http://schemas.android.com/tools\"\n    android:id=\"@+id/fragment\"\n    android:name=\"com.mbientlab.bletoolbox.scanner.BleScannerFragment\"\n    tools:layout=\"@layout/blescan_device_list\" android:layout_width=\"match_parent\"\n    android:layout_height=\"match_parent\" /\u003e\n```\n\n```java\nimport android.support.v7.app.AppCompatActivity;\n\nimport com.mbientlab.bletoolbox.scanner.BleScannerFragment;\nimport com.mbientlab.bletoolbox.scanner.BleScannerFragment.*;\n\npublic class ExampleEmbeddedScannerActivity extends AppCompatActivityi \n        implements ScannerCommunicationBus {\n    @Override\n    public void onDeviceSelected(BluetoothDevice device) {\n        Toast.makeText(this, String.format(Locale.US, \"Selected device: %s\", \n                device.getAddress()), Toast.LENGTH_LONG).show();\n    }\n    \n    @Override\n    public UUID[] getFilterServiceUuids() {\n        ///\u003c Only return MetaWear boards in the scan\n        return new UUID[] {UUID.fromString(\"326a9000-85cb-9195-d9dd-464cfbbae75a\")};\n    }\n\n    @Override\n    public long getScanDuration() {\n        ///\u003c Scan for 10000ms (10 seconds)\n        return 10000;\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbientlab%2Fbletoolbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbientlab%2Fbletoolbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbientlab%2Fbletoolbox/lists"}