{"id":19157025,"url":"https://github.com/bertrandmartel/bixi-android","last_synced_at":"2025-05-07T07:47:39.241Z","repository":{"id":94807829,"uuid":"113904560","full_name":"bertrandmartel/bixi-android","owner":"bertrandmartel","description":"Android library interacting with Bixi bluetooth device","archived":false,"fork":false,"pushed_at":"2018-01-02T03:45:50.000Z","size":546,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T20:17:44.797Z","etag":null,"topics":["android","android-library","android-service","bluetooth","bluetooth-le","iot"],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bertrandmartel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"publiccode":null,"codemeta":null}},"created_at":"2017-12-11T20:21:29.000Z","updated_at":"2022-05-23T12:32:03.000Z","dependencies_parsed_at":"2023-03-13T16:57:08.490Z","dependency_job_id":null,"html_url":"https://github.com/bertrandmartel/bixi-android","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/bertrandmartel%2Fbixi-android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertrandmartel%2Fbixi-android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertrandmartel%2Fbixi-android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertrandmartel%2Fbixi-android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bertrandmartel","download_url":"https://codeload.github.com/bertrandmartel/bixi-android/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252839109,"owners_count":21812083,"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":["android","android-library","android-service","bluetooth","bluetooth-le","iot"],"created_at":"2024-11-09T08:37:03.046Z","updated_at":"2025-05-07T07:47:39.229Z","avatar_url":"https://github.com/bertrandmartel.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bixi Android library #\n\n[![CircleCI](https://img.shields.io/circleci/project/bertrandmartel/bixi-android.svg?maxAge=2592000?style=plastic)](https://circleci.com/gh/bertrandmartel/bixi-android)\n[![License](http://img.shields.io/:license-mit-blue.svg)](LICENSE.md)\n\nBixi library is an Android service receiving gesture events from Bixi Bluetooth devices\n\nDownload Bixi library Showcase from Google Play :\n \n[![Download YoutubeTv library Showcase from Google Play](http://www.android.com/images/brand/android_app_on_play_large.png)](https://play.google.com/store/apps/details?id=fr.bmartel.android.bixi.app)\n\n## What is Bixi ?\n\n[Bixi](https://bixi.io/) is a small bluetooth touch-free controller with built in battery made by Bluemint Labs\n\n![bixi](https://user-images.githubusercontent.com/5183022/33852136-9f7792de-deb9-11e7-9e9c-9c1ef68cf721.png)\n\n\n## Gestures\n\nList of gesture events : \n\n* CENTER_TO_TOP\n* CENTER_TO_BOTTOM\n* CENTER_TO_LEFT\n* CENTER_TO_RIGHT\n* LINEAR_END\n* LINEAR_CHANGE (the specific value is given)\n* DOUBLE_TAP\n\n## How to include it in your Android project ?\n\nwith Gradle, from jcenter or maven central :\n\n```groovy\ncompile 'fr.bmartel:bixi-service:1.1'\n```\n\n## How to use it ?\n\nUse `BixiClient` service wrapper :\n\n* Kotlin example :\n\n```kotlin\nclass MainActivity : Activity() {\n\n    private lateinit var bixiClient: BixiClient\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n\n        bixiClient = BixiClient(this, object : IBixiListener {\n            override fun onServiceConnected() {\n                Log.v(\"bixi-lib\", \"service is connected - ready to receive events\")\n\n                //start scanning\n                bixiClient.startScan()\n            }\n\n            override fun onStartScan() {\n                Log.v(\"bixi-lib\", \"scan started\")\n            }\n\n            override fun onEndScan() {\n                Log.v(\"bixi-lib\", \"scan stopped\")\n            }\n\n            override fun onDeviceDiscovered(device: BtDevice) {\n                Log.v(\"bixi-lib\", \"new Bixi device discovered : \" + device.deviceName)\n\n                //stop scanning\n                bixiClient.stopScan()\n\n                //connect to this device\n                bixiClient.connectDevice(device.deviceAddress)\n            }\n\n            override fun onDeviceDisconnected(device: BtDevice) {\n                Log.v(\"bixi-lib\", \"device disconnected : \" + device.deviceName)\n            }\n\n            override fun onDeviceConnected(device: BtDevice) {\n                Log.v(\"bixi-lib\", \"device connected : \" + device.deviceName)\n\n                //set a listener to be notified when a gesture event occur\n                bixiClient.getDevice(device)!!.setBixiGestureListener(object : IGestureListener {\n                    override fun onGestureChange(event: BixiEvent) {\n                        Log.v(\"bixi-lib\", \"received gesture event : \" + event.gesture)\n                    }\n                })\n            }\n\n            override fun onBluetoothOff() {\n                Log.v(\"bixi-lib\", \"bluetooth hasn't been activated (user refused the popup)\")\n            }\n\n            override fun onPermissionDenied() {\n                Log.v(\"bixi-lib\", \"location permission was denied (necessary to scan)\")\n            }\n        })\n        bixiClient.init(this)\n    }\n\n    override fun onRequestPermissionsResult(requestCode: Int, permissions: Array\u003cString\u003e, grantResults: IntArray) {\n        super.onRequestPermissionsResult(requestCode, permissions, grantResults)\n        bixiClient.onRequestPermissionsResult(requestCode, grantResults)\n    }\n}\n```\n\n* Java example :\n\n```java\npublic class MainActivity extends Activity {\n\n    BixiClient bixiClient;\n\n    @Override\n    protected void onCreate(Bundle savedInstanceState) {\n        super.onCreate(savedInstanceState);\n\n        bixiClient = new BixiClient(this, new IBixiListener() {\n            @Override\n            public void onServiceConnected() {\n                Log.v(\"bixi-lib\", \"service is connected - ready to receive events\");\n\n                //start scanning\n                bixiClient.startScan();\n            }\n\n            @Override\n            public void onStartScan() {\n                Log.v(\"bixi-lib\", \"scan started\");\n            }\n\n            @Override\n            public void onEndScan() {\n                Log.v(\"bixi-lib\", \"scan stopped\");\n            }\n\n            @Override\n            public void onDeviceDiscovered(BtDevice device) {\n                Log.v(\"bixi-lib\", \"new Bixi device discovered : \" + device.getDeviceName());\n\n                //stop scanning\n                bixiClient.stopScan();\n\n                //connect to this device\n                bixiClient.connectDevice(device.getDeviceAddress());\n            }\n\n            @Override\n            public void onDeviceDisconnected(BtDevice device) {\n                Log.v(\"bixi-lib\", \"device disconnected : \" + device.getDeviceName());\n            }\n\n            @Override\n            public void onDeviceConnected(BtDevice device) {\n                Log.v(\"bixi-lib\", \"device connected : \" + device.getDeviceName());\n\n                //set a listener to be notified when a gesture event occur\n                bixiClient.getDevice(device).setBixiGestureListener(new IGestureListener() {\n                    @Override\n                    public void onGestureChange(BixiEvent event) {\n                        Log.v(\"bixi-lib\", \"received gesture event : \" + event.getGesture());\n                    }\n                });\n            }\n\n            @Override\n            public void onBluetoothOff() {\n                Log.v(\"bixi-lib\", \"bluetooth hasn't been activated (user refused the popup)\");\n            }\n\n            @Override\n            public void onPermissionDenied() {\n                Log.v(\"bixi-lib\", \"location permission was denied (necessary to scan)\");\n            }\n        });\n        bixiClient.init(this);\n    }\n\n    @Override\n    public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {\n        super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n        bixiClient.onRequestPermissionsResult(requestCode, grantResults);\n    }\n}\n```\n\nIn the app module, you can find an example using a Singleton\n\n## Requirements\n\nThis project require Android SDK 19+\n\n## Build Library\n\n### Get source code\n\n```bash\ngit clone git@github.com:bertrandmartel/bixi-android.git\ncd bixi-android\n```\n\n### Build\n\n```bash\n./gradlew build\n```\n\n## About\n\n* Hexagon Icon by Ayse Muskara from the Noun Project, https://thenounproject.com/term/hexagon/318525/\n* appcompat-v7, design \u0026 recyclerview-v7\n* source of Bixi image (on the drawer header) : http://gadgetsin.com/bixi-remote-control-lets-you-control-smart-devices-with-gestures.htm\n\n## License\n\n```\nThe MIT License (MIT) Copyright (c) 2017-2018 Bertrand Martel\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbertrandmartel%2Fbixi-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbertrandmartel%2Fbixi-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbertrandmartel%2Fbixi-android/lists"}