{"id":20045604,"url":"https://github.com/dodoinblue/ionic-native-bluetoothle","last_synced_at":"2026-05-13T09:32:28.615Z","repository":{"id":57275984,"uuid":"125162916","full_name":"dodoinblue/ionic-native-bluetoothle","owner":"dodoinblue","description":"Ionic Native wrapper for cordova-plugin-bluetoothle","archived":false,"fork":false,"pushed_at":"2019-05-07T19:32:49.000Z","size":6337,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-12T21:47:12.938Z","etag":null,"topics":["ble","bluetooth","ionic"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dodoinblue.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-14T06:00:51.000Z","updated_at":"2019-05-07T19:32:51.000Z","dependencies_parsed_at":"2022-09-16T09:52:37.403Z","dependency_job_id":null,"html_url":"https://github.com/dodoinblue/ionic-native-bluetoothle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dodoinblue%2Fionic-native-bluetoothle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dodoinblue%2Fionic-native-bluetoothle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dodoinblue%2Fionic-native-bluetoothle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dodoinblue%2Fionic-native-bluetoothle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dodoinblue","download_url":"https://codeload.github.com/dodoinblue/ionic-native-bluetoothle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241476437,"owners_count":19968916,"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":["ble","bluetooth","ionic"],"created_at":"2024-11-13T11:18:08.708Z","updated_at":"2026-05-13T09:32:23.593Z","avatar_url":"https://github.com/dodoinblue.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Cordova Bluetoothle Ionic Native Wrapper\n\nThis is a Ionic Native wrapper for [cordova-plugin-bluetoothle](https://github.com/randdusing/cordova-plugin-bluetoothle).\n\n## Installation\n\nRun following command to install this wrapper in your project.\n```bash\nnpm install ionic-native-bluetoothle --save\n```\n\nYou also need to install the bluetoothle cordova plugin.\n```bash\ncordova plugin add cordova-plugin-bluetoothle\n```\n\n## Documentation\n\nSee [cordova-plugin-bluetoothle](https://github.com/randdusing/cordova-plugin-bluetoothle) for API details.\nAlso see the demo here: https://github.com/dodoinblue/bluetoothle-demo\n\n### Basic Usage\n\nTo use a plugin, import and add the plugin provider to your `@NgModule`, and then inject it where you wish to use it.\n\n```typescript\n// app.module.ts\nimport { BluetoothLe } from 'ionic-native-bluetoothle';\n\n...\n\n@NgModule({\n  ...\n\n  providers: [\n    ...\n    BluetoothLe\n    ...\n  ]\n  ...\n})\nexport class AppModule { }\n```\n\n```typescript\nimport { BluetoothLe } from 'ionic-native-bluetoothle';\nimport { Platform } from 'ionic-angular';\n\nimport { NgZone } from '@angular/core';\n\n@Component({ ... })\nexport class MyComponent {\n\n  constructor(private ble: BluetoothLe, private platform: Platform) {\n\n    platform.ready().then(() =\u003e {\n      this.ble.initialize().take(1).subscribe(result =\u003e {\n        console.log(`bluetooth status: ${result.status}`)\n      })\n    });\n  }\n  \n}\n```\n\n### Mocking and Browser Development\n\nBasic mocking for development in browser is provided. To use the basic mocking class, first import both real and mock class in your `src/app/app.module.ts` file\n\n```typescript\nimport { BluetoothLe } from 'ionic-native-bluetoothle';\nimport { BluetoothLeMock } from 'ionic-native-bluetoothle/mocks/BluetoothLeMock';\n```\n\nAnd override previous `BluetoothLe` class in `providers` section in `src/app/app.module.ts`\n```typescript\nproviders: [\n  { provide: BluetoothLe, useClass: BluetoothLeMock }\n]\n```\n\nIf you'd like to modify the Mock behavior, extend it to your own class, and replace `BluetoothLeMock` in the previous steps with your class. Example:\n\n```typescript\n// YourBleMock.ts\nimport { BluetoothLeMock } from 'ionic-native-bluetoothle/mocks/BluetoothLeMock';\n\nexport class YourBleMock extends BluetoothLeMock {\n\n}\n\n// app.module.ts\nimport { BluetoothLe } from 'ionic-native-bluetoothle';\nimport { YourBleMock } from 'path/to/YourBleMock.ts';\n\n...\n\nproviders: [\n  { provide: BluetoothLe, useClass: YourBleMock }\n]\n```\n\n# Credits\n\nThis plugin is based on:\n* https://github.com/randdusing/cordova-plugin-bluetoothle\n* https://github.com/ionic-team/ionic-native\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdodoinblue%2Fionic-native-bluetoothle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdodoinblue%2Fionic-native-bluetoothle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdodoinblue%2Fionic-native-bluetoothle/lists"}