{"id":21326959,"url":"https://github.com/tkomde/electron-webbluetooth","last_synced_at":"2025-07-12T07:30:59.924Z","repository":{"id":42207987,"uuid":"186918303","full_name":"tkomde/electron-webbluetooth","owner":"tkomde","description":"Connection sample of webbluetooth in electron","archived":false,"fork":false,"pushed_at":"2024-04-26T10:38:55.000Z","size":122,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-26T11:42:02.923Z","etag":null,"topics":["electron","electron-webbluetooth","webbluetooth"],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/tkomde.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-05-15T23:50:55.000Z","updated_at":"2024-04-26T10:38:59.000Z","dependencies_parsed_at":"2024-03-21T07:44:33.226Z","dependency_job_id":null,"html_url":"https://github.com/tkomde/electron-webbluetooth","commit_stats":null,"previous_names":["tkomde/electron-webbluetooth"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkomde%2Felectron-webbluetooth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkomde%2Felectron-webbluetooth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkomde%2Felectron-webbluetooth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkomde%2Felectron-webbluetooth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tkomde","download_url":"https://codeload.github.com/tkomde/electron-webbluetooth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225802622,"owners_count":17526452,"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":["electron","electron-webbluetooth","webbluetooth"],"created_at":"2024-11-21T21:12:36.442Z","updated_at":"2024-11-21T21:12:36.914Z","avatar_url":"https://github.com/tkomde.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# electron-WebBluetooth\n\nWebBluetooth integration sample with electron. \nSupports selecting multiple device.\n\n## Prerequisites\n\n- electron(\u003e=3 will work)\n- bootstrap(included)\n\n## Run\n\n- npm i\n- npx electron .\n\n## How it works\n\n1. In renderer, scan() to get device list.\n1. The devices list is notified periodically via IPC to main process.\n  1. If you find the deviceId you want to connect, select and notify to main.\n1. Connection callback called only once in main.\n1. When disconnected, automatically reconnect former connected device.\n\n## Restrictions to implement WebBluetooth in electron\n\n- If event.preventDefault is not called, first available device will be selected.\n- Callback should be called with deviceId to be selected, passing empty string to callback will **cancel** the request.\n- Calling requestDevice twice causes automatically cancel the former one.\n\n## Link\n\n[Electron Documentation - webContents - select-bluetooth-device](https://electronjs.org/docs/api/web-contents#event-select-bluetooth-device)\n[Electron Documentation - webContents - executejavascriptcode-usergesture](https://electronjs.org/docs/api/web-contents#contentsexecutejavascriptcode-usergesture)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkomde%2Felectron-webbluetooth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftkomde%2Felectron-webbluetooth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkomde%2Felectron-webbluetooth/lists"}