Comments (7)
cc @garanj I wonder if it's useful for other apps.
from horologist.
@yschimke the 100 000$ question is about the battery usage of BT vs wifi, in the doc you suggest no BT for more that 1 Mb. But is there any data to help justifying that the gain is so huge it can be beneficial for maybe a little lower sizes too. (For the cases that do not care about speed of course).
from horologist.
These are just guides. They are written to be fairly black and white, to ensure that most apps just do the safe/optimal thing. But if you have a specific case, such as needing particular network access, then you can make an educated call and check it isn't draining the battery super fast.
from horologist.
Well in my case the need is to transfert large amount of data from the phone to the watch in the most efficient way possible battery wise. Speed would be nice but probably secondary. So I don't have a particular network need, if BT is battery efficient to transfert 500Mb+ of data then it's ok for me. The docs seems to imply wifi would be best for battery hence this request.
from horologist.
There are two issues with BT for this
- It's going to be slower, you'll keep the app awake longer running the copy, than if you got it straight via Wifi.
- BT is a shared resource, you'll saturate the connection, and other things between the watch and notification could be delayed.
But they are very different APIs also.
I don't know to treat the BT connection as a socket to the mobile. So it's Data Layer APIs unless you have more information.
from horologist.
From the doc I would have do the ChannelClient way as it seemed to be the solution to that and tried to build some kind of channel that would go through Wifi. This part of wear is new to me and there's little doc about it. And horologist all nice stuff is about downloading from internet.
On another Wear app without such constraints I use DataClient but this does not fit this need at all.
Edit: But in all cases thanks for the confirmation that I should not try to achieve that via BT :)
from horologist.
I'm trying to do something similar and came across this. After reworking the DataLayer sample to use ChannelClient
, it unfortunately continues to use Bluetooth, so I tried using raw sockets in Ktor. A 500mb file, which was on target to take just under an hour to transfer over Bluetooth via ChannelClient
, took just under two minutes to transfer over Wifi via Ktor. Rather than completely redoing everything, I imagine I'll just end running Ktor as an HTTP server and dynamically generating the JSON files.
from horologist.
Related Issues (20)
- Media sample code is too complicated HOT 6
- AnimatedPlayPauseProgressButton "flashes" when seeking forwards or backwards within the same file. HOT 1
- Rotary input support for InlineSlider HOT 7
- rotaryWithScroll library doesn't respect use crown haptic settings HOT 10
- responsive() has some glitches HOT 2
- Check correct mirroring logic HOT 2
- Check icon size HOT 3
- Fix review comments
- Review ToggleChip auto mirrored param for Switch
- DatePickerA11yTest is flaky HOT 1
- Add phone sample app for project's root sample HOT 1
- Create separated sample apps for datalayer
- auth/sample/shared module metalava file is outdated HOT 1
- metalava issue
- Move proto proguard into a library HOT 2
- Long click action for chips HOT 18
- [Play Store] Unable to publish apps on Play Store using Horologist HOT 1
- [Feature Request] Let rotaryWithScroll support nested scrolling HOT 4
- Media sample - address kapt warning HOT 3
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 horologist.