Comments (13)
Awesome work, currently it is "only" the discoverer of services. I hope it will be more. Maybe the other BT-module (https://github.com/eyesore/appc-android-bluetooth/tree/master/android) is an inspiration.
from titanium-bluetooth.
@AppWerft feel free to also contribute!
from titanium-bluetooth.
@m1ga Exposed startScan
on iOS so we have good parity there. Also renamed scanForPeripheralsWithServices
to startScanWithServices
which takes an array of UUID's.
from titanium-bluetooth.
👍 got it. I've changed my list
from titanium-bluetooth.
@m1ga Do you see a sense to start scan with different modes (BALANCED, LOW_LATENCY, LOW_POWER,OPPORTUNISTIC) ?
from titanium-bluetooth.
@AppWerft I didn't use BLE in any real-world project yet so I can't tell which scan mode is better but I think it's good to have a choice to set it. I've added getScanMode()
and setScanMode()
so you can set it yourself
from titanium-bluetooth.
OK, my thought was to use a method parameter … I think serious about BT apps.
from titanium-bluetooth.
Having those in modes is better for scalable API's. Messing up the parameters should be avoided.
from titanium-bluetooth.
OK I have added setter and getter for it. Do you mean it is better to use parameters in methods to keep clean the class from new properties. What kind of pattern do you prefere?
from titanium-bluetooth.
Like I've said in the previous comment: getter and setter is already implemented. I'll check your PR later and see what I can use
from titanium-bluetooth.
Ok, thsi was a parallel dev. anyway.
@Kroll.constant
public static final int SCAN_MODE_BALANCED = ScanSettings.SCAN_MODE_BALANCED;
@Kroll.constant
public static final int SCAN_MODE_LOW_LATENCY = ScanSettings.SCAN_MODE_LOW_LATENCY;
@Kroll.constant
public static final int SCAN_MODE_LOW_POWER = ScanSettings.SCAN_MODE_LOW_POWER;
@Kroll.constant
public static final int CAN_MODE_OPPORTUNISTIC = ScanSettings.SCAN_MODE_OPPORTUNISTIC;
public final int DEFAULT_SCAN_MODE = SCAN_MODE_BALANCED;
private int scanmode = DEFAULT_SCAN_MODE;
……
@Kroll.method
public void setScanMode(int sm) {
scanmode = sm;
}
@Kroll.method
public int getScanMode() {
return scanmode;
}
from titanium-bluetooth.
Started to work on didDiscoverServices
and didDiscoverCharacteristicsForService
. Commited the code already but still have to test it tomorrow.
from titanium-bluetooth.
Closing this ticket for now, since detaching both modules will speed-up each module's process. Still planning to normalize it as soon as we know what API's can be exposed cross-platform.
from titanium-bluetooth.
Related Issues (20)
- problem android module HOT 1
- Example how to setup HOT 2
- Subscribing to characteristics HOT 52
- Android crash HOT 1
- Upgrade release on android HOT 1
- Android module next implementations HOT 7
- Writing a value blob HOT 1
- Typo in Constant definition HOT 1
- Working Beacon Demo ? HOT 1
- unable to locate lib.ti.bluetooth.a HOT 1
- BLE Android don't work fine HOT 10
- Android - Unable to instantiate receiver HOT 6
- didUpdateValueForCharacteristic doesn't show the value HOT 1
- Build for 8.2.0.GA? HOT 3
- Script Error Couldn't find module: ./ti.internal/extensions/Error for architecture: arm64 HOT 1
- On iOS setNotifyValueForCharacteristic(false) and removeEventListener('didUpdateValueForCharacteristic') is not working
- Android: crash on startup with attached headphones HOT 3
- Example crashes on Ti SDK 10.0.2.GA HOT 1
- Android 11 support? HOT 1
- No peripheral HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from titanium-bluetooth.